Skip to content

Commit 619fed3

Browse files
Merge branch 'WordPress:trunk' into trunk
2 parents 05bb54c + 8277a74 commit 619fed3

File tree

4 files changed

+36
-23
lines changed

4 files changed

+36
-23
lines changed

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@
182182
"build:packages": "npm run --silent build:package-types && node ./bin/packages/build.js",
183183
"postbuild:packages": " npm run --if-present --workspaces build:wp",
184184
"build:plugin-zip": "bash ./bin/build-plugin-zip.sh",
185-
"clean:package-types": "tsc --build --clean && rimraf --glob './packages/*/build-types'",
186-
"clean:packages": "rimraf --glob './packages/*/{build,build-module,build-wp,build-style}'",
185+
"clean:package-types": "tsc --build --clean && rimraf --glob \"./packages/*/build-types\"",
186+
"clean:packages": "rimraf --glob \"./packages/*/{build,build-module,build-wp,build-style}\"",
187187
"component-usage-stats": "node ./node_modules/react-scanner/bin/react-scanner -c ./react-scanner.config.js",
188188
"dev": "cross-env NODE_ENV=development npm run build:packages && concurrently \"wp-scripts start\" \"npm run dev:packages\"",
189189
"dev:packages": "cross-env NODE_ENV=development concurrently \"node ./bin/packages/watch.js\" \"tsc --build --watch\"",
@@ -195,7 +195,7 @@
195195
"docs:gen": "node ./docs/tool/index.js",
196196
"docs:theme-ref": "node ./bin/api-docs/gen-theme-reference.mjs",
197197
"env": "wp-env",
198-
"fixtures:clean": "rimraf --glob 'test/integration/fixtures/blocks/*.{json,serialized.html}'",
198+
"fixtures:clean": "rimraf --glob \"test/integration/fixtures/blocks/*.{json,serialized.html}\"",
199199
"fixtures:generate": "cross-env GENERATE_MISSING_FIXTURES=y npm run test:unit test/integration/full-content/ && npm run format test/integration/fixtures/blocks/*.json",
200200
"fixtures:regenerate": "npm-run-all fixtures:clean fixtures:generate",
201201
"format": "wp-scripts format",

packages/block-library/src/navigation-link/index.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,22 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
177177
// Don't render the block's subtree if it is a draft or if the ID does not exist.
178178
if ( $is_post_type && $navigation_link_has_id ) {
179179
$post = get_post( $attributes['id'] );
180-
if ( ! $post || 'publish' !== $post->post_status ) {
180+
/**
181+
* Filter allowed post_status for navigation link block to render.
182+
*
183+
* @since 6.8.0
184+
*
185+
* @param array $post_status
186+
* @param array $attributes
187+
* @param WP_Block $block
188+
*/
189+
$allowed_post_status = (array) apply_filters(
190+
'render_block_core_navigation_link_allowed_post_status',
191+
array( 'publish' ),
192+
$attributes,
193+
$block
194+
);
195+
if ( ! $post || ! in_array( $post->post_status, $allowed_post_status, true ) ) {
181196
return '';
182197
}
183198
}

packages/edit-site/src/components/global-styles/font-sizes/font-sizes.js

+9-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
__experimentalVStack as VStack,
1212
__experimentalHStack as HStack,
1313
FlexItem,
14-
FlexBlock,
1514
Button,
1615
} from '@wordpress/components';
1716
import {
@@ -111,23 +110,18 @@ function FontSizeGroup( {
111110
key={ size.slug }
112111
path={ `/typography/font-sizes/${ origin }/${ size.slug }` }
113112
>
114-
<HStack direction="row">
113+
<HStack>
115114
<FlexItem className="edit-site-font-size__item">
116115
{ size.name }
117116
</FlexItem>
118-
<FlexItem>
119-
<HStack justify="flex-end">
120-
<FlexBlock className="edit-site-font-size__item edit-site-font-size__item-value">
121-
{ size.size }
122-
</FlexBlock>
123-
<Icon
124-
icon={
125-
isRTL()
126-
? chevronLeft
127-
: chevronRight
128-
}
129-
/>
130-
</HStack>
117+
<FlexItem display="flex">
118+
<Icon
119+
icon={
120+
isRTL()
121+
? chevronLeft
122+
: chevronRight
123+
}
124+
/>
131125
</FlexItem>
132126
</HStack>
133127
</NavigationButtonAsItem>

packages/edit-site/src/components/global-styles/shadows-panel.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {
99
Flex,
1010
FlexItem,
1111
} from '@wordpress/components';
12-
import { __, sprintf } from '@wordpress/i18n';
12+
import { __, sprintf, isRTL } from '@wordpress/i18n';
1313
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
14-
import { plus, shadow as shadowIcon } from '@wordpress/icons';
14+
import { plus, Icon, chevronLeft, chevronRight } from '@wordpress/icons';
1515

1616
/**
1717
* Internal dependencies
@@ -135,9 +135,13 @@ function ShadowItem( { shadow, category } ) {
135135
return (
136136
<NavigationButtonAsItem
137137
path={ `/shadows/edit/${ category }/${ shadow.slug }` }
138-
icon={ shadowIcon }
139138
>
140-
{ shadow.name }
139+
<HStack>
140+
<FlexItem>{ shadow.name }</FlexItem>
141+
<FlexItem display="flex">
142+
<Icon icon={ isRTL() ? chevronLeft : chevronRight } />
143+
</FlexItem>
144+
</HStack>
141145
</NavigationButtonAsItem>
142146
);
143147
}

0 commit comments

Comments
 (0)