Menus: add a position argument to add_submenu_page and the helper functions that use it.

Add a position argument to the `add_submenu_page` function similar to the one already in `add_menu_page`. When adding sub menus enables setting the position in the sub menu where the item should appear.

In addition, add the position argument to functions that call `add_submenu_page` under the hood: `add_management_page`, `add_options_page`, `add_theme_page`, `add_plugins_page`, `add_users_page`, `add_dashboard_page`, `add_posts_page`, `add_media_page`, `add_links_page`, `add_pages_page` and `add_comments_page`.

Props welcher, birgire, alexvorn2.
Fixes #39776.


Built from https://develop.svn.wordpress.org/trunk@46197


git-svn-id: http://core.svn.wordpress.org/trunk@46009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Adam Silverstein
2019-09-20 15:00:59 +00:00
parent 6354f6dcdc
commit 6ca808129c
2 changed files with 66 additions and 26 deletions

View File

@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-46196';
$wp_version = '5.3-alpha-46197';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.