Commit Graph

47872 Commits

Author SHA1 Message Date
Sergey Biryukov
280e720059 Site Health: Correct the label for wp-content directory check.
This removes HTML tags from the label, which were not displayed as expected due to escaping. Including the directory name in the label is also redundant, as it is already mentioned in the check result description directly below.

Includes:
* Adjusting a few other labels for consistency.
* Moving `wp-content` out of the translatable string in a similar message in `WP_Upgrader::generic_strings()`.

Follow-up to [55720].

Props dlh, mukesh27, audrasjb, SergeyBiryukov.
See #58678.

git-svn-id: https://develop.svn.wordpress.org/trunk@56117 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 11:11:13 +00:00
Jb Audras
a1a31fc473 Twenty Fourteen: Fix text color issue on Button block hover.
This fixes a text color issue when hovering Button blocks located on sidebars or widgets.

Props shailu25, sabernhardt, mukesh27.
Fixes #58509.




git-svn-id: https://develop.svn.wordpress.org/trunk@56116 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-30 08:54:39 +00:00
John Blackbourn
be90d79cb5 General: Ignore invalid types for the '_wp_http_referer' URL query variable.
It's expected that this query variable contains a string when it's set, but it's possible for its type to be something else such as an array. Ignoring non-string values prevents cascading errors when its value is passed through functions that expect a string.

Props xknown, costdev, jrf, azaozz

Fixes #57670


git-svn-id: https://develop.svn.wordpress.org/trunk@56115 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 23:25:38 +00:00
John Blackbourn
d48301e572 Build/Test Tools: Improve the name of the e2e test jobs on GitHub Actions.
Fixes #58661


git-svn-id: https://develop.svn.wordpress.org/trunk@56114 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 23:09:47 +00:00
John Blackbourn
77ed29b817 Build/Test Tools: Run E2E tests with and without SCRIPT_DEBUG enabled.
This adds a matrix to the e2e test runs on GitHub Actions so the tests run both with and without `SCRIPT_DEBUG` enabled. This allows us to catch scenarios where the minified and non-minified files may differ.

Props Clorith, joemcgill

Fixes #58661


git-svn-id: https://develop.svn.wordpress.org/trunk@56113 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 23:01:48 +00:00
Felix Arntz
60b3fe7997 Media: Fix inconsistent docs for existing wp_img_tag_add_loading_attr filter and remove duplicate.
Follow-up to [56037].

Props thekt12.
See #58235.


git-svn-id: https://develop.svn.wordpress.org/trunk@56112 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 17:32:35 +00:00
Sergey Biryukov
c650864b9f Filesystem API: Define password as null if not set when using SSH2 with public/private keys.
This resolves an `Undefined array key "password"` PHP warning in `WP_Filesystem_SSH2::connect()` when using public/private key authentication, in which case providing a password is optional.

Follow-up to [8865].

Props J-Dill, costdev, ehsanakhgari, dd32.
Fixes #33196.

git-svn-id: https://develop.svn.wordpress.org/trunk@56111 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 17:03:19 +00:00
Felix Arntz
e0aaa2ac9b General: Add missing parentheses to functions referenced in _deprecated_function() calls added in 6.3.
See #58235, #58301, #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56110 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 15:31:49 +00:00
Jb Audras
8c9fffb5cc Editor: Allow Query Block to show posts from multiple selected authors.
This changeset adds handler for multiple cases where author data can be passed to the Query Block:
- array: array of author ids
- string: comma separated author ids
- integer: single author id

Props adi3890, costdev, mayur8991, oglekler.
Fixes #58426.




git-svn-id: https://develop.svn.wordpress.org/trunk@56109 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 13:28:49 +00:00
Jb Audras
644d702a23 Twenty Twenty-Two: Adjust selector to apply bottom margin to top-level comments.
This adds spacing between top-level comments, which improves the layout of the comment section.

Props pitamdey, sabernhardt, mukesh27.
Fixes #58653.




git-svn-id: https://develop.svn.wordpress.org/trunk@56108 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 07:53:04 +00:00
Jb Audras
b58eebb2a5 Upgrade/Install: Only show errors if there is nothing to update.
Previously, when the `do-plugin-upgrade` or `do-theme-upgrade` actions were accessed directly on `update-core.php`, an error message stating "Select one or 
more (plugins|themes) to update" would be shown even if there was nothing to update.

This ensures that the error message only appears when there is something to update.

Props Presskopp, sabernhardt, pbiron, afragen, zunaid321, shuvoaftab, ugyensupport, costdev.
Fixes #57999.




git-svn-id: https://develop.svn.wordpress.org/trunk@56107 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 07:19:04 +00:00
Jb Audras
239484f717 Twenty Twenty: Fix Button block text color when located in footer widgets.
This changeset ensures the Button block text color is consistent when this block is used in a footer widget.

Props mayur8991, itpathsolutions, nithins53, sabernhardt, arafatjamil01, thakordarshil, pooja1210, mukesh27, shailu25, shwetabathani2312.
Fixes #57087.




git-svn-id: https://develop.svn.wordpress.org/trunk@56106 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:57:54 +00:00
Isabel Brison
41277f1f1b REST API: updates test annotations for global styles revisions
Adds `@covers` annotations to tests and fixes incorrect spacing.

Props ramonopoly, mukesh27.
See #58524.


git-svn-id: https://develop.svn.wordpress.org/trunk@56105 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:47:43 +00:00
Jb Audras
b830d5678e Themes: Fix layout issue on the Themes page background overlay.
This changeset replaces the `780px` media query `max-width` value with `782px` for better consistency and to fix a responsive layout issue.

Props zodiac1978, ironprogrammer, orestissam, audrasjb, monzuralam.
Fixes #58164.




git-svn-id: https://develop.svn.wordpress.org/trunk@56104 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:46:40 +00:00
Isabel Brison
280f162097 Editor: delete test file from update duotone support.
Deleting the test file that should have been removed in [56101].

See #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56103 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:34:25 +00:00
Jb Audras
7fa7d39c07 Twenty Sixteen: Replace deprecated unbind method with off.
This fixes a `Deprecated jQuery.fn.unbind()` notice.

Props Malae, dilipbheda, sabernhardt, audrasjb.
Fixes #58225.




git-svn-id: https://develop.svn.wordpress.org/trunk@56102 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:28:56 +00:00
Isabel Brison
d966798bfc Editor: update duotone support.
Updates duotone support after stabilisation of selectors API and adds a few small code quality and UI improvements.

Props onemaggie, peterwilsoncc, ajlende, audrasjb, mikeschroder, ramonopoly.
Fixes #58555.


git-svn-id: https://develop.svn.wordpress.org/trunk@56101 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-29 06:19:41 +00:00
David Baumwald
91a95fe91c Post WordPress 6.3 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56100 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 23:26:16 +00:00
David Baumwald
e1405a5b9c WordPress 6.3 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@56099 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 22:59:40 +00:00
Bernie Reiter
f39bf114c0 Editor: Update npm packages to fix gutenberg_ prefix
Update `@wordpress/*` packages to the latest patch versions in
order to replace calls to `gutenberg_apply_colors_support` with
`wp_apply_colors_support` in order to avoid a fatal error.

Props joemcgill, spacedmonkey, flixos90, ironprogrammer, sabernhardt.
Fixes #58651.

git-svn-id: https://develop.svn.wordpress.org/trunk@56098 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 22:36:22 +00:00
Joe McGill
260e97646d Build/Test Tools: Update terser-webpack-plugin.
This bumps the `terser-webpack-plugin` dependency to version `5.3.9`, which fixes an error during the minification process of the `@wordpress/block-library` package during builds.

Props clorith, azaozz, desrosj.
Fixes #58660, See #57657.


git-svn-id: https://develop.svn.wordpress.org/trunk@56097 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 20:06:56 +00:00
K. Adam White
68be569925 REST API: Expose current $request object to cors_header filters in WP_REST_SERVER->serve_request().
Allows headers to be more easily set on a per-response basis when more or less security is needed on a specific route.

Props bor0, rachelbaker, spacedmonkey, chaion07, oglekler, SergeyBiryukov.
Fixes #57752.



git-svn-id: https://develop.svn.wordpress.org/trunk@56096 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 17:37:52 +00:00
Weston Ruter
9f9add35cb Emoji: Pass functions as arguments in loader to account for minification and worker script.
Amends [56074].
Fixes #58472.
Props joemcgill, westonruter, azaozz.


git-svn-id: https://develop.svn.wordpress.org/trunk@56095 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 17:24:36 +00:00
Jonny Harris
eaab2c9092 Themes: Use improved support for child themes in wp_theme_has_theme_json().
Improve logic in `wp_theme_has_theme_json()`, to only check to see if theme.json exists in child theme, if the current theme is a child theme. Without this change, `file_exists` would be called twice on every request, which is wasteful. 

Follow up to [56085]. 

Props spacedmonkey, SergeyBiryukov.
Fixes #57629.

git-svn-id: https://develop.svn.wordpress.org/trunk@56094 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 17:12:46 +00:00
K. Adam White
7faab129f5 REST API: Cache schema in block pattern and menu item endpoints.
Performance improvement to add schema caching to pattern and menu item REST endpoints, so identical schema object are not needlessly regenerated.

Props spacedmonkey.
Fixes #58657. See [45811].



git-svn-id: https://develop.svn.wordpress.org/trunk@56093 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 15:51:23 +00:00
Andrew Ozz
80e424ad55 Script Loader: Fix unintended adding of async to scripts that are printed directly with wp_print_scripts() without enqueueing them beforehand.
Props: joemcgill, westonruter, felixarntz, peterwilsoncc.
See: #58648.

git-svn-id: https://develop.svn.wordpress.org/trunk@56092 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 14:14:58 +00:00
Sergey Biryukov
a63be5a890 Quick/Bulk Edit: Add an action hook to bulk_edit_posts() function.
This changeset introduces the `bulk_edit_posts` action hook, triggered after processing the post data for bulk edit and before the function returns its results. For example, it allows developers to save additional data without having to perform any `.ajax()` calls.

Follow-up to [8973].

Props helgatheviking, helen, Mte90, afercia, mrasharirfan, desrosj, itowhid06, pento, mensmaximus, audrasjb, costdev, webcommsat, marybaum, oglekler, mukesh27, SergeyBiryukov.
Fixes #28112.

git-svn-id: https://develop.svn.wordpress.org/trunk@56091 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 13:17:49 +00:00
Marius L. J
7bc7fcff52 Build/Test Tools: Switch frame container when testing block editor output.
The initial commit added the frame lookup within the wrong test, this follow-up restores the previous test runner, and adds the container lookup to the correct test.

Follow-up to [56089].

See #58592.

git-svn-id: https://develop.svn.wordpress.org/trunk@56090 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 10:57:48 +00:00
Marius L. J
5261ddb3ed Build/Test Tools: Switch frame container when testing block editor output.
When the block editor is rendered, the editor content is wrapped inside an iframe tag; The tool used to run End to End (E2E) tests, Puppeteer, puts all such frames into separate containers, but the initial test was checking if the parent page had a given selector, which was leading to timeout failures. By actively switching the container to the iframe wrapper,and setting it as the active context, it helps ensure the expected selectors can be found, and its content can be verrified.

See #58592.
Props joemcgill, SergeyBiryukov, talldanwp, oglekler, Clorith.

git-svn-id: https://develop.svn.wordpress.org/trunk@56089 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 10:45:16 +00:00
Andrew Ozz
45363a5976 Revert use of str_starts_with() and str_contains() in update-core.php.
Fixes updating WordPress from 5.7 and earlier versions. When updating this file runs first in the old version where the polifills may not be available.

Props: ironprogrammer, SergeyBiryukov, dd32, azaozz.
See: #58206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56088 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 10:07:49 +00:00
Jb Audras
44f9c35d74 Twenty Sixteen: Twenty Ten: Reflect Quote block text color on the entire block.
This changeset fixes an issue where the selected text color for the Quote block was not reflected on all the elements of the block.

Props nidhidhandhukiya, sabernhardt, audrasjb, shailu25, anilvaza.
Fixes #57204.




git-svn-id: https://develop.svn.wordpress.org/trunk@56087 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 07:58:12 +00:00
Isabel Brison
01a8b01c98 Editor: update npm packages to latest patch versions.
Updates the `@wordpress` npm packages to their latest patch versions, including generated PHP files.

Props ramonopoly.
Fixes #58654.


git-svn-id: https://develop.svn.wordpress.org/trunk@56086 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 07:01:10 +00:00
Peter Wilson
e1c1dae6c4 Script Loader: Prevent fatal error in load-styles.php.
Duplicates the code of `get_theme_file_path()` within `wp_theme_has_theme_json()`. This is to account for the `load-styles.php` context in which the former function is unavailable.

Follow up to [56073].

Props SergeyBiryukov, oglekler, spacedmonkey, joemcgill, dd32.
Fixes #57629.



git-svn-id: https://develop.svn.wordpress.org/trunk@56085 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 05:55:04 +00:00
Isabel Brison
28c879ecc4 Editor: update function name in test comment.
Renames `gutenberg_apply_typography_support` to `wp_apply_typography_support` in typography test comment.

Props kebbet, oglekler, ramonopoly.
See #58522.


git-svn-id: https://develop.svn.wordpress.org/trunk@56084 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:56:48 +00:00
Isabel Brison
518a4fc53c Editor: add Post Template fallback styles.
Adds fallback styles necessary for classic themes to display the correct Post Template layout.

Props mikeschroder, ramonopoly.
Fixes #58570.


git-svn-id: https://develop.svn.wordpress.org/trunk@56083 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:47:17 +00:00
Isabel Brison
c345180c29 REST API: add revisions endpoint for global styles.
Adds an endpoint that returns revisions to the global styles custom post.

Props ramonopoly, peterwilsoncc, spacedmonkey, mukesh27, timothyblynjacobs.
Fixes #58524.


git-svn-id: https://develop.svn.wordpress.org/trunk@56082 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-28 03:33:23 +00:00
audrasjb
36c819db7e Twenty Ten: Prevent Block Inserter icon color override.
This changeset prevents the likes of `body * { color: #000; }` in custom styles to override the Block Inserter icon styles.

Props umesh84, kajalgohel, sabernhardt, pooja1210, amin7.
Fixes #57414.




git-svn-id: https://develop.svn.wordpress.org/trunk@56081 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 23:31:01 +00:00
Jb Audras
7d6af24cdf Twenty Ten: Reflect Heading block text color on front-end.
This changeset fixes an issue where the selected text color of the Heading block was not reflected on front-end.

Props umesh84, sabernhardt, audrasjb, pooja1210, darshitrajyaguru97.
Fixes #56603.




git-svn-id: https://develop.svn.wordpress.org/trunk@56080 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 22:40:45 +00:00
Felix Arntz
e527271f2c Site Health: Include new WP_DEVELOPMENT_MODE in the list of constants.
Follow-up to [56042].

Props kebbet.
Fixes #58646.
See #57487.


git-svn-id: https://develop.svn.wordpress.org/trunk@56079 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 22:01:22 +00:00
David Baumwald
21bc99303d Reverting trunk back to alpha status while issues prevented a final 6.3 Beta 1 release.
git-svn-id: https://develop.svn.wordpress.org/trunk@56078 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 20:32:26 +00:00
David Baumwald
d195a7150e WordPress 6.3 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@56077 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 19:56:45 +00:00
Bernie Reiter
81bcd9d64e Editor: Update npm WordPress npm packages.
This fixes a fatal error in the Navigation block, which was due to a reference
to `WP_Navigation_Fallback_Gutenberg` that isn’t present in Core under that name.

Follow-up to [56065].
Props ramonjd, isabel_brison, dmsnell.
Fixes #58623.

git-svn-id: https://develop.svn.wordpress.org/trunk@56076 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 18:25:20 +00:00
K. Adam White
507cab8d6f REST API: Check post meta update authorization only when value is changed.
Resolves a bug where a post save will be reported as failed if the post includes any meta keys the current user does not have authorization to update, even when those meta values are unchanged.
Write authorization is now checked for a meta key only when the value of that key has changed, so that passing a REST response back unchanged will not cause failures.
Authorization is only needed when data will be updated.

Props ckoerner, TimothyBlynJacobs, spacedmonkey



git-svn-id: https://develop.svn.wordpress.org/trunk@56075 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 17:24:44 +00:00
Weston Ruter
f9eaba01e1 Emoji: Optimize emoji loader with sessionStorage, willReadFrequently, and OffscreenCanvas.
* Use `sessionStorage` to remember the previous results of calls to `browserSupportsEmoji()` for 1 week.
* Optimize reading from canvas by supplying the `willReadFrequently` option for the 2D context.
* When `OffscreenCanvas` is available, offload `browserSupportsEmoji()` to a web worker to prevent blocking the main thread. This is of primary benefit to Safari which does not yet support `willReadFrequently`.
* Remove obsolete support for IE11 since promises are now utilized. Nevertheless, ES3 syntax is maintained and IE11 will simply short-circuit.

Props westonruter, dmsnell, peterwilsoncc, valterlorran, flixos90, spacedmonkey, joemcgill.
Fixes #58472.


git-svn-id: https://develop.svn.wordpress.org/trunk@56074 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 17:22:59 +00:00
Jonny Harris
a13f8969de Themes: Use get_theme_file_path() in wp_theme_has_theme_json().
Ensure that all places where `theme.json` is included, use `get_theme_file_path` or `WP_Theme->get_file_path`, so that the path is run through `theme_file_path` filter. This change also means that the method `get_file_path_from_theme` can be deprecated, as it is no longer used in core. 

Props flixos90, spacedmonkey, costdev, johnbillion, oglekler, hellofromtonya, mukesh27, audrasjb, oandregal.
Fixes #57629.

git-svn-id: https://develop.svn.wordpress.org/trunk@56073 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 17:10:28 +00:00
Sergey Biryukov
87a0ad45a5 Media: Only show “Copy” and “Download” actions when an attachment URL is available.
Includes unit tests to verify the logic for displaying row actions in the Media Library in certain scenarios, e.g. with and without the “Trash” or “Unattached” filter.

Follow-up to [55949].

Props costdev, kebbet, mukesh27, oglekler.
Fixes #57893.

git-svn-id: https://develop.svn.wordpress.org/trunk@56072 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:26:15 +00:00
Jb Audras
f070ec75f3 Users: Introduce the wp_update_user action.
This changeset introduces the `wp_update_user` action hook, which fires after the user has been updated and emails have been sent.

Props tanner-m, desrosj, lphoumpakka, oglekler, audrasjb, azzaoz.
Fixes #57843.




git-svn-id: https://develop.svn.wordpress.org/trunk@56071 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:25:18 +00:00
Jb Audras
7ce266f2b2 Coding Standards: Fix a PHPCS issue found in wpPluginsListTable.php.
This fixes a previously existing issue, discovered after [56068].




git-svn-id: https://develop.svn.wordpress.org/trunk@56070 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:09:19 +00:00
Mike Schroder
45b080dd54 Filesystem API: Allow optional inclusion of hidden files in list_files().
Adds a new optional `$include_hidden` parameter to allow the inclusion of hidden (`.` prefixed) files.
Defaults to false for backward compatibility.

Props yani.iliev, sabernhardt, costdev, rutviksavsani, zunaid321, azaozz.
Fixes #53659.

git-svn-id: https://develop.svn.wordpress.org/trunk@56069 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:06:16 +00:00
Jb Audras
929c270cf9 Plugins: Introduce the plugins_list filter.
This changeset adds the `plugins_list` hook, which can be use to filter the list of plugin displayed on WP Admin Plugins screen.

Props nateallen, fischfood, mukesh27, peterwilsoncc, SergeyBiryukov, audrasjb, costdev, ecorica, zunaid321.
Fixes #57278.




git-svn-id: https://develop.svn.wordpress.org/trunk@56068 602fd350-edb4-49c9-b593-d223f7449a82
2023-06-27 16:00:00 +00:00