Added 7nth Parameter $position to add_submenu_page
Description
Added the ability to define submenu position in add_submenu_page().
Possible values are numeric integers or float.
Throws a "Doing it wrong" if anything else is passed.
Motivation and context
I was creating a Plugin for ClassicPress, wanted to define its menu position and saw it is not possible. Realised the add_submenu_page() function only supports the menu position since 5.3, see https://developer.wordpress.org/reference/since/5.3.0/
How has this been tested?
On local install with Plugin using this new feature (and also not using it, and using it wrongly), with WP Debug turned on.
Screenshots
Types of changes
- New feature (in CP. It is an existing feature in WP)
Thanks, I think it is because I edited it on Git Directly. In any case, looking good but I cannot accept the change, as I am the author of the PR :(
Needs thus review from a third (and fourth) person to accept your indentation amendments.
In any case, looking good but I cannot accept the change, as I am the author of the PR :(
I haven't done any change, just asked for. You can (if I've understood) just change indentation and push to your branch to modify this PR.
I'm sorry, I was looking at my own commit 🙄 This should be corrected now to use tabs.
This pull request has been mentioned on ClassicPress Forums. There might be relevant details there:
https://forums.classicpress.net/t/add-7th-argument-for-add-submenu-page-position/4099/9
From WP File blame these are some of the changesets for the amendments.
https://core.trac.wordpress.org/changeset/42394 https://core.trac.wordpress.org/changeset/46197 https://core.trac.wordpress.org/changeset/46198 https://core.trac.wordpress.org/changeset/47060 https://core.trac.wordpress.org/changeset/51955 https://core.trac.wordpress.org/changeset/52035 https://core.trac.wordpress.org/changeset/53104 https://core.trac.wordpress.org/changeset/53264
Re-opening as this is a good change to consider for CP Core
Unfortunately smileBeda:patch-6 branch has been deleted and needs to be restored as we did with https://github.com/ClassicPress/ClassicPress/pull/1109
Closing in favour of #1128 where we can handle any future conflicts more easily.