Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39371 closed defect (bug) (fixed)

Fix DocBlocks for duplicate hooks

Reported by: keesiemeijer's profile keesiemeijer Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch needs-handbook
Focuses: docs Cc:

Description

DocBlocks should start with /** to be recognized as a DocBlock by the phpdoc-parser. Duplicate undocumented hooks are imported if normal comments (/* */) are used.

These hooks don't have a correct DocBlock.

  • load-widgets.php
  • widgets.php
  • sidebar_admin_setup
  • comment_email
  • session_token_manager
  • rest_insert_attachment
  • rest_insert_comment
  • rest_insert_{$this->post_type}
  • rest_insert_{$this->taxonomy}
  • rest_insert_user

Attachments (1)

39371.patch (5.4 KB) - added by keesiemeijer 8 years ago.
Fix DocBlocks for duplicate hooks

Download all attachments as: .zip

Change History (9)

@keesiemeijer
8 years ago

Fix DocBlocks for duplicate hooks

#1 @keesiemeijer
8 years ago

  • Keywords has-patch added

#2 @netweb
8 years ago

  • Keywords needs-handbook added

#3 @keesiemeijer
8 years ago

I just found out the hooks are in fact, not imported when a DocBlock isn't found by the parser. But we should adhere to the DocBlock syntax /** where possible.

There is a note for multi-line comments in the handbook documenting this.

#4 @SergeyBiryukov
8 years ago

  • Milestone changed from Awaiting Review to 4.8

#5 @SergeyBiryukov
8 years ago

In 39668:

Docs: Add missing duplicate hook references in wp-admin/includes/ajax-actions.php.

Props keesiemeijer.
See #39371.

#6 @SergeyBiryukov
8 years ago

In 39669:

Docs: Correct comment_email duplicate hook reference in wp-admin/includes/class-wp-comments-list-table.php.

Props keesiemeijer.
See #39371.

#7 @SergeyBiryukov
8 years ago

In 39670:

Docs: Add missing session_token_manager duplicate hook reference in wp-includes/class-wp-session-tokens.php.

Props keesiemeijer.
See #39371.

#8 @SergeyBiryukov
8 years ago

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

In 39671:

Docs: Correct rest_insert_* duplicate hook references in REST API.

Props keesiemeijer.
Fixes #39371.

Note: See TracTickets for help on using tickets.