Patterns on the [https://wordpress.org/patterns/ Pattern Directory] can have keywords for better discoverability while searching. The way these are stored [69548ff1f0 was changed from a taxonomy to meta value], but the `/wp/v2/pattern-directory/patterns` endpoint was still pulling from that old value.
The correct property to use for this field is `meta.wpop_keywords`, which returns a single string with comma-separated keywords.
Follow-up to [51021].
Props ryelle, TimothyBlynJacobs.
Merges [53665] to the 5.9 branch.
See #56126.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53674 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following GitHub Actions to the latest versions:
- `actions/checkout`
- `actions/cache`
- `actions/github-script`
- `actions/setup-node`
- `codecov/codecov-action`
- `ramsey/composer-install`
- `shivammathur/setup-php`
- `slackapi/slack-github-action`
Various inline documentation updates are also included.
Merges [53112], [53581], [53582], and [53592] to the 5.9 branch.
See #55652.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53596 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that `WP_UnitTestCase::skipOnAutomatedBranches()` has access to the `GITHUB_REF` and `GITHUB_EVENT_NAME` variables, so that some tests can be skipped when appropriate.
Additionally, account for renaming the `master` branch to `trunk` in November 2021.
Follow-up to [40241], [46999], [49264], [49267], [51868].
Merges [53349] to the 5.9 branch.
Fixes#55668.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53351 602fd350-edb4-49c9-b593-d223f7449a82
This change adds an information notice to the customizer when a block theme is active and the customizer is also available (for example when a plugin activates it), to encourage people to use the Site Editor for the best full site customization experience.
Props ironprogrammer, antonvlasenko, Clorith, audrasjb, psmits1567, tobifjellner, costdev, webcommsat, joedolson, pbiron.
Merges [53024] and [53025] to the 5.9 branch.
Fixes#54939.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53026 602fd350-edb4-49c9-b593-d223f7449a82
The `ssh-rsa` signature algorithm is disabled by default as of OpenSSH 8.8, which breaks SSH2 uploads in WordPress on modern systems. `ssh-ed25519` is one of the suggested alternatives, supported since OpenSSH 6.5.
References:
- OpenSSH 8.2 release notes
- OpenSSH 8.7 release notes
- OpenSSH 8.8 release notes
Follow-up to [8865].
Props richybkreckel, dd32, SergeyBiryukov.
Merges [52807] to the 5.9 branch.
Fixes#52409.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53022 602fd350-edb4-49c9-b593-d223f7449a82
When using a block theme that declares Widgets support, it's better to not specify a menu order for the Widgets menu to avoid conflicts between menu items order.
Props Rufus87, ironprogrammer, audrasjb, hellofromTonya, davidbaumwald.
Merges [53020] to the 5.9 branch.
Fixes#54916.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53021 602fd350-edb4-49c9-b593-d223f7449a82
Both CSS and JS URLs were totally broken for some of the newer blocks (e.g. the navigation block in the 2022 theme) when WP core is outside of the current directory using a different prefix.
Props gziolo, SergeyBiryukov, pgpagely, Mamaduka.
Merges [52939] to the 5.9 branch.
Fixes#55311.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53019 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes an undefined variable warning thrown when `duotone` color setting was set to null in Block Themes `theme.json` file.
Follow-up to [52768].
Props aliakseyenkaihar, audrasjb, rafiahmedd.
Merges [52791] to the 5.9 branch.
Fixes#55241.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53009 602fd350-edb4-49c9-b593-d223f7449a82
Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.
Props antonvlasenko, costdev, ironprogrammer.
Merges [52819] to the 5.9 branch.
Fixes#54878.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53008 602fd350-edb4-49c9-b593-d223f7449a82
This change makes sure only gallery content is returned by `get_post_galleries()`. It fixes an issue where non gallery block content was also returned by the function.
Props BinaryMoon, costdev, glendaviesnz.
Merges [52797] to the 5.9 branch.
Fixes#55203.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53006 602fd350-edb4-49c9-b593-d223f7449a82
This patch optimizes preload paths in post and site editors so that they match the real requests:
- Remove the `/` preload as the payload is very big and the response is not needed on any critical path.
- Modify the preloaded path for `/wp/v2/taxonomies` so that it corresponds to what `loadTaxonomyEntities` requests. After Gutenberg PR 37685 was merged to core, these preloads need to be modified to use `context=view` instead of `context=edit`.
- Modify the `/wp/v2/users/me` path so that it matches the real request (no query params).
- Add a preload of `/wp/v2/settings` because it is requested on critical path (editor boot). Site editor already preloads this, the changeset is only adding it to the post editor.
This is related to Gutenberg PR 39256 which introduces compatibility code to modify the preload paths with a filter, when the Gutenberg plugin is active.
See https://github.com/WordPress/gutenberg/pull/39256.
Props jsnajdr, noisysocks.
Merges [52995] to the 5.9 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@53005 602fd350-edb4-49c9-b593-d223f7449a82
From the conceptual point it makes sense to execute global styles filters before post filters. So the post filters are always the last.
Props xknown, sergey, audrasjb, vortfu, oandregal, get_dave.
Merges [52895] to the 5.9 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52896 602fd350-edb4-49c9-b593-d223f7449a82
This updates the "jquery-query" library from version 2.1.7 to 2.2.3.
Props jorbin, peterwilsoncc, xknown, audrasjb, jorgefilipecosta.
Merges [52844] to the 5.9 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52845 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes the Live Preview link for block-based themes when installing for a zip archive, since the customizer is disabled by default for block themes.
Follow-up to [52353].
Props alanjacobmathew, hellofromTonya, antonvlasenko, ironprogrammer.
Fixes#54578.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52803 602fd350-edb4-49c9-b593-d223f7449a82
This change bumps the version of the Twenty Twenty-Two bundled theme in preparation for release with WordPress 5.9.1.
Props peterwilsoncc, petaryoast, audrasjb, SergeyBiryukov, rafiahmedd.
Merges [52781] to the 5.9 branch.
Fixes#55056.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52782 602fd350-edb4-49c9-b593-d223f7449a82
Global styles duotone filters were not rendering in the post editor. This fixes that by adding `wp_global_styles_render_svg_filters` to the `in_admin_header` so it renders in the body before the editor.
Follow-up [52757].
Props ajlende, abhanonstopnewsuk.
Merges [52768] to the 5.9 branch.
Fixes#55190.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52769 602fd350-edb4-49c9-b593-d223f7449a82
Prevent the transient setters and getters from attempting to use the database table before they exist during the installation process.
During installation transients now use the `wp_cache_*()` functions on all sites, including those without a persistent cache, to prevent database errors. The use of the caching functions stores the data in memory for the duration of the request to account for transient data that is used multiple times during installation.
Props dd32, audrasjb, tnolte, antonvlasenko, noisysocks, peterwilsoncc.
Merges [52694] to the 5.9 branch.
Fixes#54849.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52767 602fd350-edb4-49c9-b593-d223f7449a82
Adds an additional guard to ensure the value of `$preset_metadata['value_key']` actually exists as a key in the `$preset` array. Fixes `Warning: Undefined array key` error.
Intentionally adds the check into the existing `isset()` as it's native to PHP, more efficient, and a good pattern.
Follow-up [52049].
Props jeherve, swissspidy, sergeybiryukov, jrf.
Merges [52763] to the 5.9 branch.
Fixes#55161.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52764 602fd350-edb4-49c9-b593-d223f7449a82
This prevents making data URIs as in `mask-image:url('data:image/svg+xml;utf8,<svg...` relative to the WordPress installation.
Props staatic.
Merges [52754] to the 5.9 branch.
See #54243.
Fixes#55177.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52762 602fd350-edb4-49c9-b593-d223f7449a82
#38231 added support for files fetched remotely to have their filename defined by the host using the `Content-Disposition` header. This would then take priority over the existing temporary file name created with `wp_tempnam()` earlier in the process.
The change unintentionally omitted the temporary directory path used during uploads, since the `wp_tempnam()` function would have added it previously, so that files with this header ended up being stored in the WordPress root folder, or wp-admin folder, when triggered by WP_Cron or user interactions respectively.
This change makes sure the file path includes the temporary directory location when the header is used.
Follow-up to [51939].
Props antonynz, azouamauriac, Clorith.
Merges [52734] and [52760] to the 5.9 branch.
Fixes#55109.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52761 602fd350-edb4-49c9-b593-d223f7449a82
Restricts and grants access to only admin roles for the Navigation Menu UI screen, i.e. either directly through the URL wp-admin/edit.php?post_type=wp_navigation or via the Navigation block's "Manage menu" option (in the block's toolbar).
It resolves 2 issues:
- For non-block themes, fixes the issue where admins could not access the UI.
- For block themes, restricts access to only admin roles, i.e. non-admins no longer have access to the UI.
Non-admins will receive the "Sorry, you are not allowed to edit posts in this post type" error message.
Follow-up [52069], [52145], [52330], [52400].
Props ironprogrammer, costdev, noisysocks, talldanwp, hellofromTonya, manfcarlo, pyrobd.
Merges [52755] to the 5.9 branch.
Fixes#54889.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52756 602fd350-edb4-49c9-b593-d223f7449a82
This commit makes the site editor follow what we do in the front-end, where theme styles are loaded after global styles by default.
Props oandregal, ntsekouras.
Merges [52752] to the 5.9 branch.
Fixes#55188.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52753 602fd350-edb4-49c9-b593-d223f7449a82
There is a PHP warning in WP_REST_Global_Styles_Controller because we are assuming that every theme.json has styles property, which is not always the case.
Props ntsekouras.
Merges [52750] to the 5.9 branch.
Fixes#54900.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52751 602fd350-edb4-49c9-b593-d223f7449a82
This commit applies feedback given to commit 52741. It changes the new function name, the file where it is located, and improves its documentation and marks.
Follow-up to [52741].
Props hellofromtonya, swissspidy, oandregal.
Merges [52743] to the 5.9 branch.
See #55148.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52748 602fd350-edb4-49c9-b593-d223f7449a82
The dynamic block styles for layout and elements should be loaded in the head for block themes. While that should also be the case for classic themes, the current mechanism we use (render_block) does not allow us to do that, hence, this PR doesn't change anything for them and will be loaded the body.
Props oandregal, youknowriad, wpsoul.
Merges [52741] to the 5.9 branch.
Fixes#55148.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52747 602fd350-edb4-49c9-b593-d223f7449a82
Since WordPress 5.9 you can set a view script for a block which is supposed to be only loaded on the front end. Unfortunately it's currently also loaded in the editor which can cause unexpected behaviour and also performance issues depending on the size of the scripts.
This is caused by the preloading of REST API routes via `block_editor_rest_api_preload()` which doesn't happen in an encapsulated process and so does pollute any global state like the one for scripts and styles.
Similar to the global `$post`, core now backups the globals `$wp_scripts` and `$wp_styles` and restores the backup after the preloading.
Props gziolo, ocean90.
Merges [52733] to the 5.9 branch.
Fixes#55151.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52745 602fd350-edb4-49c9-b593-d223f7449a82