Changeset 55729 for branches/6.2/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 05/08/2023 07:57:47 PM (17 months ago)
- 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 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: … … 2532 2530 * For metadata values that can either be booleans or paths to booleans, gets the value. 2533 2531 * 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 2547 2543 * 2548 2544 * @since 6.0.0
Note: See TracChangeset
for help on using the changeset viewer.