Skip to content

Commit 271a3b0

Browse files
committed
Merge branch 'trunk' into docs/nullable-props
2 parents 8710a69 + 2cf0f3d commit 271a3b0

File tree

14 files changed

+510
-367
lines changed

14 files changed

+510
-367
lines changed

Gruntfile.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ module.exports = function(grunt) {
5959
'!wp-includes/assets/script-modules-packages.min.php',
6060
],
6161

62+
// All workflow files that should be deleted from non-default branches.
63+
workflowFiles = [
64+
// Reusable workflows should be called from `trunk` within branches.
65+
'.github/workflows/reusable-*.yml',
66+
// These workflows are only intended to run from `trunk`.
67+
'.github/workflows/commit-built-file-changes.yml',
68+
'.github/workflows/failed-workflow.yml',
69+
'.github/workflows/install-testing.yml',
70+
'.github/workflows/test-and-zip-default-themes.yml',
71+
'.github/workflows/install-testing.yml',
72+
'.github/workflows/slack-notifications.yml',
73+
'.github/workflows/test-coverage.yml',
74+
'.github/workflows/test-old-branches.yml',
75+
'.github/workflows/upgrade-testing.yml'
76+
],
77+
6278
// Prepend `dir` to `file`, and keep `!` in place.
6379
setFilePath = function( dir, file ) {
6480
if ( '!' === file.charAt( 0 ) ) {
@@ -216,7 +232,18 @@ module.exports = function(grunt) {
216232
cwd: WORKING_DIR,
217233
src: []
218234
},
219-
qunit: ['tests/qunit/compiled.html']
235+
qunit: ['tests/qunit/compiled.html'],
236+
237+
// This is only meant to run within a numbered branch after branching has occurred.
238+
workflows: {
239+
filter: function() {
240+
var allowedTasks = [ 'post-branching', 'clean:workflows' ];
241+
return allowedTasks.some( function( task ) {
242+
return grunt.cli.tasks.indexOf( task ) !== -1;
243+
} );
244+
},
245+
src: workflowFiles
246+
},
220247
},
221248
file_append: {
222249
// grunt-file-append supports only strings for input and output.
@@ -1708,6 +1735,11 @@ module.exports = function(grunt) {
17081735
'copy:workflow-references-remote-to-local',
17091736
]);
17101737

1738+
grunt.registerTask( 'post-branching', [
1739+
'clean:workflows',
1740+
'replace:workflow-references-local-to-remote'
1741+
]);
1742+
17111743
/**
17121744
* Build verification tasks.
17131745
*/

src/wp-admin/includes/image.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,13 @@ function wp_read_image_metadata( $file ) {
827827
return false;
828828
}
829829

830-
list( , , $image_type ) = wp_getimagesize( $file );
830+
$image_size = wp_getimagesize( $file );
831+
832+
if ( false === $image_size ) {
833+
return false;
834+
}
835+
836+
list( , , $image_type ) = $image_size;
831837

832838
/*
833839
* EXIF contains a bunch of data we'll probably never need formatted in ways

src/wp-admin/includes/taxonomy.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ function get_category_to_edit( $id ) {
4848
*
4949
* @since 2.0.0
5050
*
51-
* @param int|string $cat_name Category name.
52-
* @param int $category_parent Optional. ID of parent category.
53-
* @return int|WP_Error
51+
* @param string $category_name Category name.
52+
* @param int $category_parent Optional. ID of parent category.
53+
* @return int The ID of category term on success, or zero on failure.
5454
*/
55-
function wp_create_category( $cat_name, $category_parent = 0 ) {
56-
$id = category_exists( $cat_name, $category_parent );
55+
function wp_create_category( $category_name, $category_parent = 0 ) {
56+
$id = category_exists( $category_name, $category_parent );
5757
if ( $id ) {
58-
return $id;
58+
return (int) $id;
5959
}
6060

6161
return wp_insert_category(
6262
array(
63-
'cat_name' => $cat_name,
63+
'cat_name' => $category_name,
6464
'category_parent' => $category_parent,
6565
)
6666
);

src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,10 @@
436436
}
437437
}
438438

439+
&.has-text-color cite {
440+
color: inherit;
441+
}
442+
439443
&.is-style-solid-color {
440444
background-color: $color__link;
441445
padding-left: 0;

src/wp-content/themes/twentynineteen/style-editor.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,12 @@ figcaption,
11031103
color: #767676;
11041104
}
11051105

1106+
.wp-block-pullquote.has-text-color .wp-block-pullquote__citation,
1107+
.wp-block-pullquote.has-primary-background-color blockquote p,
1108+
.wp-block-pullquote.has-dark-gray-background-color blockquote p {
1109+
color: inherit;
1110+
}
1111+
11061112
.wp-block-pullquote.is-style-solid-color blockquote {
11071113
width: calc(100% - (2 * 1rem));
11081114
max-width: calc( 100% - (2 * 1rem));

src/wp-content/themes/twentynineteen/style-editor.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ figcaption,
515515
color: $color__text-light;
516516
}
517517

518+
&.has-text-color .wp-block-pullquote__citation,
519+
&.has-primary-background-color blockquote p,
520+
&.has-dark-gray-background-color blockquote p {
521+
color: inherit;
522+
}
523+
518524
&.is-style-solid-color {
519525

520526
blockquote {

src/wp-content/themes/twentynineteen/style-rtl.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5758,6 +5758,10 @@ body.page .main-navigation {
57585758
margin-top: 0;
57595759
}
57605760

5761+
.entry .entry-content .wp-block-pullquote.has-text-color cite {
5762+
color: inherit;
5763+
}
5764+
57615765
.entry .entry-content .wp-block-pullquote.is-style-solid-color {
57625766
background-color: #0073aa;
57635767
padding-right: 0;

src/wp-content/themes/twentynineteen/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5770,6 +5770,10 @@ body.page .main-navigation {
57705770
margin-top: 0;
57715771
}
57725772

5773+
.entry .entry-content .wp-block-pullquote.has-text-color cite {
5774+
color: inherit;
5775+
}
5776+
57735777
.entry .entry-content .wp-block-pullquote.is-style-solid-color {
57745778
background-color: #0073aa;
57755779
padding-left: 0;

src/wp-includes/block-supports/block-visibility.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
function wp_render_block_visibility_support( $block_content, $block ) {
2020
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
2121

22-
if ( ! $block_type || ! block_has_support( $block_type, 'blockVisibility', true ) ) {
22+
if ( ! $block_type || ! block_has_support( $block_type, 'visibility', true ) ) {
2323
return $block_content;
2424
}
2525

src/wp-includes/class-wp-block-processor.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
* block, and re-serialize it into the original document. It’s possible to do so
195195
* while skipping over the parse of the rest of the document.
196196
*
197-
* {@see self::extract_block()} will scan forward from the current block opener
197+
* {@see self::extract_full_block_and_advance()} will scan forward from the current block opener
198198
* and build the parsed block structure until the current block is closed. It will
199199
* include all inner HTML and inner blocks, and parse all of the inner blocks. It
200200
* can be used to extract a block at any depth in the document, helpful for operating
@@ -207,7 +207,7 @@
207207
* }
208208
*
209209
* $gallery_at = $processor->get_span()->start;
210-
* $gallery_block = $processor->extract_block();
210+
* $gallery_block = $processor->extract_full_block_and_advance();
211211
* $after_gallery = $processor->get_span()->start;
212212
* return (
213213
* substr( $post_content, 0, $gallery_at ) .
@@ -1223,7 +1223,7 @@ public function get_depth(): int {
12231223
* }
12241224
*
12251225
* $gallery_at = $processor->get_span()->start;
1226-
* $gallery = $processor->extract_block();
1226+
* $gallery = $processor->extract_full_block_and_advance();
12271227
* $ends_before = $processor->get_span();
12281228
* $ends_before = $ends_before->start ?? strlen( $post_content );
12291229
*
@@ -1254,7 +1254,7 @@ public function get_depth(): int {
12541254
* }
12551255
* }
12561256
*/
1257-
public function extract_block(): ?array {
1257+
public function extract_full_block_and_advance(): ?array {
12581258
if ( $this->is_html() ) {
12591259
$chunk = $this->get_html_content();
12601260

@@ -1291,7 +1291,7 @@ public function extract_block(): ?array {
12911291
* @todo Use iteration instead of recursion, or at least refactor to tail-call form.
12921292
*/
12931293
if ( $this->opens_block() ) {
1294-
$inner_block = $this->extract_block();
1294+
$inner_block = $this->extract_full_block_and_advance();
12951295
$block['innerBlocks'][] = $inner_block;
12961296
$block['innerContent'][] = null;
12971297
}

0 commit comments

Comments
 (0)