[wp-meta] [Making WordPress.org] #181: Close tie-in between code reference and theme/plugin developer handbooks
Making WordPress.org
noreply at wordpress.org
Tue Oct 28 22:05:41 UTC 2014
#181: Close tie-in between code reference and theme/plugin developer handbooks
---------------------------+-------------------------------------
Reporter: samuelsidler | Owner:
Type: enhancement | Status: new
Priority: normal | Component: developer.wordpress.org
Resolution: | Keywords:
---------------------------+-------------------------------------
Comment (by DrewAPicture):
During today's DevHub chat, it was requested that I share the tags we're
using to auto-link classes, hooks, and functions in the Code Reference
explanations and parsed content. We're actually just using inline `@see`
tags and a filter on the output converts it into a link to the
corresponding class, hook, or function reference page depending on the
presence of certain characters.
For instance:
* `{@see WP_Query}` would link to
https://developer.wordpress.org/reference/classes/wp_query
* `{@see WP_Query::parse_query}` would link to
https://developer.wordpress.org/reference/classes/wp_query/parse_query
* `{@see absint()}` would link to
https://developer.wordpress.org/reference/functions/absint
* `{@see 'pre_get_search_form'}` would link to
https://developer.wordpress.org/reference/hooks/pre_get_search_form
In other words:
* Absence of `()`, `::`, or `''` (single quotes) – the tagged-entity is
linked as a class, e.g. `{@see WP_Query}`
* Presence of `()` but not `::` – the tagged-entity is linked as a
function, e.g. `{@see absint()}`
* Presence of `::` – the tagged-entity is linked as a class method, e.g.
`{@see WP_Query::parse_query()}`
* Presence of `''` (single quotes) – the tagged-entity is linked as a
hook, e.g. `{@see 'pre_get_search_form'}`
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/181#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list