Make WordPress Core


Ignore:
Timestamp:
05/08/2023 07:57:47 PM (11 months 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.
Merges [55727] to the 6.2 branch.
Fixes #58028.

Location:
branches/6.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.2

  • branches/6.2/src/wp-includes/class-wp-theme-json.php

    r55349 r55729  
    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:
     
    25322530     * For metadata values that can either be booleans or paths to booleans, gets the value.
    25332531     *
    2534      * ```php
    2535      * $data = array(
    2536      *   'color' => array(
    2537      *     'defaultPalette' => true
    2538      *   )
    2539      * );
    2540      *
    2541      * static::get_metadata_boolean( $data, false );
    2542      * // => false
    2543      *
    2544      * static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
    2545      * // => true
    2546      * ```
     2532     *     $data = array(
     2533     *       'color' => array(
     2534     *         'defaultPalette' => true
     2535     *       )
     2536     *     );
     2537     *
     2538     *     static::get_metadata_boolean( $data, false );
     2539     *     // => false
     2540     *
     2541     *     static::get_metadata_boolean( $data, array( 'color', 'defaultPalette' ) );
     2542     *     // => true
    25472543     *
    25482544     * @since 6.0.0
Note: See TracChangeset for help on using the changeset viewer.