Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
set custom menu order
<?php
add_filter ( 'custom_menu_order', array( $this, 'menu_order' ), 1001 );
add_filter ( 'menu_order', array( $this, 'menu_order' ), 1001 );
public function menu_order( $menu_ord ) {
if ( ! $menu_ord )
return true;
return array(
'wpengine-common', // WPEngine link
'index.php', // this represents the dashboard link
'users.php', // users tab
'edit.php', // this is the default POST admin menu
'edit.php?post_type=niica-docs', // custom post type
'edit.php?post_type=page', // pages
'gf_edit_forms', // Gravity forms
'separator1', // separator
'upload.php', // media manager
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment