Last active
July 25, 2020 18:47
-
-
Save jamesmthornton/47b0127053dbe9bebadd7526d957a745 to your computer and use it in GitHub Desktop.
Add a link to the edit reusable blocks page in Wordpress dashboard UI
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 | |
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"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment