Created
May 10, 2020 21:58
-
-
Save 2ndkauboy/7a5d380a47a8c83c1746912642b29769 to your computer and use it in GitHub Desktop.
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