Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PHP snippet to add a panel to the WP Block Inserter.
* Adding a block category creates a Panel
function create_wclancpa_2019_panel( $categories, $post ) {
return array_merge(
'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