Make WordPress Core

Changeset 51221


Ignore:
Timestamp:
06/23/2021 07:04:51 PM (5 years ago)
Author:
desrosj
Message:

Docs: Various docblock corrections for code added in 5.8.

Props johnbillion.
See #53461.

Location:
trunk/src/wp-includes
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r51213 r51221  
    1111 * Returns the list of default categories for block types.
    1212 *
    13  * @since 5.8.0.
     13 * @since 5.8.0
    1414 *
    1515 * @return array[] Array of categories for block types.
  • trunk/src/wp-includes/block-supports/border.php

    r50929 r51221  
    4646 * @access private
    4747 *
    48  * @param WP_Block_type $block_type       Block type.
     48 * @param WP_Block_Type $block_type       Block type.
    4949 * @param array         $block_attributes Block attributes.
    5050 *
     
    124124 * @access private
    125125 *
    126  * @param WP_Block_type $block_type Block type.
     126 * @param WP_Block_Type $block_type Block type.
    127127 *
    128128 * @return boolean
  • trunk/src/wp-includes/block-template-utils.php

    r51144 r51221  
    5757 *     @type int    $wp_id Post ID of customized template.
    5858 * }
    59  * @param string $template_type wp_template.
    60  *
    61  * @return array Templates.
     59 * @param string $template_type Optional. The template type (post type). Default 'wp_template'.
     60 * @return WP_Block_Template[] Block template objects.
    6261 */
    6362function get_block_templates( $query = array(), $template_type = 'wp_template' ) {
  • trunk/src/wp-includes/block-template.php

    r51168 r51221  
    9494 * @since 5.8.0
    9595 *
    96  * Accepts an optional $template_hierarchy argument as a hint.
    97  *
    9896 * @param string   $template_type      The current template type.
    99  * @param string[] $template_hierarchy (optional) The current template hierarchy, ordered by priority.
     97 * @param string[] $template_hierarchy The current template hierarchy, ordered by priority.
    10098 * @return WP_Block_Template|null template A template object, or null if none could be found.
    10199 */
     
    188186 * Renders a 'viewport' meta tag.
    189187 *
    190  * @access private
    191  * @since 5.8.0
    192  *
    193188 * This is hooked into {@see 'wp_head'} to decouple its output from the default template canvas.
     189 *
     190 * @access private
     191 * @since 5.8.0
    194192 */
    195193function _block_template_viewport_meta_tag() {
  • trunk/src/wp-includes/blocks.php

    r51167 r51221  
    215215        /**
    216216         * Add `style` and `editor_style` for core blocks if missing.
    217          *
    218          * @since 5.8.0
    219217         */
    220218        if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) {
  • trunk/src/wp-includes/class-wp-image-editor.php

    r50951 r51221  
    327327                 * @since 5.8.0
    328328                 *
    329                  * @param array $output_format {
     329                 * @param string[] $output_format {
    330330                 *     An array of mime type mappings. Maps a source mime type to a new
    331331                 *     destination mime type. Default empty array.
    332332                 *
    333                  *     @type array $mime_type The source mime type {
    334                  *         @type string $mime_type The new mime type.
    335                  *     }
     333                 *     @type string ...$0 The new mime type.
     334                 * }
    336335                 * @param string $filename  Path to the image.
    337336                 * @param string $mime_type The source image mime type.
  • trunk/src/wp-includes/class-wp-theme-json-resolver.php

    r51149 r51221  
    266266         * @since 5.8.0
    267267         *
    268          * @param array $theme_support_data Theme support data in theme.json format.
     268         * @param array $theme_support_data Theme support data in theme.json format. Default empty array.
    269269         * @return WP_Theme_JSON Entity that holds theme data.
    270270         */
     
    319319         * Whether the current theme has a theme.json file.
    320320         *
    321          * @return boolean
     321         * @since 5.8.0
     322         *
     323         * @return bool
    322324         */
    323325        public static function theme_has_support() {
  • trunk/src/wp-includes/class-wp-theme-json.php

    r51198 r51221  
    356356         * Example:
    357357         *
    358          * {
    359          *   'core/paragraph': {
    360          *     'selector': 'p',
    361          *     'elements': {
    362          *       'link' => 'link selector',
    363          *       'etc'  => 'element selector'
     358         *     {
     359         *       'core/paragraph': {
     360         *         'selector': 'p',
     361         *         'elements': {
     362         *           'link' => 'link selector',
     363         *           'etc'  => 'element selector'
     364         *         }
     365         *       },
     366         *       'core/heading': {
     367         *         'selector': 'h1',
     368         *         'elements': {}
     369         *       }
     370         *       'core/group': {
     371         *         'selector': '.wp-block-group',
     372         *         'elements': {}
     373         *       }
    364374         *     }
    365          *   },
    366          *   'core/heading': {
    367          *     'selector': 'h1',
    368          *     'elements': {}
    369          *   }
    370          *   'core/group': {
    371          *     'selector': '.wp-block-group',
    372          *     'elements': {}
    373          *   }
    374          * }
    375375         *
    376376         * @since 5.8.0
     
    518518         * as classes for each preset value such as:
    519519         *
    520          *   .has-value-color {
    521          *     color: value;
    522          *   }
    523          *
    524          *   .has-value-background-color {
    525          *     background-color: value;
    526          *   }
    527          *
    528          *   .has-value-font-size {
    529          *     font-size: value;
    530          *   }
    531          *
    532          *   .has-value-gradient-background {
    533          *     background: value;
    534          *   }
    535          *
    536          *   p.has-value-gradient-background {
    537          *     background: value;
    538          *   }
     520         *     .has-value-color {
     521         *       color: value;
     522         *     }
     523         *
     524         *     .has-value-background-color {
     525         *       background-color: value;
     526         *     }
     527         *
     528         *     .has-value-font-size {
     529         *       font-size: value;
     530         *     }
     531         *
     532         *     .has-value-gradient-background {
     533         *       background: value;
     534         *     }
     535         *
     536         *     p.has-value-gradient-background {
     537         *       background: value;
     538         *     }
    539539         *
    540540         * @since 5.8.0
     
    581581         * For each section this creates a new ruleset such as:
    582582         *
    583          *   block-selector {
    584          *     --wp--preset--category--slug: value;
    585          *     --wp--custom--variable: value;
    586          *   }
     583         *     block-selector {
     584         *       --wp--preset--category--slug: value;
     585         *       --wp--custom--variable: value;
     586         *     }
    587587         *
    588588         * @since 5.8.0
     
    613613         * Given a selector and a declaration list,
    614614         * creates the corresponding ruleset.
    615          *
    616          * To help debugging, will add some space
    617          * if SCRIPT_DEBUG is defined and true.
    618615         *
    619616         * @since 5.8.0
     
    732729         * following the format:
    733730         *
    734          * ```php
    735          * array(
    736          *   'name'  => 'property_name',
    737          *   'value' => 'property_value,
    738          * )
    739          * ```
     731         *     array(
     732         *       'name'  => 'property_name',
     733         *       'value' => 'property_value,
     734         *     )
    740735         *
    741736         * @since 5.8.0
     
    766761         * array following the format:
    767762         *
    768          * ```php
    769          * array(
    770          *   'name'  => 'property_name',
    771          *   'value' => 'property_value,
    772          * )
    773          * ```
     763         *     array(
     764         *       'name'  => 'property_name',
     765         *       'value' => 'property_value,
     766         *     )
    774767         *
    775768         * @since 5.8.0
     
    809802         * and the token is '--', for this input tree:
    810803         *
    811          * {
    812          *   'some/property': 'value',
    813          *   'nestedProperty': {
    814          *     'sub-property': 'value'
    815          *   }
    816          * }
     804         *     {
     805         *       'some/property': 'value',
     806         *       'nestedProperty': {
     807         *         'sub-property': 'value'
     808         *       }
     809         *     }
    817810         *
    818811         * it'll return this output:
    819812         *
    820          * {
    821          *   '--wp--some-property': 'value',
    822          *   '--wp--nested-property--sub-property': 'value'
    823          * }
     813         *     {
     814         *       '--wp--some-property': 'value',
     815         *       '--wp--nested-property--sub-property': 'value'
     816         *     }
    824817         *
    825818         * @since 5.8.0
     
    857850         * and adds them to the $declarations array following the format:
    858851         *
    859          * ```php
    860          * array(
    861          *   'name'  => 'property_name',
    862          *   'value' => 'property_value,
    863          * )
    864          * ```
     852         *     array(
     853         *       'name'  => 'property_name',
     854         *       'value' => 'property_value,
     855         *     )
    865856         *
    866857         * @since 5.8.0
     
    968959         * Builds metadata for the setting nodes, which returns in the form of:
    969960         *
    970          * [
    971          *   [
    972          *     'path'     => ['path', 'to', 'some', 'node' ],
    973          *     'selector' => 'CSS selector for some node'
    974          *   ],
    975          *   [
    976          *     'path'     => [ 'path', 'to', 'other', 'node' ],
    977          *     'selector' => 'CSS selector for other node'
    978          *   ],
    979          * ]
     961         *     [
     962         *       [
     963         *         'path'     => ['path', 'to', 'some', 'node' ],
     964         *         'selector' => 'CSS selector for some node'
     965         *       ],
     966         *       [
     967         *         'path'     => [ 'path', 'to', 'other', 'node' ],
     968         *         'selector' => 'CSS selector for other node'
     969         *       ],
     970         *     ]
    980971         *
    981972         * @since 5.8.0
     
    10221013         * Builds metadata for the style nodes, which returns in the form of:
    10231014         *
    1024          * [
    1025          *   [
    1026          *     'path'     => [ 'path', 'to', 'some', 'node' ],
    1027          *     'selector' => 'CSS selector for some node'
    1028          *   ],
    1029          *   [
    1030          *     'path'     => ['path', 'to', 'other', 'node' ],
    1031          *     'selector' => 'CSS selector for other node'
    1032          *   ],
    1033          * ]
     1015         *     [
     1016         *       [
     1017         *         'path'     => [ 'path', 'to', 'some', 'node' ],
     1018         *         'selector' => 'CSS selector for some node'
     1019         *       ],
     1020         *       [
     1021         *         'path'     => ['path', 'to', 'other', 'node' ],
     1022         *         'selector' => 'CSS selector for other node'
     1023         *       ],
     1024         *     ]
    10341025         *
    10351026         * @since 5.8.0
  • trunk/src/wp-includes/load.php

    r51087 r51221  
    668668
    669669        /**
    670          * Filters whether to enable loading of the objectcache.php drop-in.
     670         * Filters whether to enable loading of the object-cache.php drop-in.
    671671         *
    672672         * This filter runs before it can be used by plugins. It is designed for non-web
  • trunk/src/wp-includes/media.php

    r51122 r51221  
    43574357         * @since 5.8.0
    43584358         *
    4359          * @param bool $value The filtered value, defaults to `false`.
     4359         * @param bool $infinite Whether the Media Library grid has infinite scrolling.
    43604360         */
    43614361        $infinite_scrolling = apply_filters( 'media_library_infinite_scrolling', false );
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php

    r51003 r51221  
    4343         *
    4444         * @since 5.8.0
    45          *
    46          * @return void
    4745         */
    4846        public function register_routes() {
  • trunk/src/wp-includes/script-loader.php

    r51212 r51221  
    26042604         * @since 5.8.0
    26052605         *
    2606          * @param int $total_inline_limit The file-size threshold, in bytes. Defaults to 20000.
     2606         * @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
    26072607         */
    26082608        $total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );
  • trunk/src/wp-includes/widgets/class-wp-widget-block.php

    r51063 r51221  
    9999         * @since 5.8.0
    100100         *
    101          * @param array $content The HTML content of the current block widget.
     101         * @param string $content The HTML content of the current block widget.
    102102         *
    103103         * @return string The classname to use in the block widget's container HTML.
     
    192192         * @since 5.8.0
    193193         *
     194         * @see WP_Widget_Custom_HTML::render_control_template_scripts()
     195         *
    194196         * @param array $instance Current instance.
    195          *
    196          * @see WP_Widget_Custom_HTML::render_control_template_scripts()
    197197         */
    198198        public function form( $instance ) {
Note: See TracChangeset for help on using the changeset viewer.