#16238 closed defect (bug) (fixed)
convert_to_screen() doesn't support network/user admin
Reported by: | kawauso | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
The new Network and User dashboards use the -network
and -user
slugs respectively in the screen ID.
When using add_contextual_help()
in the context of a plugin, developers are likely to be using the string result of add_submenu_page()
. This is passed to convert_to_screen()
and is always treated as having no specific context, resulting in the contextual help not being displayed outside of the standard dashboard. The same is likely to apply for other uses of convert_to_screen()
.
Attachments (3)
Change History (11)
#3
@
14 years ago
Let's make sure we don't end up with -network-network if the passed string is already suffixed.
#4
@
14 years ago
New patch to respect existing suffixes passed. More flexible than just stripping them out in the str_replace()
.
#5
@
14 years ago
nacin: Looked at that method, but it can result in a slug such as myplugin-user-network, which would work for purposes of preventing loads on the wrong page, but would be an invalid id slug.
#6
@
14 years ago
Suggest commit on 16238.diff (after talking with ryan).
Assume current dashboard as context (since the dashboards have individual menu hooks, plugins shouldn't be trying to add menus of context)