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 === false) {
$parsed_block['attrs'][$key] = '';
}
}
}
return $parsed_block;
}, 10, 3);
Related Posts:
- How can I edit the final HTML structure of the whole web page
- I am having an issue with this shortcode plugin.. Warning: Illegal string offset ‘title’
- Categories does not show Block editor WordPress
- I want to hide “sold by” on certain pages with id page 43
- Execute Shortcode in Textfile
- Echo short code syntax
- custom taxonomies not working
- Advanced Custom Forms PHP formatting for do_shortcode
- Block that renders html saved in a php file
- How to add a PHP scripts into WordPress
- overwrite wordpress gallery with custom gallery shortcode
- How to use Contact Form 7 shortcode value in a page?
- How to return html as a string from php for WordPress
- Show Gutenberg facebook embed with a custom theme
- Changing Date Format on Custom Meta Data w/shortcode call
- Display current user metadata on WordPress page
- Why my Ajax events are no longer detected after dynamic change of shortcode content
- Add Shortcode to ::before class
- Reload page with a different shortcode when a user selects from a dropdown
- How can I create a shortcode from an html and php code written together
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Add the shortcodes from the enfold theme to the other theme
- How to output values from a loop into a javascript array
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- Replacing entire tag with shortcode – JavaScript [duplicate]
- CPT in a shortcode
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Offset with ajax load more posts duplicates
- Get posts by id using shortcode
- Shortcode’s output to use as other shortcode’s parameter
- Show products per shortcode
- Shortcode just with a php code
- Open/closed function [closed]
- What is wrong with this shortcode? to include external php file in WordPress posts
- Need to Echo A Url path to show on a wordpress page
- WordPress Shortcode based on other shortcode
- Force ‘permanent’ post cache of shortcode results
- Short code into PHP
- How can i iterate through this shortcode array?
- Add two or multiple functions in WordPress Post or Page
- Shortcode Works for Logged in Users but Not Working for Guest
- Wrapping shortcode content in a span or link
- perform mathematical operation on shortcode
- Update same content in multiple posts at once?
- Shortcode in a $output statement
- Need help with PHP functions
- Custom fields changes the formatting of metabox input
- Shortcode is not outputting all of the desired markup
- When using shortcode, content stops generating after the_content
- Formatting Shortcode to Display in Visual Mode
- PHP Shortcode – 500 error
- Use html tags in shortcode_atts, is it real?
- Run PHP Results inside WP Shortcode
- problem multisite with blog id
- How to pass parameter that ends up being part of a class name with wordpress shortcode
- Shortcode At top of Page – PHP 5.5 vs 5.4 – ob_start();
- Contact form field in wordpress menu
- Serializing URL via wp add_shortcode to auto select from option list onload
- php string inside shortcode does not work
- Create dynamic content from one WP page to multiple other pages
- Limit the number of successful logins
- Shortcodes (with a space) added to php Sample
- How to have Function of a plugin using global vars into a shortcode?
- Shortcode Display From WordPress Dashboard Page Without Using post_id
- On selecting shortcode generate selected shortcode table inside page editor worrdpress
- Show contact 7 form in popup
- Do_shortcode on PHP file outside theme ALMOST works
- Using the same shortcode to show any table from the database
- Overwriting a Shortcode
- How can I put a custom field as the link of a button shortcode?
- Shortcoding with Divs
- Where to place PHP for shortcodes
- Custom field within shortcode
- How to wrap a text with shortcode into php file?
- PHP Widget and do_shortcode
- Problem using explode inside add_shortcode() callback funciton [closed]
- Custom Shortcode with Dynamic Button
- Shortcode not passing variable to included file
- Php inside the shortcode is getting commented
- Whats wrong with my code? Need To add String to shortcode? [closed]
- My title is showing after the shortcode
- A next page function with shortcode?
- Shortcode to include PHP file, pass various parameters to include?
- using a shortcode in a hyperlink
- Shortcode for Visual Composer Grid fails turning string to integer
- Display Current Time using shortcode
- Set variable in javascript and using in my shortcode
- How to create shortcode of this PHP code
- Is there a better way to output HTML as a shortcode?
- WP Custom tables query
- Display total count of products in orders of a specific order status
- Display terms on product page with shotrcode
- HTTP 500 Error after Creating Shortcode
- Redirect loop upon installation of my plugin
- Add default block css when the block has been added with php?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin
- why css file not link?how to create permalink?
- How to add different menu items on different menus?
- How to enable REST API on custom post type without Gutenberg?
- Custom plugin with shortcode not working