• Just a heads up. After upgrading to WP7.0 we noticed some of the default block options had their buttons hidden. Tracked down the issue to a conflict with one of the Heroic stylesheets. Here’s some crappy AI-generated code we used to fix the issue.

    add_action( 'admin_enqueue_scripts', 'reroute_heroic_toc_styles', 9999 );

    function reroute_heroic_toc_styles() {

    // Check if Heroic's broken style handle is sitting in the global queue

    if ( wp_style_is( 'ht_toc-block-editor-css', 'enqueued' ) ) {

    // 1. Rip it out of the bad legacy location so it stops crashing the editor layout

    wp_dequeue_style( 'ht_toc-block-editor-css' );

    // 2. Insert it cleanly into the exact modern hook WordPress 7.0 is asking for

    add_action( 'enqueue_block_assets', function() {

    wp_enqueue_style(

    'ht_toc-block-editor-css',

    '/wp-content/plugins/heroic-table-of-contents/dist/blocks.editor.build.css',

    array(),

    '1772545717'

    );

    });

    }

    }

You must be logged in to reply to this topic.