Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#36921 closed task (blessed) (fixed)

Allow hooks referenced inline in Docblocks to be linked

Reported by: drewapicture's profile DrewAPicture Owned by: drewapicture's profile DrewAPicture
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: docs Cc:

Description (last modified by DrewAPicture)

phpDocumentor doesn't support WordPress hooks out of the box. Our answer to this problem is using specially-formatted inline @see tags, e.g. {@see 'hook_name'}, in DocBlocks which the parser recognizes as hooks and parses them into internal Code Reference links.

Many hooks are already given this treatment throughout core, but there are lots of others that aren't.

Side note: We used to implement inline @see links for all functions, classes, and methods, but following #meta1483, known functions, classes, and methods are auto-linked which has freed up the need to handle for those cases within DocBlocks themselves.

Change History (11)

#1 @DrewAPicture
8 years ago

  • Description modified (diff)

#2 @DrewAPicture
8 years ago

  • Owner set to DrewAPicture
  • Status changed from new to accepted

#3 @DrewAPicture
8 years ago

In 37536:

Docs: Apply inline @see tags to hooks referenced in DocBlocks for root directory files.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as hooks.

See #36921.

#4 @DrewAPicture
8 years ago

In 37537:

Docs: Apply inline @see tags to hooks referenced in DocBlocks for wp-admin/* files.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#5 @DrewAPicture
8 years ago

In 37539:

Docs: Apply inline @see tags to hooks referenced in DocBlocks for core classes.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#6 @DrewAPicture
8 years ago

In 37540:

Docs: Apply inline @see tags to hooks referenced in DocBlocks in wp-includes/ms-functions.php.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#7 @DrewAPicture
8 years ago

In 37541:

Docs: Apply inline @see tags to hooks referenced in DocBlocks in wp-includes/general-template.php.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#8 @DrewAPicture
8 years ago

In 37542:

Docs: Apply inline @see tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#9 @DrewAPicture
8 years ago

In 37543:

Docs: Apply inline @see tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

#10 @DrewAPicture
8 years ago

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

In 37544:

Docs: Apply inline @see tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.

Applying these specially-crafted @see tags allows the Code Reference parser to recognize and link these elements as actions and filters.

Fixes #36921.

#11 @DrewAPicture
8 years ago

In 37577:

Docs: Link up a reference to the get_terms_args filter in the hook doc for get_terms_defaults.

See #35381. See #36921.

Note: See TracTickets for help on using tickets.