Skip to content

Commit dc8605d

Browse files
committed
Merge branch 'trunk' into fix/wp_create_category-return-type
2 parents 0b3c94b + cd301d0 commit dc8605d

File tree

7 files changed

+53
-3
lines changed

7 files changed

+53
-3
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,16 @@
804804
outline-offset: -4px;
805805
}
806806
}
807+
808+
&.aligncenter .wp-block-file__button {
809+
margin-left: auto;
810+
margin-right: auto;
811+
}
812+
813+
&.alignright .wp-block-file__button {
814+
margin-left: auto;
815+
margin-right: 0;
816+
}
807817
}
808818

809819
//! Code

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,16 @@ ul.wp-block-archives li ul,
13861386
text-align: center;
13871387
}
13881388

1389+
.wp-block[data-align="center"] .wp-block-file__button {
1390+
margin-left: auto;
1391+
margin-right: auto;
1392+
}
1393+
1394+
.wp-block[data-align="right"] .wp-block-file__button {
1395+
margin-left: auto;
1396+
margin-right: 0;
1397+
}
1398+
13891399
/** === Latest Posts === */
13901400
.wp-block-latest-posts .wp-block-latest-posts__post-date {
13911401
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,16 @@ ul.wp-block-archives,
782782
text-align: center;
783783
}
784784

785+
.wp-block[data-align="center"] .wp-block-file__button {
786+
margin-left: auto;
787+
margin-right: auto;
788+
}
789+
790+
.wp-block[data-align="right"] .wp-block-file__button {
791+
margin-left: auto;
792+
margin-right: 0;
793+
}
794+
785795
/** === Latest Posts === */
786796
.wp-block-latest-posts {
787797

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6208,6 +6208,16 @@ body.page .main-navigation {
62086208
outline-offset: -4px;
62096209
}
62106210

6211+
.entry .entry-content .wp-block-file.aligncenter .wp-block-file__button {
6212+
margin-right: auto;
6213+
margin-left: auto;
6214+
}
6215+
6216+
.entry .entry-content .wp-block-file.alignright .wp-block-file__button {
6217+
margin-right: auto;
6218+
margin-left: 0;
6219+
}
6220+
62116221
.entry .entry-content .wp-block-code {
62126222
border-radius: 0;
62136223
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6220,6 +6220,16 @@ body.page .main-navigation {
62206220
outline-offset: -4px;
62216221
}
62226222

6223+
.entry .entry-content .wp-block-file.aligncenter .wp-block-file__button {
6224+
margin-left: auto;
6225+
margin-right: auto;
6226+
}
6227+
6228+
.entry .entry-content .wp-block-file.alignright .wp-block-file__button {
6229+
margin-left: auto;
6230+
margin-right: 0;
6231+
}
6232+
62236233
.entry .entry-content .wp-block-code {
62246234
border-radius: 0;
62256235
}

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

tests/phpunit/tests/block-supports/block-visibility.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private function register_visibility_block_with_support( $block_name, $supports
6363
public function test_block_visibility_support_hides_block_when_visibility_false() {
6464
$block_type = $this->register_visibility_block_with_support(
6565
'test/visibility-block',
66-
array( 'blockVisibility' => true )
66+
array( 'visibility' => true )
6767
);
6868

6969
$block_content = '<p>This is a test block.</p>';
@@ -90,7 +90,7 @@ public function test_block_visibility_support_hides_block_when_visibility_false(
9090
public function test_block_visibility_support_shows_block_when_support_not_opted_in() {
9191
$block_type = $this->register_visibility_block_with_support(
9292
'test/visibility-block',
93-
array( 'blockVisibility' => false )
93+
array( 'visibility' => false )
9494
);
9595

9696
$block_content = '<p>This is a test block.</p>';

0 commit comments

Comments
 (0)