Opened 13 years ago
Closed 10 years ago
#19828 closed enhancement (fixed)
allowing to insert help tab in specific position
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.3.1 |
Component: | Administration | Keywords: | has-patch good-first-bug commit |
Focuses: | Cc: |
Description
this enhancement of add_help_tab() would allow plugin developers to insert help tabs on existing screens at an arbitrary position, e.g. place it on the "Writing Settings" screen's help tab between the "Overview" and "Press This" tabs
the patch attached includes the bugfix from #19827, but this enhancement can be rewritten to work independently
Attachments (5)
Change History (23)
This ticket was mentioned in Slack in #core by mattshaw. View the logs.
10 years ago
#6
@
10 years ago
Patch submitted adding a priority argument for the help tabs and a method to sort the tabs before display. By default, tabs will have a priority of 10 and priorities can be passed in with the default $args when adding new tabs.
This ticket was mentioned in Slack in #core by dustyf. View the logs.
10 years ago
This ticket was mentioned in Slack in #core by dustyf. View the logs.
10 years ago
#11
@
10 years ago
- Keywords good-first-bug added
- Owner set to dustyf
- Status changed from new to assigned
#13
@
10 years ago
- Keywords needs-refresh removed
Hi, submitted the refreshed patch based on @dustyf patch provided 10 months ago.
#14
@
10 years ago
- Keywords needs-unit-tests added
- Milestone changed from Awaiting Review to 4.4
- Owner changed from dustyf to swissspidy
Almost perfect. Will add some unit tests / adjust the existing one.
#15
@
10 years ago
- Keywords commit added; needs-unit-tests removed
What 19828.2.diff does:
- Makes the
_sort_help_tabs
callback method protected, to match other sort callbacks in core. - Uses
uasort
to preserve the array keys - Adjusts the
test_get_help_tabs
unit test - Adds a new
test_help_tabs_priority
test.
#16
@
10 years ago
- Keywords commit removed
A few docs notes on 19828.2.diff:
- We'll need a changelog entry for
get_help_tabs()
for the introduction of priorities - Two newlines should be added before the second sentence in the summary for
_sort_help_tabs()
(it's the description) - No new line between the
@param
block and@return
in_sort_help_tabs()
- Need a changelog entry for the new argument in
add_help_tab()
. I suggest:* @since 4.4.0 The `$priority` argument was added.
It would probably be best to implement a priority system.