Make WordPress Core

Changeset 51292 for trunk


Ignore:
Timestamp:
06/30/2021 06:59:55 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for optional parameters in WP_Theme_JSON methods per the documentation standards.

Additionally:

  • Remove an empty line between @param and @return tags.
  • Correct alignment of @param tags.

Follow-up to [50959], [50973], [51149], [51284], [51289].

See #52628, #53461.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r51283 r51292  
    259259     *
    260260     * @param array $theme_json A structure that follows the theme.json schema.
    261      * @param string $origin What source of data this object represents. One of core, theme, or user. Default: theme.
     261     * @param string $origin    Optional. What source of data this object represents.
     262     *                          One of 'core', 'theme', or 'user'. Default 'theme'.
    262263     */
    263264    public function __construct( $theme_json = array(), $origin = 'theme' ) {
     
    422423     * @since 5.8.0
    423424     *
    424      * @param array $tree Input to process.
     425     * @param array $tree   Input to process.
    425426     * @param array $schema Schema to adhere to.
    426      *
    427427     * @return array Returns the modified $tree.
    428428     */
     
    485485     * @since 5.8.0
    486486     *
    487      * @param string $type Type of stylesheet we want accepts 'all', 'block_styles', and 'css_variables'.
    488      *
     487     * @param string $type Optional. Type of stylesheet we want. Accepts 'all',
     488     *                     'block_styles', and 'css_variables'. Default 'all'.
    489489     * @return string Stylesheet.
    490490     */
     
    542542     * @since 5.8.0
    543543     *
    544      * @param array $style_nodes Nodes with styles.
     544     * @param array $style_nodes   Nodes with styles.
    545545     * @param array $setting_nodes Nodes with settings.
    546      *
    547546     * @return string The new stylesheet.
    548547     */
     
    591590     *
    592591     * @param array $nodes Nodes with settings.
    593      *
    594592     * @return string The new stylesheet.
    595593     */
     
    618616     * @since 5.8.0
    619617     *
    620      * @param string $selector CSS selector.
     618     * @param string $selector     CSS selector.
    621619     * @param array  $declarations List of declarations.
    622      *
    623620     * @return string CSS ruleset.
    624621     */
     
    647644     * @since 5.8.0
    648645     *
    649      * @param string $selector Original selector.
     646     * @param string $selector  Original selector.
    650647     * @param string $to_append Selector to append.
    651      *
    652648     * @return string
    653649     */
     
    670666     * @param array  $preset_per_origin Array of presets keyed by origin.
    671667     * @param string $value_key         The property of the preset that contains its value.
    672      *
    673668     * @return array Array of presets where each key is a slug and each value is the preset value.
    674669     */
     
    700695     * @param array  $settings Settings to process.
    701696     * @param string $selector Selector wrapping the classes.
    702      *
    703697     * @return string The result of processing the presets.
    704698     */
     
    745739     *
    746740     * @param array $settings Settings to process.
    747      *
    748741     * @return array Returns the modified $declarations.
    749742     */
     
    777770     *
    778771     * @param array $settings Settings to process.
    779      *
    780772     * @return array Returns the modified $declarations.
    781773     */
     
    826818     * @since 5.8.0
    827819     *
    828      * @param array  $tree Input tree to process.
    829      * @param string $prefix Prefix to prepend to each variable. '' by default.
    830      * @param string $token Token to use between levels. '--' by default.
    831      *
     820     * @param array  $tree   Input tree to process.
     821     * @param string $prefix Optional. Prefix to prepend to each variable. Default empty string.
     822     * @param string $token  Optional. Token to use between levels. Default '--'.
    832823     * @return array The flattened tree.
    833824     */
     
    866857     *
    867858     * @param array $styles Styles to process.
    868      *
    869859     * @return array Returns the modified $declarations.
    870860     */
     
    918908     *
    919909     * @param array $metadata Description of the style property.
    920      *
    921      * @return boolean True if properties exists, false otherwise.
     910     * @return bool True if properties exists, false otherwise.
    922911     */
    923912    private static function has_properties( $metadata ) {
     
    939928     *
    940929     * @param array $styles Styles subtree.
    941      * @param array $path Which property to process.
    942      *
     930     * @param array $path   Which property to process.
    943931     * @return string Style property value.
    944932     */
     
    983971     *
    984972     * @param array $theme_json The tree to extract setting nodes from.
    985      * @param array $selectors List of selectors per block.
    986      *
     973     * @param array $selectors  List of selectors per block.
    987974     * @return array
    988975     */
     
    10371024     *
    10381025     * @param array $theme_json The tree to extract style nodes from.
    1039      * @param array $selectors List of selectors per block.
    1040      *
     1026     * @param array $selectors  List of selectors per block.
    10411027     * @return array
    10421028     */
Note: See TracChangeset for help on using the changeset viewer.