Created
December 9, 2021 15:44
-
-
Save jamesmthornton/c798ed8344a26fbd842a4ddeb415c011 to your computer and use it in GitHub Desktop.
add reusable blocks to wp admin
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
add_action( 'admin_menu', 'add_wp_blocks_to_menu' ); | |
function add_wp_blocks_to_menu(){ | |
global $menu; | |
add_menu_page( 'global_blocks', 'Global Blocks', 'read', 'wp_block', '', 'dashicons-align-right', 1 ); | |
$menu[1][2] = "/wp-admin/edit.php?post_type=wp_block"; | |
} | |
// https://indiyoung.wpengine.com/wp-admin/edit.php?post_type=wp_block | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment