CheckboxControl does not visible change

Solution found: const { __ } = wp.i18n; const { useSelect, useDispatch } = wp.data; const { PluginDocumentSettingPanel } = wp.editPost; const { CheckboxControl, PanelRow } = wp.components; const Sidebar = () => { const { postMeta } = useSelect( ( select ) => { return { postMeta: select( ‘core/editor’ ).getEditedPostAttribute( ‘meta’ ), }; } … Read more

Adding content to Page settings rather than Block settings

Ahh — I found it. It is called the PluginDocumentSettingPanel and can be imported from @wordpress/edit-post. import { registerPlugin } from ‘@wordpress/plugins’; import { PluginDocumentSettingPanel } from ‘@wordpress/edit-post’; const PluginDocumentSettingPanelDemo = () => ( <PluginDocumentSettingPanel name=”custom-panel” title=”Custom Panel” className=”custom-panel” > Custom Panel Contents </PluginDocumentSettingPanel> ); registerPlugin( ‘plugin-document-setting-panel-demo’, { render: PluginDocumentSettingPanelDemo, icon: ‘palmtree’, } );

Wp-script package stop to work

Finally i found the problem ! There was a problem in the scss file which stop the building script. I had no error message. I think that the problem was that i used a sass variable which was too long.

How to register two blocks in the same plugin

Add a subfolder in your-plugin/src with the block name Put all src files inside this folder Repeat 1 and 2 for other blocks that you want to add. At this moment, the src folder looks like this: Be careful to edit properly each block.json to give them a name, etc. replace de single block registration … Read more

How to put and components inside in Gutenberg block

When an element doesn’t have children it can be self-closing: <Something something=”123″ /> Otherwise it needs to behave like normal html tag with an opening part: <Something> and a closing one: </Something> edit: function( props ) { return( <Form method=”get” className=”search-form” > <PlainText title=”search box” placeholder=”Search” className=”search-field” type=”text” name=”s” readonly=”true” /> <PlainText type=”hidden” name=”type” value=”media” … Read more

gutenberg attributes

From the docs: If a selector is specified, the source behavior will be run against the corresponding element(s) contained within the block. You are telling your block to look at the same Element for the value of both your attributes.(The first p tag) Change the second selector to something like p:last-of-type or give your p … Read more

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş