Changeset 56710 for trunk/src/wp-includes/blocks/post-featured-image.php
- Timestamp:
- 09/26/2023 02:20:18 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/post-featured-image.php
r56065 r56710 19 19 } 20 20 $post_ID = $block->context['postId']; 21 22 // Check is needed for backward compatibility with third-party plugins23 // that might rely on the `in_the_loop` check; calling `the_post` sets it to true.24 if ( ! in_the_loop() && have_posts() ) {25 the_post();26 }27 21 28 22 $is_link = isset( $attributes['isLink'] ) && $attributes['isLink']; … … 191 185 // Border color. 192 186 $preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null; 193 $custom_color = _wp_array_get( $attributes, array( 'style', 'border', 'color' ), null );187 $custom_color = $attributes['style']['border']['color'] ?? null; 194 188 $border_styles['color'] = $preset_color ? $preset_color : $custom_color; 195 189 196 190 // Individual border styles e.g. top, left etc. 197 191 foreach ( $sides as $side ) { 198 $border = _wp_array_get( $attributes, array( 'style', 'border', $side ), null );192 $border = $attributes['style']['border'][ $side ] ?? null; 199 193 $border_styles[ $side ] = array( 200 194 'color' => isset( $border['color'] ) ? $border['color'] : null,
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)