Skip to content

Instantly share code, notes, and snippets.

@2ndkauboy
Created May 10, 2020 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2ndkauboy/7a5d380a47a8c83c1746912642b29769 to your computer and use it in GitHub Desktop.
Save 2ndkauboy/7a5d380a47a8c83c1746912642b29769 to your computer and use it in GitHub Desktop.
<?php
/**
* Reusable Blocks Management
*
* @package Reusable_Block_Management
* @author Bernhard Kau
* @license GPLv3
*
* @wordpress-plugin
* Plugin Name: Reusable Blocks Management
* Plugin URI: https://kau-boys.de
* Description: Adds a submenu item to access the reusable block overview.
* Version: 0.1
* Author: Bernhard Kau
* Author URI: https://kau-boys.de
* License: GPLv3
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
*/
/**
* Adds a link to the reusable blocks overview
*/
function reusable_blocks_management_add_submenu_page() {
add_submenu_page(
'tools.php',
__( 'Blocks' ),
__( 'Blocks' ),
'edit_pages',
'edit.php?post_type=wp_block'
);
}
add_action( 'admin_init', 'reusable_blocks_management_add_submenu_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment