how to trigger a Gutenberg image gallery lightbox

In this case I think it would be easiest to simply ignore any Gutenberg-specific implementation and set up the button’s click event to click() the first linked image in the gallery listing. The following searches the page for “gallery buttons” and the first linked image in a gallery block, then sets up the buttons to … Read more

Cannot enable Gutenberg editor [closed]

The block editor (formerly known as Gutenberg) is the default editor. You should not need to install the plugin or choose an option to make it the default. The plugin is now just for following and testing future developments, and the Settings > Writing option only appears if you’re using the Classic Editor plugin. The … Read more

Gutenberg Block language translation does not work

only the JS file translation does not work It’s most likely because WordPress couldn’t find your translation file, which should be in a valid JED format, like so: { “domain”: “my-text-domain”, “locale_data”: { “my-text-domain”: { “”: { “domain”: “my-text-domain”, “plural-forms”: “n != 1”, “lang”: “en-us” }, “Shortcode Title”: [ “Shortcode Title translated” ], “Display it?”: … Read more

Can’t get Gutenberg InspectorControls to work

I got it… I just was missing to enqueue ‘wp-editor’… Here my example code: wp_register_script( ‘mir-shortcodes-plugin-msc-rotating-icon-circle’, plugins_url($index_js, __FILE__), array( ‘wp-blocks’, ‘wp-i18n’, ‘wp-element’, ‘wp-components’, ‘wp-editor’ ), filemtime(“$dir/$index_js”) );

Gutenberg Block – Post Featured Image Filter Hook

From the documentation: Prepend and append to the panel contents: var el = wp.element.createElement; function wrapPostFeaturedImage( OriginalComponent ) { return function( props ) { return ( el( wp.element.Fragment, {}, ‘Prepend above’, el( OriginalComponent, props ), ‘Append below’ ) ); } } wp.hooks.addFilter( ‘editor.PostFeaturedImage’, ‘my-plugin/wrap-post-featured-image’, wrapPostFeaturedImage ); So did you intentionally not using wp.element.Fragment? You may … Read more