Gutenburg: Remove border of selected block

It appears that the border is set by the following style definition on the block container (it is in block-editor/style.css): .block-editor-block-list__layout .block-editor-block-list__block:not([contenteditable]):focus::after { position: absolute; z-index: 1; pointer-events: none; content: “”; top: 1px; bottom: 1px; left: 1px; right: 1px; box-shadow: 0 0 0 var(–wp-admin-border-width-focus) var(–wp-admin-theme-color); border-radius: 1px; outline: 2px solid transparent; } Changing setting box-shadow … Read more

Gutenberg InnerBlocks with ACF Blocks – How to enable multiple buttons?

if you have a look at this site: https://developer.wordpress.org/block-editor/reference-guides/core-blocks/#buttons You can see that “Core/Buttons” (plural) only supports “full/wide” on “align”. You can however use “align” => “center” on “core/button”. I don’t know how you can add multiple buttons inside “core/buttons”, but you can however add multiple “core/button” inside your template: [ ‘core/button’, [ ‘align’ => … Read more

Proxy External API request in PHP from Edit.js in Block Plugin

Okay, I figured it out! First, I created a rest endpoint in PHP. https://github.com/bbuilds/ih-top-nurses-block/blob/main/inc/rest.php#L11 The rest point has optional parameters using regex and then in the register_rest_route() callback builds a fetch URL depending on the parameters passed to the WP-REST endpoint. It then fires to the external API wp_remote_get($fetch_url) and dumps the data into the … Read more