Go to file
Drew Jaynes 63739c5c3d Docs: Provide best practice guidance for achieving parity between `$menu_slug` values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from `$menu_slug`.
At the heart of the matter, the `$menu_slug` parameter in `add_menu_page()` and `add_submenu_page()` is not sanitized with `sanitize_key()`. When the screen object is later built for the admin page, the screen ID is derived from that `$menu_slug` value, though passed through `sanitize_key()`, which can produce unexpected results in comparison check.

Changing the sanitization code to provide actual parity is out of the question at this juncture, so updating the docs to describe how to avoid this edge case is the next best option.

Props GregRoss.
Fixes #35305.


git-svn-id: https://develop.svn.wordpress.org/trunk@40967 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:17:56 +00:00
src Docs: Provide best practice guidance for achieving parity between `$menu_slug` values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from `$menu_slug`. 2017-06-30 04:17:56 +00:00
tests Cron API: Introduce `wp_unschedule_hook()` to clear all events attached to a hook. 2017-06-30 00:21:49 +00:00
tools/i18n DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:49:09 +00:00
.editorconfig
.gitignore Build/Test Tools: Facilitate SVN and Git being co-located in the same directory. 2016-12-12 05:11:27 +00:00
.jshintrc Build/Test Tools: After [29858], update `.jsintrc` to use spaces, not tabs. 2017-01-13 04:44:53 +00:00
.travis.yml Build/Test: Post Travis results to Slack from `WordPress/wordpress-develop` 2017-05-10 10:28:19 +00:00
Gruntfile.js Widgets: Introduce `isHostedVideo` method on `VideoWidgetControl` to allow plugins to extend for recognizing services beyond YouTube and Vimeo. 2017-05-20 04:17:33 +00:00
package.json Trunk is really 4.9-alpha now 2017-06-01 22:07:51 +00:00
phpunit.xml.dist Build/Test Tools: Be strict about tests that do not test anything. 2017-04-23 01:24:41 +00:00
wp-cli.yml
wp-config-sample.php
wp-tests-config-sample.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00