Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
PHP snippet to add a panel to the WP Block Inserter.
<?php
/**
* Adding a block category creates a Panel
*/
function create_wclancpa_2019_panel( $categories, $post ) {
return array_merge(
$categories,
array(
array(
'slug' => 'wclancpa-2019',
'title' => __( 'WC Lancaster 2019 Panel', 'wclancpa-2019' ),
),
)
);
}
add_filter( 'block_categories', 'create_wclancpa_2019_panel', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.