• Kees Lamper

    (@keeslamper)


    Hi,

    We use this code in our function.php to disable blocks that we don’t need in the editor:
    function example_allowed_block_types( $allowed_block_types, $block_editor_context ) {

    $allowed_block_types = array(
    ‘core/list’,
    ‘core/list-item’,
    ‘core/paragraph’,
    ‘generateblocks/button’,
    ‘generateblocks/grid’,
    ‘generateblocks/headline’,
    ‘generateblocks/image’,
    ‘generateblocks/query-loop’,

    );

    return $allowed_block_types;
    }
    add_filter( ‘allowed_block_types_all’, ‘example_allowed_block_types’, 10, 2 );

    /**

    • Globally disable the Block Directory.
      */
      remove_action( ‘enqueue_block_editor_assets’, ‘wp_enqueue_editor_block_directory_assets’ );

    But now the Flexible Table block is gone. Can you give me the code to show the Flexible Table block?

Viewing 1 replies (of 1 total)
  • Plugin Author Aki Hamano

    (@wildworks)

    Hi,

    If you use the allowed_block_types_all hook, you must explicitly specify which blocks are allowed. Add flexible-table-block/table to the $allowed_block_types array.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.