Opened 10 years ago

Closed 6 years ago

Last modified 21 months ago

#233 closed enhancement (invalid)

Documenting data structures that have no class definitions

Reported by: rarst's profile Rarst Owned by:
Milestone: Priority: low
Component: Developer Hub Keywords: has-patch


As raised in question on WPSE - some of the data being passed around in WordPress has pretty set and extensive formatting, but is not instance of any class and so cannot be parsed as one.

Codex sometimes (rather inconsistently) has it documented in function reference as info about returns. However there doesn't quite seem to be a set place for it in DevHub reference and long term we probably need one.

Change History (4)

#1 @Rarst
10 years ago

  • Priority changed from normal to low

This ticket was mentioned in Slack in #meta-devhub by coffee2code. View the logs.

8 years ago

#3 @coffee2code
6 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This seems more a core documentation issue than one for the Code Reference.

We support a DocBlock syntax for the @return tag that allows for the description and definition of a return array or object and its elements. For example, see WP_Tax_Query::get_sql_for_query(), which returns an array with 'join' and 'where' as keys.

If the intent is to formalize things into actual data structures rather than relying on in-place documentation, then that also seems to be more of a request for core.

Documentation on the Code Reference side of things can be initially made as a user contributed note, which could warrant being added as "More Information" (aka, an explanation).

If I've misunderstood, please reopen and cite some specific examples of what you had in mind.

This ticket was mentioned in PR #234 on WordPress/wporg-mu-plugins by adamwoodnz.

21 months ago

  • Keywords has-patch added

See #233

In we stopped deregistering the global styles in classic themes.

This means we don't need the patched styles for navigation links, that were added to mitigate an issue after some styles moved from CSS to JSON in Gutenberg 13.6.0.

Header styles back:

Footer styles back:

Note: See TracTickets for help on using tickets.