Changeset 56028
- Timestamp:
- 06/26/2023 01:13:56 AM (19 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/elements.php
r55235 r56028 47 47 } 48 48 49 $hover_link_color = null; 50 if ( ! empty( $block['attrs'] ) ) { 51 $hover_link_color = _wp_array_get( $block['attrs'], array( 'style', 'elements', 'link', ':hover', 'color', 'text' ), null ); 52 } 53 49 54 /* 50 * For now we only care about link color .55 * For now we only care about link colors. 51 56 * This code in the future when we have a public API 52 57 * should take advantage of WP_Theme_JSON::compute_style_properties 53 58 * and work for any element and style. 54 59 */ 55 if ( null === $link_color ) {60 if ( null === $link_color && null === $hover_link_color ) { 56 61 return $block_content; 57 62 } … … 105 110 ); 106 111 112 if ( isset( $link_block_styles[':hover'] ) ) { 113 wp_style_engine_get_styles( 114 $link_block_styles[':hover'], 115 array( 116 'selector' => ".$class_name a:hover", 117 'context' => 'block-supports', 118 ) 119 ); 120 } 121 107 122 return null; 108 123 } -
trunk/src/wp-includes/class-wp-theme-json.php
r55987 r56028 361 361 'gradients' => null, 362 362 'link' => null, 363 'heading' => null, 364 'button' => null, 365 'caption' => null, 363 366 'palette' => null, 364 367 'text' => null, … … 563 566 array( 'border', 'width' ), 564 567 array( 'color', 'link' ), 568 array( 'color', 'heading' ), 569 array( 'color', 'button' ), 570 array( 'color', 'caption' ), 565 571 array( 'dimensions', 'minHeight' ), 566 572 array( 'position', 'sticky' ), -
trunk/src/wp-includes/theme.json
r55975 r56028 12 12 "color": { 13 13 "background": true, 14 "button": true, 15 "caption": true, 14 16 "custom": true, 15 17 "customDuotone": true, … … 122 124 } 123 125 ], 126 "heading": true, 124 127 "link": false, 125 128 "palette": [ -
trunk/tests/phpunit/tests/theme/wpThemeJson.php
r55986 r56028 270 270 ), 271 271 'color' => array( 272 'link' => true, 272 'link' => true, 273 'heading' => true, 274 'button' => true, 275 'caption' => true, 273 276 ), 274 277 'dimensions' => array( … … 300 303 ), 301 304 'color' => array( 302 'link' => true, 305 'link' => true, 306 'heading' => true, 307 'button' => true, 308 'caption' => true, 303 309 ), 304 310 'dimensions' => array(
Note: See TracChangeset
for help on using the changeset viewer.