Changeset 56028 for trunk/src/wp-includes/block-supports/elements.php
- Timestamp:
- 06/26/2023 01:13:56 AM (2 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.