[wp-trac] [WordPress Trac] #45338: Gutenberg classic editor block is not showing custom mce buttons
WordPress Trac
noreply at wordpress.org
Wed Nov 14 03:39:00 UTC 2018
#45338: Gutenberg classic editor block is not showing custom mce buttons
-----------------------------+---------------------
Reporter: junixdev | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Editor | Version: 5.0
Severity: normal | Resolution:
Keywords: has-screenshots | Focuses:
-----------------------------+---------------------
Comment (by pento):
[attachment:"45338.diff"] moves the TinyMCE settings filter to run later.
Here's a cut down version of what the ThirstyAffiliates plugin is doing,
which works with the patch.
{{{#!php
<?php
add_action( 'init', function() {
add_filter( 'mce_external_plugins', function( $mce_plugins ) {
$mce_plugins['foo'] = 'foo.js';
return $mce_plugins;
} );
add_filter( 'mce_buttons', function( $buttons ) {
$buttons[] = 'foo';
return $buttons;
}, 5 );
} );
}}}
This is still earlier than `edit-form-advanced.php` runs these filters,
but well after `init`. @azaozz: are you aware of anyone adding hooks to
these filters between `init` and when `edit-form-advanced.php` calls
`wp_editor()`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45338#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list