Changeset 51283
- Timestamp:
- 06/30/2021 04:22:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r51241 r51283 397 397 } 398 398 399 // Assign defaults, then overwrite those that the block sets by itself. 400 // If the block selector is compounded, will append the element to each 401 // individual block selector. 399 /* 400 * Assign defaults, then overwrite those that the block sets by itself. 401 * If the block selector is compounded, will append the element to each 402 * individual block selector. 403 */ 402 404 $block_selectors = explode( ',', self::$blocks_metadata[ $block_name ]['selector'] ); 403 405 foreach ( self::ELEMENTS as $el_name => $el_selector ) { … … 643 645 * "h1.some-class, h2.some-class, h3.some-class". 644 646 * 647 * @since 5.8.0 648 * 645 649 * @param string $selector Original selector. 646 650 * @param string $to_append Selector to append. … … 662 666 * it returns an array where each key is the preset slug and each value the preset value. 663 667 * 668 * @since 5.8.0 669 * 664 670 * @param array $preset_per_origin Array of presets keyed by origin. 665 671 * @param string $value_key The property of the preset that contains its value. … … 674 680 } 675 681 foreach ( $preset_per_origin[ $origin ] as $preset ) { 676 // We don't want to use kebabCase here, 677 // see https://github.com/WordPress/gutenberg/issues/32347 678 // However, we need to make sure the generated class or css variable 679 // doesn't contain spaces. 682 /* 683 * We don't want to use kebabCase here, 684 * see https://github.com/WordPress/gutenberg/issues/32347 685 * However, we need to make sure the generated class or CSS variable 686 * doesn't contain spaces. 687 */ 680 688 $result[ preg_replace( '/\s+/', '-', $preset['slug'] ) ] = $preset[ $value_key ]; 681 689 } … … 869 877 $properties = array(); 870 878 foreach ( self::PROPERTIES_METADATA as $name => $metadata ) { 871 // Some properties can be shorthand properties, meaning that 872 // they contain multiple values instead of a single one. 873 // An example of this is the padding property. 879 /* 880 * Some properties can be shorthand properties, meaning that 881 * they contain multiple values instead of a single one. 882 * An example of this is the padding property. 883 */ 874 884 if ( self::has_properties( $metadata ) ) { 875 885 foreach ( $metadata['properties'] as $property ) { … … 1083 1093 /** 1084 1094 * Merge new incoming data. 1095 * 1096 * @since 5.8.0 1085 1097 * 1086 1098 * @param WP_Theme_JSON $incoming Data to merge.
Note: See TracChangeset
for help on using the changeset viewer.