Use new `editorStyles()` with `asset`

The new acorn editorStyles() method is very useful!
How can I use it with an asset instead of a bundle?
The reason is that the bud-wp-editor-query extracts the editor-specific styles into a separate asset that can be then separately used/added as editor styles.


would not work as editorStyles() is implemented in `bundle´.

editorStyles() wouldn’t belong on asset() but we might be able to make relativePath() not require an argument (e.g. get_theme_file_path()) so it could at least be done a little cleaner.

1 Like