Skip to content

Instantly share code, notes, and snippets.

@filipecsweb
Last active April 8, 2019 01:27
Show Gist options
  • Save filipecsweb/a66e68a68a1acc444f59 to your computer and use it in GitHub Desktop.
Save filipecsweb/a66e68a68a1acc444f59 to your computer and use it in GitHub Desktop.
Reorder WordPress administration menu items
<?php
/**
* Reorder WordPress administration menu.
*
* en_US pt_BR - Page Name
*
* Appearence (Aparência) = themes.php
* Settings (Configurações) = options-general.php
* Comments (Comentários) = edit-comments.php
* Tools (Ferramentas) = tools.php
* Media (Mídia) = upload.php
* Dashboard (Painel) = index.php
* Pages (Páginas) = edit.php?post_type=page
* Profile (Perfil) = profile.php
* Plugins (Plugins) = plugins.php
* Posts (Posts) = edit.php
* Users (Usuários) = users.php
*
* Contact (Form contato) = wpcf7
*
* @return array|bool New admin menu order
*/
function customize_menu_order( $menu_order ) {
if ( ! $menu_order ) {
return true;
}
return array(
'themes.php',
'options-general.php',
'edit-comments.php',
'tools.php',
'wpcf7', // Contact Form 7 plugin
'upload.php',
'index.php',
'edit.php?post_type=page',
'plugins.php',
'edit.php',
'users.php',
);
}
add_filter( 'custom_menu_order', 'customize_menu_order', 99 );
add_filter( 'menu_order', 'customize_menu_order', 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment