Skip to content

Instantly share code, notes, and snippets.

@norcross
Created February 19, 2014 21:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norcross/9101791 to your computer and use it in GitHub Desktop.
Save norcross/9101791 to your computer and use it in GitHub Desktop.
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