Make WordPress Core


Ignore:
Timestamp:
05/08/2023 05:30:41 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update code examples formatting in WP_HTML_Tag_Processor documentation.

Per the documentation standards, code samples should be created by indenting every line of the code by 4 spaces, with a blank line before and after. This matches the format used by the rest of core.

Follow-up to [55203], [55304], [55718], [55724].

Props juanmaguitar, coffee2code, azaozz, costdev, dmsnell, johnbillion, SergeyBiryukov.
Fixes #58028.

File:
1 edited

Legend:

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

    r55712 r55727  
    6767     * They are a unkeyed array of values such as:
    6868     *
    69      * ```php
    70      * array(
    71      *   array(
    72      *     'slug'      => 'unique-name-within-the-set',
    73      *     'name'      => 'Name for the UI',
    74      *     <value_key> => 'value'
    75      *   ),
    76      * )
    77      * ```
     69     *     array(
     70     *       array(
     71     *         'slug'      => 'unique-name-within-the-set',
     72     *         'name'      => 'Name for the UI',
     73     *         <value_key> => 'value'
     74     *       ),
     75     *     )
    7876     *
    7977     * This contains the necessary metadata to process them:
     
    25332531     * For metadata values that can either be booleans or paths to booleans, gets the value.
    25342532     *
    2535      * ```php
    2536      * $data = array(
    2537      *   'color' => array(
    2538      *     'defaultPalette' => true
    2539      *   )
    2540      * );
    2541      *
    2542      * static::get_metadata_boolean( $data, false );
    2543      * // => false
    2544      *
    2545      * static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
    2546      * // => true
    2547      * ```
     2533     *     $data = array(
     2534     *       'color' => array(
     2535     *         'defaultPalette' => true
     2536     *       )
     2537     *     );
     2538     *
     2539     *     static::get_metadata_boolean( $data, false );
     2540     *     // => false
     2541     *
     2542     *     static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
     2543     *     // => true
    25482544     *
    25492545     * @since 6.0.0
Note: See TracChangeset for help on using the changeset viewer.