Changeset 55727 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 05/08/2023 05:30:41 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r55712 r55727 67 67 * They are a unkeyed array of values such as: 68 68 * 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 * ) 78 76 * 79 77 * This contains the necessary metadata to process them: … … 2533 2531 * For metadata values that can either be booleans or paths to booleans, gets the value. 2534 2532 * 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 2548 2544 * 2549 2545 * @since 6.0.0
Note: See TracChangeset
for help on using the changeset viewer.