Making WordPress.org

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
Cc:

Description

As raised in question on WPSE http://wordpress.stackexchange.com/questions/124674/wordpress-objects-class-reference - 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
#4

  • Keywords has-patch added

See #233

In https://github.com/WordPress/wporg-mu-plugins/pull/230 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:
https://i0.wp.com/user-images.githubusercontent.com/1017872/182250661-0c6358a0-f09e-4158-b3bf-cb1b296436ba.jpg

Footer styles back:
https://i0.wp.com/user-images.githubusercontent.com/1017872/182250698-3e728e51-324a-4795-8961-7250bcd3c800.jpg

Note: See TracTickets for help on using tickets.