Changes between Initial Version and Version 1 of Ticket #45338, comment 6
- Timestamp:
- 11/13/2018 09:41:52 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #45338, comment 6
initial v1 1 1 The problem is that the TinyMCE settings filters for the classic block are in `wp_default_packages_inline_scripts()` ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/script-loader.php#L603 here]) which runs on the action `wp_default_scripts` ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/default-filters.php#L492 here]), which is fired as soon as `class WP_Scripts` is initialized and then at `init` 0 ([https://core.trac.wordpress.org/browser/branches/5.0/src/wp-includes/class.wp-scripts.php#L125 here]). 2 2 3 Previously they were running quite later, near the end of the page where the TinyMCE scripts were printed. 3 Previously they were running quite later, near the end of the page where the TinyMCE scripts were printed. Looks like any plugin that is adding these filters at `init` or later will be affected. 4 4 5 Looks likewe will have to move that "down" again, and will have to `echo` the `wpEditorL10n` init object. Won't be able to use `add_inline_script()`, etc. At this point may be easier if we just reuse class-wp-editor.php to output that, no need to duplicate the code? Or can make another function in script-loader just for that and echo the settings on a later action? @pento @atimmer any ideas/thoughts?5 Seems we will have to move that "down" again, and will have to `echo` the `wpEditorL10n` init object. Won't be able to use `add_inline_script()`, etc. At this point may be easier if we just reuse class-wp-editor.php to output that, no need to duplicate the code? Or can make another function in script-loader just for that and echo the settings on a later action? @pento @atimmer any ideas/thoughts? 6 6 7 7 (BTW why is it called `wpEditorL10n` anyway?) :)