Removing unnecessary CSS and JS code from wp_head()
Removing unnecessary CSS and JS code from wp_head()
Removing unnecessary CSS and JS code from wp_head()
Are there any ways to have the attribute value to appear by default in a custom block created with ‘create-block’ tool?
How to filter a blocks toolbar added in its BlockControls?
Including a javascript library in an edit.sj function
Currently that is not an option inside the block editor. You need to add custom CSS to do it.
this filter modifies the answer of the api route wp/v2/taxonomies when gutenberg request it. it relies on the http header Referer which is set by the client. then, there is no security checks, it’s only a cosmetic customisation. add_filter(“rest_prepare_taxonomy”, function ($response, $taxonomy, $request) { if (“bundles” === $taxonomy->name) { // searching the post id preg_match( … Read more
Assuming that your search block is inside the group block, you need to set the attribute via $processor->set_attribute( ‘data-wp-interactive’, ‘wpse/local-search’ ); inside your wpse_locals_filter_search function as well, since inner blocks are processed before the outer blocks (see line 11 below): function wpse_locals_filter_search( $block_content, $block ) { if ( isset( $block[‘attrs’][‘className’] ) && ‘wpse-local-filter’ === $block[‘attrs’][‘className’] … Read more
You could try to increase specificity with something like html:root html:root { @media (min-width: 1020px) { –wp–preset–font-size–xxl: 3.25rem; /* etc */ } } Or you could get your styles to load after the global styles as an option as you mentioned if you want to leave it as just :root
As of now, there is no dedicated user capability to read a reusable block; it is not possible to customize the capabilities (reading, editing, deleting) exclusively for reusable blocks. The capabilities are currently tied into in the capabilities of the post type ‘post’ so the capabilities that you give to the post type ‘post’ will … Read more
You’re getting that notice because your JavaScript code resulted in the following error: ReferenceError: Cannot access ‘EditComponent’ before initialization This means you need to register your block after the constants EditComponent and SaveComponent are defined. // Define the constants first. const EditComponent = …; const SaveComponent = …; // Then register your block. registerBlockType(‘eternaltwentyfifteen/prevnext’, { … Read more