Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#8172 closed defect (bug) (fixed)

contextual_help filter not very useful

Reported by: filosofo Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: Administration Keywords: contextual_help has-patch
Focuses: Cc:


The new (as of 2.7) 'contextual_help' filter just allows you to make boolean changes, viz. whether or not to show the contextual_help. This makes it almost useless.

Instead, it should allow plugins to filter the help content, and it should pass useful information. (The $screen variable it uses is not very specific).

That way plugins can add help information to specific pages.

My patch passes the "suffix" of the page to the contextual_help filter, so plugins can easily add help to specific pages.

Also, as a bonus I cleaned up some unnecessarily verbose related code:

  • wp-admin/admin-header.php was making the suffixes into an array consisting of the suffix and a blank string, in what I guess was an attempt to save code but actually generated more lines.
  • the logic adding tinymce to the correct admin_head action was overkill.

Attachments (1)

useful_contextual_help_filter.diff (4.1 KB) - added by filosofo 7 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ryan
7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [9636]) screen_meta() and contextual help improvements from filosofo. fixes #8172

Note: See TracTickets for help on using tickets.