diff --git a/.eslintrc.js b/.eslintrc.js
index d0c22090b93e87..e5f42eea656b90 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -137,6 +137,11 @@ const restrictedSyntax = [
message:
'Avoid truthy checks on length property rendering, as zero length is rendered verbatim.',
},
+ {
+ selector:
+ 'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] > Literal[value=/^toggle\\b/i]',
+ message: "Avoid using the verb 'Toggle' in translatable strings",
+ },
];
/** `no-restricted-syntax` rules for components. */
diff --git a/.github/workflows/sync-assets-to-plugin-repo.yml b/.github/workflows/sync-assets-to-plugin-repo.yml
new file mode 100644
index 00000000000000..c841b3ffc79579
--- /dev/null
+++ b/.github/workflows/sync-assets-to-plugin-repo.yml
@@ -0,0 +1,48 @@
+name: Sync Gutenberg plugin assets to WordPress.org plugin repo
+
+on:
+ push:
+ branches:
+ - trunk
+ paths:
+ - assets/**
+
+jobs:
+ sync-assets:
+ name: Sync assets to WordPress.org plugin repo
+ runs-on: ubuntu-latest
+ environment: wp.org plugin
+ env:
+ PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg'
+ SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
+ SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
+
+ steps:
+ - name: Check out Gutenberg assets folder from WP.org plugin repo
+ run: |
+ svn checkout "$PLUGIN_REPO_URL/assets" \
+ --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+
+ - name: Delete everything
+ run: find assets -type f -not -path 'assets/.svn/*' -delete
+
+ - name: Checkout assets from current release
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ sparse-checkout: |
+ assets
+ show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
+ path: git
+
+ - name: Copy files from git checkout to svn working copy
+ run: cp -R git/assets/* assets
+
+ - name: Commit the updated assets
+ working-directory: ./assets
+ run: |
+ svn st | awk '/^?/ {print $2}' | xargs -r svn add
+ svn st | awk '/^!/ {print $2}' | xargs -r svn rm
+ svn commit . \
+ -m "Sync assets for commit $GITHUB_SHA" \
+ --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
+ --config-option=servers:global:http-timeout=600
diff --git a/.github/workflows/upload-release-to-plugin-repo.yml b/.github/workflows/upload-release-to-plugin-repo.yml
index e866964e69b2d1..4d2b0a66a7e7d6 100644
--- a/.github/workflows/upload-release-to-plugin-repo.yml
+++ b/.github/workflows/upload-release-to-plugin-repo.yml
@@ -168,7 +168,9 @@ jobs:
steps:
- name: Check out Gutenberg trunk from WP.org plugin repo
- run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ run: |
+ svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ svn checkout "$PLUGIN_REPO_URL/tags" --depth=immediates --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Delete everything
working-directory: ./trunk
@@ -182,7 +184,7 @@ jobs:
unzip gutenberg.zip -d trunk
rm gutenberg.zip
- - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
+ - name: Replace the stable tag placeholder with the new version
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
run: |
@@ -194,27 +196,16 @@ jobs:
name: changelog trunk
path: trunk
- - name: Commit the content changes
+ - name: Commit the release
working-directory: ./trunk
run: |
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
- svn commit -m "Committing version $VERSION" \
+ svn cp . "../tags/$VERSION"
+ svn commit . "../tags/$VERSION" \
+ -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
- --config-option=servers:global:http-timeout=300
-
- - name: Create the SVN tag
- working-directory: ./trunk
- run: |
- svn copy "$PLUGIN_REPO_URL/trunk" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \
- --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
-
- - name: Update the plugin's stable version
- working-directory: ./trunk
- run: |
- sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
- svn commit -m "Releasing version $VERSION" \
- --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+ --config-option=servers:global:http-timeout=600
upload-tag:
name: Publish as tag
diff --git a/assets/README.md b/assets/README.md
new file mode 100644
index 00000000000000..e437ec744d3807
--- /dev/null
+++ b/assets/README.md
@@ -0,0 +1,7 @@
+## Gutenberg Plugin Assets
+
+The contents of this directory are synced from the [`assets/` directory in the Gutenberg repository on GitHub](https://github.com/WordPress/gutenberg/tree/trunk/assets) to the [`assets/` directory of the Gutenberg WordPress.org plugin repository](https://plugins.trac.wordpress.org/browser/gutenberg/assets). **Any changes committed directly to the plugin repository on WordPress.org will be overwritten.**
+
+The sync is performed by a [GitHub Actions workflow](https://github.com/WordPress/gutenberg/actions/workflows/sync-assets-to-plugin-repo.yml) that is triggered whenever a file in this directory is changed.
+
+Since that workflow requires access to WP.org plugin repository credentials, it needs to be approved manually by a member of the Gutenberg Core team. If you don't have the necessary permissions, please ask someone in [#core-editor](https://wordpress.slack.com/archives/C02QB2JS7).
diff --git a/assets/banner-1544x500.jpg b/assets/banner-1544x500.jpg
new file mode 100644
index 00000000000000..12e7192dd4285e
Binary files /dev/null and b/assets/banner-1544x500.jpg differ
diff --git a/assets/banner-772x250.jpg b/assets/banner-772x250.jpg
new file mode 100644
index 00000000000000..316f7741071cbe
Binary files /dev/null and b/assets/banner-772x250.jpg differ
diff --git a/assets/icon-128x128.jpg b/assets/icon-128x128.jpg
new file mode 100644
index 00000000000000..051af8504a919b
Binary files /dev/null and b/assets/icon-128x128.jpg differ
diff --git a/assets/icon-256x256.jpg b/assets/icon-256x256.jpg
new file mode 100644
index 00000000000000..b7497f61652b7b
Binary files /dev/null and b/assets/icon-256x256.jpg differ
diff --git a/backport-changelog/6.8/8014.md b/backport-changelog/6.8/8014.md
new file mode 100644
index 00000000000000..3ff171d5fb367e
--- /dev/null
+++ b/backport-changelog/6.8/8014.md
@@ -0,0 +1,3 @@
+https://github.com/WordPress/wordpress-develop/pull/8014
+
+* https://github.com/WordPress/gutenberg/pull/66479
diff --git a/backport-changelog/6.8/8015.md b/backport-changelog/6.8/8015.md
new file mode 100644
index 00000000000000..214705518a0e72
--- /dev/null
+++ b/backport-changelog/6.8/8015.md
@@ -0,0 +1,3 @@
+https://github.com/WordPress/wordpress-develop/pull/8015
+
+* https://github.com/WordPress/gutenberg/pull/68058
diff --git a/bin/api-docs/gen-components-docs/markdown/props.mjs b/bin/api-docs/gen-components-docs/markdown/props.mjs
index 9d019c4240f008..aaa73041217528 100644
--- a/bin/api-docs/gen-components-docs/markdown/props.mjs
+++ b/bin/api-docs/gen-components-docs/markdown/props.mjs
@@ -48,4 +48,3 @@ export function generateMarkdownPropsJson( props, { headingLevel = 2 } = {} ) {
return [ { [ `h${ headingLevel }` ]: 'Props' }, ...propsJson ];
}
-
diff --git a/bin/plugin/lib/utils.js b/bin/plugin/lib/utils.js
index 4f57269d60c772..f4ef86c96ff081 100644
--- a/bin/plugin/lib/utils.js
+++ b/bin/plugin/lib/utils.js
@@ -2,7 +2,7 @@
* External dependencies
*/
// @ts-ignore
-const inquirer = require( 'inquirer' );
+const { confirm } = require( '@inquirer/prompts' );
const fs = require( 'fs' );
const childProcess = require( 'child_process' );
const { v4: uuid } = require( 'uuid' );
@@ -97,14 +97,19 @@ async function askForConfirmation(
isDefault = true,
abortMessage = 'Aborting.'
) {
- const { isReady } = await inquirer.prompt( [
- {
- type: 'confirm',
- name: 'isReady',
+ let isReady = false;
+ try {
+ isReady = await confirm( {
default: isDefault,
message,
- },
- ] );
+ } );
+ } catch ( error ) {
+ if ( error instanceof Error && error.name === 'ExitPromptError' ) {
+ console.log( 'Cancelled.' );
+ process.exit( 1 );
+ }
+ throw error;
+ }
if ( ! isReady ) {
log( formats.error( '\n' + abortMessage ) );
diff --git a/changelog.txt b/changelog.txt
index 8e7c1d84d7c7da..665265aef64d46 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,6 +1,6 @@
== Changelog ==
-= 19.9.0-rc.1 =
+= 19.9.0 =
## Changelog
@@ -35,8 +35,8 @@
- Navigation: Enable all non-interactive formats. ([67585](https://github.com/WordPress/gutenberg/pull/67585))
- Query block: Move patterns modal to dropdown on block toolbar. ([66993](https://github.com/WordPress/gutenberg/pull/66993))
- Separator block: Allow divs to be used as separators. ([67530](https://github.com/WordPress/gutenberg/pull/67530))
-- [ New Block ] Add Query Total block for displaying total query results or ranges. ([67629](https://github.com/WordPress/gutenberg/pull/67629))
-- [Block Library]: Update the relationship of `No results` block to `ancestor`. ([48348](https://github.com/WordPress/gutenberg/pull/48348))
+- New Block: Add Query Total block for displaying total query results or ranges. ([67629](https://github.com/WordPress/gutenberg/pull/67629))
+- Block Library: Update the relationship of `No results` block to `ancestor`. ([48348](https://github.com/WordPress/gutenberg/pull/48348))
#### DataViews
- Add header to the quick edit when bulk editing. ([67390](https://github.com/WordPress/gutenberg/pull/67390))
@@ -335,6 +335,7 @@
- DataViews build-wp: Don't bundle the date package. ([67612](https://github.com/WordPress/gutenberg/pull/67612))
- Keycodes: Improve tree shaking by annotating exports as pure. ([67615](https://github.com/WordPress/gutenberg/pull/67615))
- Upgrade TypeScript to 5.7 and fix types. ([67461](https://github.com/WordPress/gutenberg/pull/67461))
+- Combine the release steps to ensure that releases are tagged. ([65591](https://github.com/WordPress/gutenberg/pull/65591))
#### Testing
- e2e-test-utils-playwright: Increase timeout of site-editor selector. ([66672](https://github.com/WordPress/gutenberg/pull/66672))
@@ -381,7 +382,9 @@ The following PRs were merged by first-time contributors:
The following contributors merged PRs in this release:
-@aaronrobertshaw @afercia @akasunil @alexflorisca @annezazu @benazeer-ben @ciampo @creador-dev @creativecoder @DAreRodz @dcalhoun @dknauss @draganescu @ellatrix @fabiankaegy @getdave @gigitux @gvgvgvijayan @gziolo @hbhalodia @im3dabasia @imrraaj @jameskoster @jeryj @jorgefilipecosta @jsnajdr @juanfra @louwie17 @Mamaduka @manzoorwanijk @matiasbenedetto @Mayank-Tripathi32 @mcsf @michalczaplinski @miminari @mirka @ntsekouras @oandregal @ockham @prajapatisagar @ramonjd @sabernhardt @SantosGuillamot @sarthaknagoshe2002 @sgomes @shail-mehta @stokesman @subodhr258 @Sukhendu2002 @t-hamano @talldan @tellthemachines @tyxla @viralsampat-multidots @wwdes @yogeshbhutkar @youknowriad
+@aaronrobertshaw @afercia @akasunil @alexflorisca @annezazu @benazeer-ben @ciampo @creador-dev @creativecoder @DAreRodz @dcalhoun @dd32 @dknauss @draganescu @ellatrix @fabiankaegy @getdave @gigitux @gvgvgvijayan @gziolo @hbhalodia @im3dabasia @imrraaj @jameskoster @jeryj @jorgefilipecosta @jsnajdr @juanfra @louwie17 @Mamaduka @manzoorwanijk @matiasbenedetto @Mayank-Tripathi32 @mcsf @michalczaplinski @miminari @mirka @ntsekouras @oandregal @ockham @prajapatisagar @ramonjd @sabernhardt @SantosGuillamot @sarthaknagoshe2002 @sgomes @shail-mehta @stokesman @subodhr258 @Sukhendu2002 @t-hamano @talldan @tellthemachines @tyxla @viralsampat-multidots @wwdes @yogeshbhutkar @youknowriad
+
+
= 19.8.0 =
diff --git a/docs/getting-started/devenv/get-started-with-wp-env.md b/docs/getting-started/devenv/get-started-with-wp-env.md
index 74942ea3ee93bf..a6427deb863b7e 100644
--- a/docs/getting-started/devenv/get-started-with-wp-env.md
+++ b/docs/getting-started/devenv/get-started-with-wp-env.md
@@ -47,7 +47,7 @@ wp-env start
Once the script completes, you can access the local environment at: http://localhost:8888
. Log into the WordPress dashboard using username `admin` and password `password`.
wp-env
configurations, and the documentation might prompt you to run npm run start wp-env
instead.
+ Some projects, like Gutenberg, include their own specific wp-env
configurations, and the documentation might prompt you to run npm run wp-env start
instead.
{ convertDescription }
diff --git a/packages/block-library/src/post-author-name/edit.js b/packages/block-library/src/post-author-name/edit.js index b4afb9a9799498..2b4bb0709356b0 100644 --- a/packages/block-library/src/post-author-name/edit.js +++ b/packages/block-library/src/post-author-name/edit.js @@ -13,7 +13,7 @@ import { useBlockProps, } from '@wordpress/block-editor'; import { useSelect } from '@wordpress/data'; -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; import { store as coreStore } from '@wordpress/core-data'; import { PanelBody, ToggleControl } from '@wordpress/components'; @@ -22,9 +22,10 @@ function PostAuthorNameEdit( { attributes: { textAlign, isLink, linkTarget }, setAttributes, } ) { - const { authorName } = useSelect( + const { authorName, supportsAuthor } = useSelect( ( select ) => { - const { getEditedEntityRecord, getUser } = select( coreStore ); + const { getEditedEntityRecord, getUser, getPostType } = + select( coreStore ); const _authorId = getEditedEntityRecord( 'postType', postType, @@ -33,6 +34,8 @@ function PostAuthorNameEdit( { return { authorName: _authorId ? getUser( _authorId ) : null, + supportsAuthor: + getPostType( postType )?.supports?.author ?? false, }; }, [ postType, postId ] @@ -90,7 +93,17 @@ function PostAuthorNameEdit( { ) } -