article block: more core block styles

This commit is contained in:
2026-02-05 11:59:32 +00:00
parent 4c38753830
commit c136756962
17 changed files with 85 additions and 27 deletions

View File

@@ -31,6 +31,11 @@ add_filter( 'block_categories_all' , __NAMESPACE__ . '\\add_categories' );
add_filter( 'badegg_block_types_allow', __NAMESPACE__ . '\\allowed_list' );
add_action( 'init', __NAMESPACE__ . '\\auto_register' );
/**
* Core Blocks
*/
add_filter( 'render_block_core/details', __NAMESPACE__ . '\\core_details_modified', 10, 2 );
function remove_action_block_inline()
{
@@ -251,3 +256,11 @@ function render_acf($block, $content = '', $is_preview = false, $post_id = 0, $w
<?php echo ob_get_clean();
}
}
function core_details_modified($content, $block)
{
$content = str_replace('</summary>', '</summary><div class="wp-block-details__inner inner inner-zero-x wysiwyg">', $content);
$content = str_replace('</details>', '</div></details>', $content);
return $content;
}