Changeset 57491 for trunk/src/wp-includes/class-wp-theme-json.php
- Timestamp:
- 01/31/2024 02:52:25 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json.php
r57490 r57491 205 205 * @since 6.3.0 Added `column-count` property. 206 206 * @since 6.4.0 Added `writing-mode` property. 207 * @since 6.5.0 Added `aspect-ratio` property. 207 208 * 208 209 * @var array 209 210 */ 210 211 const PROPERTIES_METADATA = array( 212 'aspect-ratio' => array( 'dimensions', 'aspectRatio' ), 211 213 'background' => array( 'color', 'gradient' ), 212 214 'background-color' => array( 'color', 'background' ), … … 345 347 * @since 6.4.0 Added support for `layout.allowEditing`, `background.backgroundImage`, 346 348 * `typography.writingMode`, `lightbox.enabled` and `lightbox.allowEditing`. 347 * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize` and348 * `background.backgroundSize` .349 * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`, 350 * `background.backgroundSize` and `dimensions.aspectRatio`. 349 351 * @var array 350 352 */ … … 381 383 'custom' => null, 382 384 'dimensions' => array( 383 'minHeight' => null, 385 'aspectRatio' => null, 386 'minHeight' => null, 384 387 ), 385 388 'layout' => array( … … 439 442 * @since 6.2.0 Added `outline`, and `minHeight` properties. 440 443 * @since 6.3.0 Added support for `typography.textColumns`. 444 * @since 6.5.0 Added support for `dimensions.aspectRatio`. 441 445 * 442 446 * @var array … … 459 463 ), 460 464 'dimensions' => array( 461 'minHeight' => null, 465 'aspectRatio' => null, 466 'minHeight' => null, 462 467 ), 463 468 'filter' => array( … … 576 581 * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`. 577 582 * @since 6.4.0 Added `background.backgroundImage`. 578 * @since 6.5.0 Added `background.backgroundSize` .583 * @since 6.5.0 Added `background.backgroundSize` and `dimensions.aspectRatio`. 579 584 * @var array 580 585 */ … … 590 595 array( 'color', 'button' ), 591 596 array( 'color', 'caption' ), 597 array( 'dimensions', 'aspectRatio' ), 592 598 array( 'dimensions', 'minHeight' ), 593 599 array( 'position', 'sticky' ), … … 1922 1928 * @since 5.9.0 Added the `$settings` and `$properties` parameters. 1923 1929 * @since 6.1.0 Added `$theme_json`, `$selector`, and `$use_root_padding` parameters. 1930 * @since 6.5.0 Output a `min-height: unset` rule when `aspect-ratio` is set. 1924 1931 * 1925 1932 * @param array $styles Styles to process. … … 1991 1998 */ 1992 1999 $value = wp_get_typography_font_size_value( array( 'size' => $value ) ); 2000 } 2001 2002 if ( 'aspect-ratio' === $css_property ) { 2003 // For aspect ratio to work, other dimensions rules must be unset. 2004 // This ensures that a fixed height does not override the aspect ratio. 2005 $declarations[] = array( 2006 'name' => 'min-height', 2007 'value' => 'unset', 2008 ); 1993 2009 } 1994 2010
Note: See TracChangeset
for help on using the changeset viewer.