Files
medicalalert-web-reloaded/wp/wp-content/plugins/classic-editor/js/block-editor-plugin.js
Tony Volpe 4eb982d7a8 Merged in feature/from-pantheon (pull request #16)
code from pantheon

* code from pantheon
2024-01-10 17:03:02 +00:00

24 lines
624 B
JavaScript

( function( wp ) {
if ( ! wp ) {
return;
}
wp.plugins.registerPlugin( 'classic-editor-plugin', {
render: function() {
var createElement = wp.element.createElement;
var PluginMoreMenuItem = wp.editPost.PluginMoreMenuItem;
var url = wp.url.addQueryArgs( document.location.href, { 'classic-editor': '', 'classic-editor__forget': '' } );
var linkText = lodash.get( window, [ 'classicEditorPluginL10n', 'linkText' ] ) || 'Switch to classic editor';
return createElement(
PluginMoreMenuItem,
{
icon: 'editor-kitchensink',
href: url,
},
linkText
);
},
} );
} )( window.wp );