Opened 11 years ago
Closed 8 years ago
#181 closed enhancement (fixed)
Close tie-in between code reference and theme/plugin developer handbooks
Reported by: | samuelsidler | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Developer Hub | Keywords: | |
Cc: |
Description
We need to ensure that the code reference gets closely tied into the theme and plugin developer handbooks (among others). There is a design side to this, but also a function-side, requiring the inclusion of information from the code reference into the handbooks (or however we decide to do that).
Change History (9)
#4
@
11 years ago
Since Hanni is more on handbooks side of DevHub I had asked her to take a look and ponder this.
#5
@
10 years ago
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'}
This is a little vague in current form. Do we have any specific functionality ideas or requirements for it? I spent little time with handbooks, so not how would they want to incorporate code reference bits.