New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TinyMCE list plugin registration #12170

Merged
merged 1 commit into from Nov 21, 2018

Conversation

Projects
None yet
2 participants
@iseulde
Member

iseulde commented Nov 21, 2018

Description

Currently the TinyMCE lists plugin is registered as vendor script and at the wrong TinyMCE version. The core script should be used.

Core script registration: https://github.com/WordPress/wordpress-develop/blob/f02568afb4b36fae4a5d0457e60cb7f75ce05bec/src/wp-includes/script-loader.php#L63.

How has this been tested?

Ensure the list block still works in WordPress 4.9.8 with the plugin, and WordPress 5.0.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@iseulde iseulde added this to the 4.6 milestone Nov 21, 2018

@iseulde iseulde requested review from gziolo, WordPress/gutenberg-core, azaozz and mcsf Nov 21, 2018

@iseulde

This comment has been minimized.

Member

iseulde commented Nov 21, 2018

This seems to have been forgotten in #10754. Cc @mcsf.

@tofumatt

Works in 4.9.8 with this patch for me. I don't have a handy 5.0 to test this on at the moment but 4.9.8 works and code looks good.

@@ -87,6 +87,8 @@ function register_tinymce_scripts() {
gutenberg_override_script( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce{$mce_suffix}.js", array(), $tinymce_version );
gutenberg_override_script( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin{$suffix}.js", array( 'wp-tinymce-root' ), $tinymce_version );
}
gutenberg_override_script( 'wp-tinymce-lists', includes_url( 'js/tinymce/' ) . "plugins/lists/plugin{$suffix}.js", array( 'wp-tinymce' ), $tinymce_version );

This comment has been minimized.

@tofumatt

tofumatt Nov 21, 2018

Member

Not sure if WP PHP style allows for string interpolation (I prefer it, but it seems to not usually be used).

This comment has been minimized.

@iseulde

iseulde Nov 21, 2018

Member

Honestly I just copied the line above. :)

@iseulde iseulde merged commit 1831687 into master Nov 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@iseulde iseulde deleted the fix/tinymce-list-plugin-registration branch Nov 21, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment