WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#2367 closed enhancement (fixed)

Allow @see notation to reference classes

Reported by: coffee2code Owned by: coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

The {@see ???} notation currently supports referencing functions (e.g. {@see get_posts()}), class methods (e.g. {@see WP_Query::get_posts()}, and hooks (e.g. {@see 'body_class'}). However, it does not support referencing classes, which in its defense, it didn't need to do because core had never made use of such a reference.

One such an instance was recently introduced into core, which currently incorrectly links {@see Requests_Response} as if it were a function (e.g. https://developer.wordpress.org/reference/functions/Requests_Response). See:
https://developer.wordpress.org/reference/classes/requests_exception_http_unknown/__construct

link_internal_element() should be extended to support references to classes.

The change will likely see more usage in explanations and handbooks, where the syntax is also supported.

Change History (1)

#1 @coffee2code
2 years ago

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

In 4617:

developer.wordpress.org: Allow @see notation to reference classes.

While not used much in core docs (except once, and only just recently), the feature could be utilized in explanations and handbooks.

Fixes #2367.

Note: See TracTickets for help on using tickets.