Opened 14 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.
11 years ago
#6
@
11 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.
11 years ago
This ticket was mentioned in Slack in #core by dustyf. View the logs.
11 years ago
#11
@
11 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_tabscallback method protected, to match other sort callbacks in core. - Uses
uasortto preserve the array keys - Adjusts the
test_get_help_tabsunit test - Adds a new
test_help_tabs_prioritytest.
#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
@paramblock and@returnin_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.