Block UI data table
Block UI data table
Block UI data table
Really having to have this fixed, I used this not-so-elegant workaround that works perfectly. It is bound to the base-name I use for my blocks: add_filter(‘render_block_data’, function($parsed_block, $source_block, $parent_block) { if(strpos($parsed_block[‘blockName’], ‘my-base-name/’) !== false && isset($parsed_block[‘attrs’]) && is_array($parsed_block[‘attrs’])) { foreach($parsed_block[‘attrs’] as $key => $val) { if($val === true) { $parsed_block[‘attrs’][$key] = ‘1’; } elseif($val === … Read more
How can I utilize the same “show more” functionality that I see in superuser on my own WordPress site?
adding additional css classes have no effect within block editor
I created a custom block. It works but not able to get the block preview image working. The cover in the code sample for the example prop was just an example attribute, so setting cover: ‘<image URL>’ does not automatically displays the image when previewing the block via the block inserter. However, the preview uses … Read more
Gutenberg: – Call a function after Server Side Component is rendered
I had a console error Uncaught ReferenceError: __ is not defined. I believe this is a string translation function in WordPress. I removed references to this and the blocks are available now.
How to delete child block for associated parent block
I found that using import { useBlockProps, MediaPlaceholder } from ‘@wordpress/block-editor’; import { TextControl, __experimentalNumberControl as NumberControl } from ‘@wordpress/components’; instead of import { TextControl, NumberControl, MediaPlaceholder } from ‘@wordpress/components’; resolved the problem.
Is it possible to consume context from a parent block and update it from within a child block?