@wordpress/block-library 7.3.14 → 7.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.16",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "7393fd70d45a590e6f7d2f7ae1ace64e171f9ecf"
|
|
78
78
|
}
|
package/src/navigation/index.php
CHANGED
|
@@ -626,7 +626,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
|
|
626
626
|
__( 'Close menu' ), // Close button label.
|
|
627
627
|
esc_attr( implode( ' ', $responsive_container_classes ) ),
|
|
628
628
|
esc_attr( implode( ' ', $open_button_classes ) ),
|
|
629
|
-
safecss_filter_attr( $colors['overlay_inline_styles'] ),
|
|
629
|
+
esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ),
|
|
630
630
|
__( 'Menu' ),
|
|
631
631
|
$toggle_button_content
|
|
632
632
|
);
|
|
@@ -45,7 +45,7 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
45
45
|
if ( ! empty( $attributes['scale'] ) ) {
|
|
46
46
|
$image_styles .= "object-fit:{$attributes['scale']};";
|
|
47
47
|
}
|
|
48
|
-
$featured_image = str_replace( '
|
|
48
|
+
$featured_image = str_replace( '<img ', '<img style="' . esc_attr( safecss_filter_attr( $image_styles ) ) . '" ', $featured_image );
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
return "<figure $wrapper_attributes>$featured_image</figure>";
|
package/src/rss/index.php
CHANGED
|
@@ -20,7 +20,7 @@ function render_block_core_rss( $attributes ) {
|
|
|
20
20
|
$rss = fetch_feed( $attributes['feedURL'] );
|
|
21
21
|
|
|
22
22
|
if ( is_wp_error( $rss ) ) {
|
|
23
|
-
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . $rss->get_error_message() . '</div></div>';
|
|
23
|
+
return '<div class="components-placeholder"><div class="notice notice-error"><strong>' . __( 'RSS Error:' ) . '</strong> ' . esc_html( $rss->get_error_message() ) . '</div></div>';
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if ( ! $rss->get_item_quantity() ) {
|
|
@@ -48,8 +48,8 @@ function render_block_core_rss( $attributes ) {
|
|
|
48
48
|
if ( $date ) {
|
|
49
49
|
$date = sprintf(
|
|
50
50
|
'<time datetime="%1$s" class="wp-block-rss__item-publish-date">%2$s</time> ',
|
|
51
|
-
date_i18n( get_option( 'c' ), $date ),
|
|
52
|
-
date_i18n( get_option( 'date_format' ), $date )
|
|
51
|
+
esc_attr( date_i18n( get_option( 'c' ), $date ) ),
|
|
52
|
+
esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
}
|
package/src/search/index.php
CHANGED
|
@@ -287,12 +287,12 @@ function styles_for_block_core_search( $attributes ) {
|
|
|
287
287
|
// Add color styles.
|
|
288
288
|
$has_text_color = ! empty( $attributes['style']['color']['text'] );
|
|
289
289
|
if ( $has_text_color ) {
|
|
290
|
-
$button_styles[] = sprintf( 'color: %s;',
|
|
290
|
+
$button_styles[] = sprintf( 'color: %s;', $attributes['style']['color']['text'] );
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
$has_background_color = ! empty( $attributes['style']['color']['background'] );
|
|
294
294
|
if ( $has_background_color ) {
|
|
295
|
-
$button_styles[] = sprintf( 'background-color: %s;',
|
|
295
|
+
$button_styles[] = sprintf( 'background-color: %s;', $attributes['style']['color']['background'] );
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
$has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
|
|
@@ -301,9 +301,9 @@ function styles_for_block_core_search( $attributes ) {
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
return array(
|
|
304
|
-
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $input_styles ) ) ) : '',
|
|
305
|
-
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $button_styles ) ) ) : '',
|
|
306
|
-
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) : '',
|
|
304
|
+
'input' => ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '',
|
|
305
|
+
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '',
|
|
306
|
+
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '',
|
|
307
307
|
);
|
|
308
308
|
}
|
|
309
309
|
|
|
@@ -128,14 +128,14 @@ function render_block_core_template_part( $attributes ) {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
// Run through the actions that are typically taken on the_content.
|
|
131
|
+
$content = shortcode_unautop( $content );
|
|
132
|
+
$content = do_shortcode( $content );
|
|
131
133
|
$seen_ids[ $template_part_id ] = true;
|
|
132
134
|
$content = do_blocks( $content );
|
|
133
135
|
unset( $seen_ids[ $template_part_id ] );
|
|
134
136
|
$content = wptexturize( $content );
|
|
135
137
|
$content = convert_smilies( $content );
|
|
136
|
-
$content = shortcode_unautop( $content );
|
|
137
138
|
$content = wp_filter_content_tags( $content );
|
|
138
|
-
$content = do_shortcode( $content );
|
|
139
139
|
|
|
140
140
|
// Handle embeds for block template parts.
|
|
141
141
|
global $wp_embed;
|