Bundled Theme: Add missing dimension attributes to images in Twenty Twenty-Two patterns.
The dimension attributes `width` and `height` should be present on every image in order to avoid layout shifts and be able to leverage WordPress core's image loading optimization functionality. This changeset adds dimension attributes to the `core/image` blocks used in block patterns in Twenty Twenty-Two, where this is particularly critical as WordPress core cannot backfill the attributes for those images, as their sources are not part of the Media Library. Props spacedmonkey, thekt12, mukesh27, flixos90. Fixes #59256. Built from https://develop.svn.wordpress.org/trunk@56613 git-svn-id: http://core.svn.wordpress.org/trunk@56125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
56b5244fdb
commit
90a29fbc46
|
@ -6,8 +6,8 @@ return array(
|
||||||
'title' => __( 'Divider with image and color (dark)', 'twentytwentytwo' ),
|
'title' => __( 'Divider with image and color (dark)', 'twentytwentytwo' ),
|
||||||
'categories' => array( 'featured' ),
|
'categories' => array( 'featured' ),
|
||||||
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"1rem","right":"0px","bottom":"1rem","left":"0px"}}},"backgroundColor":"primary"} -->
|
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"1rem","right":"0px","bottom":"1rem","left":"0px"}}},"backgroundColor":"primary"} -->
|
||||||
<div class="wp-block-group alignfull has-primary-background-color has-background" style="padding-top:1rem;padding-right:0px;padding-bottom:1rem;padding-left:0px"><!-- wp:image {"id":473,"sizeSlug":"full","linkDestination":"none"} -->
|
<div class="wp-block-group alignfull has-primary-background-color has-background" style="padding-top:1rem;padding-right:0px;padding-bottom:1rem;padding-left:0px"><!-- wp:image {"id":473,"width":3001,"height":246,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/divider-white.png" alt="" class="wp-image-473"/></figure>
|
<figure class="wp-block-image size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/divider-white.png" alt="" class="wp-image-473" width="3001" height="246"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:group -->',
|
<!-- /wp:group -->',
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,8 +6,8 @@ return array(
|
||||||
'title' => __( 'Divider with image and color (light)', 'twentytwentytwo' ),
|
'title' => __( 'Divider with image and color (light)', 'twentytwentytwo' ),
|
||||||
'categories' => array( 'featured' ),
|
'categories' => array( 'featured' ),
|
||||||
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"1rem","right":"0px","bottom":"1rem","left":"0px"}}},"backgroundColor":"secondary"} -->
|
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"1rem","right":"0px","bottom":"1rem","left":"0px"}}},"backgroundColor":"secondary"} -->
|
||||||
<div class="wp-block-group alignfull has-secondary-background-color has-background" style="padding-top:1rem;padding-right:0px;padding-bottom:1rem;padding-left:0px"><!-- wp:image {"id":473,"sizeSlug":"full","linkDestination":"none"} -->
|
<div class="wp-block-group alignfull has-secondary-background-color has-background" style="padding-top:1rem;padding-right:0px;padding-bottom:1rem;padding-left:0px"><!-- wp:image {"id":473,"width":3001,"height":246,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/divider-black.png" alt="" class="wp-image-473"/></figure>
|
<figure class="wp-block-image size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/divider-black.png" alt="" class="wp-image-473" width="3001" height="246"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:group -->',
|
<!-- /wp:group -->',
|
||||||
);
|
);
|
||||||
|
|
|
@ -7,14 +7,14 @@ return array(
|
||||||
'categories' => array( 'featured', 'columns', 'gallery' ),
|
'categories' => array( 'featured', 'columns', 'gallery' ),
|
||||||
'content' => '<!-- wp:columns {"align":"wide"} -->
|
'content' => '<!-- wp:columns {"align":"wide"} -->
|
||||||
<div class="wp-block-columns alignwide"><!-- wp:column {"style":{"spacing":{"padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"}}}} -->
|
<div class="wp-block-columns alignwide"><!-- wp:column {"style":{"spacing":{"padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"}}}} -->
|
||||||
<div class="wp-block-column" style="padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:image {"sizeSlug":"large"} -->
|
<div class="wp-block-column" style="padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:image {"width":984,"height":1426,"sizeSlug":"large"} -->
|
||||||
<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a bird sitting on a branch.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image size-large is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a bird sitting on a branch.', 'twentytwentytwo' ) . '" width="984" height="1426"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:column -->
|
<!-- /wp:column -->
|
||||||
|
|
||||||
<!-- wp:column {"style":{"spacing":{"padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"}}}} -->
|
<!-- wp:column {"style":{"spacing":{"padding":{"top":"0rem","right":"0rem","bottom":"0rem","left":"0rem"}}}} -->
|
||||||
<div class="wp-block-column" style="padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:image {"sizeSlug":"large"} -->
|
<div class="wp-block-column" style="padding-top:0rem;padding-right:0rem;padding-bottom:0rem;padding-left:0rem"><!-- wp:image {"width":984,"height":1426,"sizeSlug":"large"} -->
|
||||||
<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-green.jpg" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image size-large is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-green.jpg" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="984" height="1426"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:spacer {"height":30} -->
|
<!-- wp:spacer {"height":30} -->
|
||||||
|
|
|
@ -6,8 +6,8 @@ return array(
|
||||||
'title' => __( 'Wide image with introduction and buttons', 'twentytwentytwo' ),
|
'title' => __( 'Wide image with introduction and buttons', 'twentytwentytwo' ),
|
||||||
'categories' => array( 'featured', 'columns' ),
|
'categories' => array( 'featured', 'columns' ),
|
||||||
'content' => '<!-- wp:group {"align":"wide"} -->
|
'content' => '<!-- wp:group {"align":"wide"} -->
|
||||||
<div class="wp-block-group alignwide"><!-- wp:image {"sizeSlug":"large"} -->
|
<div class="wp-block-group alignwide"><!-- wp:image {"width":2100,"height":994,"sizeSlug":"large"} -->
|
||||||
<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-gray-a.jpg" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image size-large is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-gray-a.jpg" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="2100" height="994"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:columns {"verticalAlignment":null} -->
|
<!-- wp:columns {"verticalAlignment":null} -->
|
||||||
|
|
|
@ -25,8 +25,8 @@ return array(
|
||||||
<!-- /wp:heading --></div>
|
<!-- /wp:heading --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
|
|
||||||
<!-- wp:image {"align":"full","sizeSlug":"full","linkDestination":"none"} -->
|
<!-- wp:image {"align":"full","width":2400,"height":1020,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image alignfull size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-c.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignfull size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-c.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="2400" height="1020"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:group --><!-- wp:spacer {"height":66} -->
|
<!-- /wp:group --><!-- wp:spacer {"height":66} -->
|
||||||
<div style="height:66px" aria-hidden="true" class="wp-block-spacer"></div>
|
<div style="height:66px" aria-hidden="true" class="wp-block-spacer"></div>
|
||||||
|
|
|
@ -21,8 +21,8 @@ return array(
|
||||||
<!-- /wp:group --></div>
|
<!-- /wp:group --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
|
|
||||||
<!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none"} -->
|
<!-- wp:image {"align":"wide","width":2000,"height":474,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image alignwide size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-d.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignwide size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-d.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="2000" height="474"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
<!-- wp:spacer {"height":66} -->
|
<!-- wp:spacer {"height":66} -->
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
return array(
|
return array(
|
||||||
'title' => __( 'Heading and bird image', 'twentytwentytwo' ),
|
'title' => __( 'Heading and bird image', 'twentytwentytwo' ),
|
||||||
'inserter' => false,
|
'inserter' => false,
|
||||||
'content' => '<!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none"} -->
|
'content' => '<!-- wp:image {"align":"wide","width":2000,"height":474,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image alignwide size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-d.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignwide size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-d.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="2000" height="474"/></figure>
|
||||||
<!-- /wp:image -->',
|
<!-- /wp:image -->',
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,7 @@ return array(
|
||||||
<!-- /wp:heading --></div>
|
<!-- /wp:heading --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
|
|
||||||
<!-- wp:image {"align":"full","sizeSlug":"full","linkDestination":"none"} -->
|
<!-- wp:image {"align":"full","width":2400,"height":1020,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image alignfull size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-c.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignfull size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-c.png" alt="' . esc_attr__( 'Illustration of a bird flying.', 'twentytwentytwo' ) . '" width="2400" height="1020"/></figure>
|
||||||
<!-- /wp:image -->',
|
<!-- /wp:image -->',
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,8 +6,8 @@ return array(
|
||||||
'title' => __( 'About page with large image and buttons', 'twentytwentytwo' ),
|
'title' => __( 'About page with large image and buttons', 'twentytwentytwo' ),
|
||||||
'categories' => array( 'pages', 'buttons' ),
|
'categories' => array( 'pages', 'buttons' ),
|
||||||
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--small, 1.25rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} -->
|
'content' => '<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"var(--wp--custom--spacing--small, 1.25rem)","bottom":"var(--wp--custom--spacing--small, 1.25rem)"}}},"layout":{"inherit":true}} -->
|
||||||
<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)"><!-- wp:image {"align":"wide","sizeSlug":"full","linkDestination":"none"} -->
|
<div class="wp-block-group alignfull" style="padding-top:var(--wp--custom--spacing--small, 1.25rem);padding-bottom:var(--wp--custom--spacing--small, 1.25rem)"><!-- wp:image {"align":"wide","width":2100,"height":1260,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image alignwide size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-gray-b.jpg" alt=""/></figure>
|
<figure class="wp-block-image alignwide size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-gray-b.jpg" alt="" width="2100" height="1260"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:columns {"align":"wide"} -->
|
<!-- wp:columns {"align":"wide"} -->
|
||||||
|
|
|
@ -11,8 +11,8 @@ return array(
|
||||||
<!-- /wp:heading --></div>
|
<!-- /wp:heading --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
|
|
||||||
<!-- wp:image {"align":"full","style":{"color":{}}} -->
|
<!-- wp:image {"align":"full","width":2400,"height":1800,"style":{"color":{}}} -->
|
||||||
<figure class="wp-block-image alignfull"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-b.png" alt="' . esc_attr_x( 'TBD', 'Short for to be determined', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignfull is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-b.png" alt="' . esc_attr_x( 'TBD', 'Short for to be determined', 'twentytwentytwo' ) . '" width="2400" height="1800"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"2rem","bottom":"var(--wp--custom--spacing--large, 8rem)"}}},"layout":{"inherit":true}} -->
|
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"top":"2rem","bottom":"var(--wp--custom--spacing--large, 8rem)"}}},"layout":{"inherit":true}} -->
|
||||||
|
|
|
@ -38,8 +38,8 @@ return array(
|
||||||
<!-- /wp:columns --></div>
|
<!-- /wp:columns --></div>
|
||||||
<!-- /wp:group -->
|
<!-- /wp:group -->
|
||||||
|
|
||||||
<!-- wp:image {"align":"full","style":{"color":{}}} -->
|
<!-- wp:image {"align":"full","width":2400,"height":1178,"style":{"color":{}}} -->
|
||||||
<figure class="wp-block-image alignfull"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-a.png" alt="' . esc_attr__( 'An illustration of a bird in flight', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image alignfull is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-transparent-a.png" alt="' . esc_attr__( 'An illustration of a bird in flight', 'twentytwentytwo' ) . '" width="2400" height="1178"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
|
<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
|
||||||
|
|
|
@ -54,8 +54,8 @@ return array(
|
||||||
<!-- /wp:column -->
|
<!-- /wp:column -->
|
||||||
|
|
||||||
<!-- wp:column {"width":"33.33%"} -->
|
<!-- wp:column {"width":"33.33%"} -->
|
||||||
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
|
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:image {"width":768,"height":1160,"sizeSlug":"large","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image size-large"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a flying bird.', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image size-large is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/flight-path-on-salmon.jpg" alt="' . esc_attr__( 'Illustration of a flying bird.', 'twentytwentytwo' ) . '" width="768" height="1160"/></figure>
|
||||||
<!-- /wp:image -->
|
<!-- /wp:image -->
|
||||||
|
|
||||||
<!-- wp:spacer {"height":4} -->
|
<!-- wp:spacer {"height":4} -->
|
||||||
|
|
|
@ -22,8 +22,8 @@ return array(
|
||||||
|
|
||||||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":"5%"}}} -->
|
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":"5%"}}} -->
|
||||||
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"70%","style":{"spacing":{"padding":{"bottom":"32px"}}}} -->
|
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"70%","style":{"spacing":{"padding":{"bottom":"32px"}}}} -->
|
||||||
<div class="wp-block-column" style="padding-bottom:32px;flex-basis:70%"><!-- wp:image {"sizeSlug":"full","linkDestination":"none"} -->
|
<div class="wp-block-column" style="padding-bottom:32px;flex-basis:70%"><!-- wp:image {"width":984,"height":1426,"sizeSlug":"full","linkDestination":"none"} -->
|
||||||
<figure class="wp-block-image size-full"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg" alt="' . esc_attr__( 'Image of a bird on a branch', 'twentytwentytwo' ) . '"/></figure>
|
<figure class="wp-block-image size-full is-resized"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/bird-on-salmon.jpg" alt="' . esc_attr__( 'Image of a bird on a branch', 'twentytwentytwo' ) . '" width="984" height="1426"/></figure>
|
||||||
<!-- /wp:image --></div>
|
<!-- /wp:image --></div>
|
||||||
<!-- /wp:column -->
|
<!-- /wp:column -->
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.4-alpha-56612';
|
$wp_version = '6.4-alpha-56613';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue