Last active
September 7, 2020 22:05
-
-
Save franz-josef-kaiser/4693195 to your computer and use it in GitHub Desktop.
WordPress (mu)plugin to add a separator to the admin menu with a call to the default API. Explanation can be found in the doc block. // Screenshots (main menu separator) http://i.stack.imgur.com/HUmKQ.png // (submenu separator) http://i.stack.imgur.com/6AKDY.png
This file contains hidden or 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 | |
defined( 'ABSPATH' ) OR exit; | |
/** Plugin Name: Example Admin Menu Separator */ | |
add_action( 'admin_menu', 'add_admin_menu_separator' ); | |
function add_admin_menu_separator() | |
{ | |
add_menu_page( '', '', 'read', 'wp-menu-separator', '', '', '21' ); | |
add_submenu_page( 'edit.php?post_type=page', 'wp-menu-separator', '', 'read', '11', '' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wow, i didnt realize it had been 7 years.
i feel old