Enhancing Gutenberg featured image control

I’ve got JavaScript that verifiably loads on the post type edit page But did you enqueue your script with the correct dependencies? Have you checked the browser console? Did it say something like “Uncaught TypeError: Cannot read property ‘createElement’ of undefined“? The JavaScript code in the question requires the @wordpress/element and @wordpress/hooks packages, which are … Read more

Find all the places where a block type is used

I know that this is not welcome here, but my only answer is that I can refer you to the following plugin. The plugin was released a few weeks ago and finds exactly the blocks used for your installation. Exactly what you need. https://wordpress.org/plugins/find-my-blocks/

How to use “getEntityRecords” for user data?

So I guess you’re still using WordPress version 5.3.x? 🙂 Because if so (and I was), then yes, the users endpoint (at wp/v2/users) is not included in the default entities. But you can manually add it: // Add the endpoint. wp.data.dispatch( ‘core’ ).addEntities( [ { name: ‘user’, kind: ‘root’, baseURL: ‘/wp/v2/users’ } ] ); And … Read more

Adding a custom PanelColorSettings control to a core block, and using the color slug in a custom className

Your code looks ok and would work in any other component other than colors, because colors need the higher-order-component withColors. In the past I struggled also dealing with the behaviour, that your are describing and found these two solutions: If you want to insert your own color component, check the second example from here https://awhitepixel.com/blog/add-custom-settings-to-existing-wordpress-gutenberg-blocks/. … Read more

Gutenberg blocks – processing server data within a block

There are multiple better ways to get a list of posts in a Gutenberg block, other than rendering serverside. First is to use the Wrodpress wrapper around Redux and select posts exactly like in the Gutenberg Handbook: edit: withSelect( function( select ) { return { posts: select( ‘core’ ).getEntityRecords( ‘postType’, ‘post’ ) }; } )( … Read more

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