wordpress后台默认菜单选项顺排序调整
我们在开发wordpress主题时常常用需要调整一个wordpress程序默认的后台菜单选项,那我们今天讲的是如何调整排序,比如说我需要把wordpress后台默认的页面功能调下文章的下方来提示我们wordpress主题用户页面用常用选项,如何完成这样的操作呢,可以通过custom_menu_order和menu_order来实现,下面分享一下方法。
将以下代码添加到当前主题的 functions.php 文件:
12345678910111213141516171819202122232425262728// Rearrange the admin menufunction custom_menu_order($menu_ord) {if (!$menu_ord) return true;return array('index.php', // Dashboard'edit.php?post_type=custom_type_one', // Custom type one'edit.php?post_type=custom_type_two', // Custom type two'edit.php?post_type=custom_type_three', // Custom type three'edit.php?post_type=custom_type_four', // Custom type four'edit.php?post_type=custom_type_five', // Custom type five'separator1', // First separator'edit.php?post_type=page', // Pages'edit.php', // Posts'upload.php', // Media'link-manager.php', // Links'edit-comments.php', // Comments'separator2', // Second separator'themes.php', // Appearance'plugins.php', // Plugins'users.php', // Users'tools.php', // Tools'options-general.php', // Settings'separator-last', // Last separator);} add_filter('custom_menu_order', 'custom_menu_order'); // Activate custom_menu_orderadd_filter('menu_order', 'custom_menu_order');以上是默认的wordpress后台菜单选项排序,我们可以通过位置的调整来改变顺序。
winlogins.exe是什么文件?winlogins.exe是不是病毒
winsock2.6.exe是什么文件?winsock2.6.exe是不是病毒
WinDefendor.dll是什么文件?WinDefendor.dll是不是病毒
系统目录是什么文件?系统目录是不是病毒
wholove.exe是什么文件?wholove.exe是不是病毒
winn.ini是什么文件?winn.ini是不是病毒
w6oou.dll是什么文件?w6oou.dll是不是病毒
winduxzawb.exe是什么文件?winduxzawb.exe是不是病毒
wuammgr32.exe是什么文件?wuammgr32.exe是不是病毒
windiws.exe是什么文件?windiws.exe是不是病毒