This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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