PluginProbe ʕ •ᴥ•ʔ
Classic Editor / 1.6.7
Classic Editor v1.6.7
1.7.0 trunk 0.1 0.2 0.3 0.4 0.5 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7
classic-editor / js / block-editor-plugin.js
classic-editor / js Last commit date
block-editor-plugin.js 5 years ago
block-editor-plugin.js
24 lines
1 ( function( wp ) {
2 if ( ! wp ) {
3 return;
4 }
5
6 wp.plugins.registerPlugin( 'classic-editor-plugin', {
7 render: function() {
8 var createElement = wp.element.createElement;
9 var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;
10 var url = wp.url.addQueryArgs( document.location.href, { 'classic-editor': '', 'classic-editor__forget': '' } );
11 var linkText = lodash.get( window, [ 'classicEditorPluginL10n', 'linkText' ] ) || 'Switch to classic editor';
12
13 return createElement(
14 PluginMoreMenuItem,
15 {
16 icon: 'editor-kitchensink',
17 href: url,
18 },
19 linkText
20 );
21 },
22 } );
23 } )( window.wp );
24