WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30558 closed defect (bug) (fixed)

Inline Docs: Fix mismatched hook docs

Reported by: DrewAPicture Owned by: johnbillion
Milestone: 4.1 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: docs Cc:
PR Number:

Description

Background: Since phpDocumentor does not support parsing hook docs out of the box, the rule of thumb is that any DocBlock accompanying a hook must directly precede it with nothing in between. For some time now there have been several "problem hooks" showing incorrect docs in the Code Reference.

For example, the docs being displayed for user_new_form_tag actually match the next hook in the file, user_new_form.

Attached patch addresses the problem for the following hooks:

  • admin_post_class
  • enter_title_here
  • `manage_link_custom_column
  • `manage_media_custom_column
  • the_title_rss
  • admin_xml_ns
  • user_edit_form_tag
  • admin_color_scheme_picker
  • user_new_form_tag
  • rss_update_period
  • rss_update_frequency
  • comment_form

Attachments (3)

30558.diff (15.5 KB) - added by DrewAPicture 5 years ago.
30558.2.diff (15.8 KB) - added by DrewAPicture 5 years ago.
feedback from @wonderboymusic
30558.3.diff (16.2 KB) - added by DrewAPicture 5 years ago.
feedback from @johnbillion

Download all attachments as: .zip

Change History (7)

@DrewAPicture
5 years ago

@DrewAPicture
5 years ago

feedback from @wonderboymusic

@DrewAPicture
5 years ago

feedback from @johnbillion

#1 @DrewAPicture
5 years ago

  • Keywords commit added

This ticket was mentioned in Slack in #core by drew. View the logs.


5 years ago

#3 @johnbillion
5 years ago

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

In 30754:

Improve various hook and filter docs so they are correctly parsed for the code reference.

Fixes #30558
Props DrewAPicture

#4 @DrewAPicture
5 years ago

In 30756:

Add a blank line preceding a Markdown-formatted ordered list in the DocBlock for the admin_body_class filter.

Props kpdesign.
See #30558.

Note: See TracTickets for help on using tickets.