Commit Graph

43318 Commits

Author SHA1 Message Date
Sergey Biryukov
c3dd52264d Docs: Clarify the @return value for wp_get_attachment_image_url() and get_the_post_thumbnail_url().
Props GeekPress, audrasjb, naveen17797.
Fixes #52183.

git-svn-id: https://develop.svn.wordpress.org/trunk@50236 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 14:12:21 +00:00
Robert Anderson
a8179897a2 Editor: Update @wordpress npm packages
Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 beta 2.

Fixes #52467.


git-svn-id: https://develop.svn.wordpress.org/trunk@50235 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-08 03:34:31 +00:00
Sergey Biryukov
ef0a312dc1 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Adjust some newly introduced strings to remove unnecessary numbered placeholders for consistency.

Follow-up to [42827].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50234 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-07 12:42:06 +00:00
Sergey Biryukov
cf8928cdfc Twenty Twenty-One: Capitalize translator comments consistently.
Follow-up to [45932].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50233 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-07 12:26:41 +00:00
Sergey Biryukov
b301fa3d42 Editor: Correct the check for unsaved content in wp.autosave.server.postChanged().
This fixes improper triggering of the "Are you sure?" prompt when navigating away from the old, "classic" Edit Post screen and there are no changes.

The previous check did not account for Pages or any custom post types that don't have a Title, Content, or Excerpt field.

Follow-up to [50031].

Props hwk-fr, mukesh27, audrasjb, archon810, Clorith, ibiza69, tonysandwich, roger995, bartosz777, viablethought, dbtedg, worldedu, hmabpera, magnuswebdesign.
Fixes #52440.

git-svn-id: https://develop.svn.wordpress.org/trunk@50232 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-06 14:14:48 +00:00
Sergey Biryukov
a07d734d77 Docs: Use typed array notation in the update_post_term_count_statuses filter DocBlock.
Follow-up to [50169].

See #38843.

git-svn-id: https://develop.svn.wordpress.org/trunk@50231 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 19:11:15 +00:00
Sergey Biryukov
73b353ef95 Privacy: Rename the $send_confirmation_email parameter of wp_create_user_request() to $status, for clarity.
Follow-up to [50159], [50165].

Props xkon, TimothyBlynJacobs.
Fixes #52430. See #43890.

git-svn-id: https://develop.svn.wordpress.org/trunk@50230 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 15:48:59 +00:00
John Blackbourn
df85e54119 Users: Coding standards fixes after [50228].
See #52238


git-svn-id: https://develop.svn.wordpress.org/trunk@50229 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 14:42:01 +00:00
John Blackbourn
a690358619 Users: Allow the role of users to be bulk changed to no role from the Users listing screen.
This option is already available when editing an individual user, but it was previously missing from the bulk actions.

Props bonniebeeman, sabernhardt, ovidiul, jeroenrotty

Fixes #52238


git-svn-id: https://develop.svn.wordpress.org/trunk@50228 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 14:38:15 +00:00
Jonathan Desrosiers
5629865595 Build/Test Tools: Fix tests after [50185].
This removes a test assertion defending against version ranges in the `node` value in `package.json` files. This is now supported.

Props peterwilsoncc.
See #52341.

git-svn-id: https://develop.svn.wordpress.org/trunk@50192 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 03:36:26 +00:00
Jonathan Desrosiers
36171d1a83 Build/Test Tools: Specify a version range within engines for node and npm.
This makes it more clear what versions of `node` and `npm` will successfully build WordPress.

Props dd32, mkaz.
Fixes #52455. See #51749.

git-svn-id: https://develop.svn.wordpress.org/trunk@50185 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-05 02:44:07 +00:00
Sergey Biryukov
3c40632397 Privacy: Remove gray left border on the inline notices in Privacy Policy Guide.
Follow-up to [50161].

Props xkon.
See #52430.

git-svn-id: https://develop.svn.wordpress.org/trunk@50182 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-04 12:46:58 +00:00
Sergey Biryukov
a27e920d3e Privacy: Update URLs to the Privacy Policy Guide in help tabs.
Follow-up to [50147], [50161].

Props xkon.
See #52430.

git-svn-id: https://develop.svn.wordpress.org/trunk@50181 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-04 12:04:31 +00:00
Jonathan Desrosiers
13f117a174 Build/Test Tools: Update NPM dependencies
This updates two dependencies to their latest versions:
- `uglify-js` from `3.12.5` to `3.12.6`.
- `sass` from `1.32.5` to `1.32.6`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@50176 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-03 14:53:55 +00:00
Sergey Biryukov
c17cc1def2 Docs: Consistently document the default value for $args parameter in various cron functions.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@50175 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-03 11:06:39 +00:00
Sergey Biryukov
7d0367b851 Docs: Add a @since note to wp_clear_scheduled_hook() for the $wp_error parameter.
Follow-up to [50143].

See #49961.

git-svn-id: https://develop.svn.wordpress.org/trunk@50174 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-03 10:56:39 +00:00
Sergey Biryukov
3c3590103a Post WordPress 5.7 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@50172 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 22:21:52 +00:00
Sergey Biryukov
2f8657c858 WordPress 5.7 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@50171 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 22:04:54 +00:00
Anthony Burchell
26fb7c9682 Media: Consistency in logic to pass wp_getimagesize() tests.
Previously, we used `DIR_TESTDATA` to determine if a test should skip a newly silenced error in `wp_getimagesize()`.

We are now using `WP_RUN_CORE_TESTS` instead for consistency.

Props hellofromTonya, SergeyBiryukov.
See #49889.


git-svn-id: https://develop.svn.wordpress.org/trunk@50170 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 21:34:40 +00:00
Anthony Burchell
422c2c4ad2 Taxonomy: Add filter for post statuses when updating term count.
This adds a filter that allows `$post_statuses` to be modified in term count.

Props GunGeekATX, adamsilverstein, davecpage, nwjames, hellofromTonya, audrasjb, peterwilsoncc, TimothyBlynJacobs.
Fixes #38843.


git-svn-id: https://develop.svn.wordpress.org/trunk@50169 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 21:04:58 +00:00
Sergey Biryukov
6221b8a744 General: Remove admin exception for https in network_home_url().
Previously, `network_home_url()` would automatically switch to `https` if the current request is already `https`, but would only do so on the front end.

This mirrors the change made earlier for `get_home_url()`.

Follow-up to [12598], [21937], [24844], [50156].
See #52421.

git-svn-id: https://develop.svn.wordpress.org/trunk@50168 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:57:31 +00:00
Adam Silverstein
d4b2126f07 Security: add Content-Security-Policy script loaders.
Add new functions `wp_get_script_tag`, `wp_print_script_tag`, `wp_print_inline_script_tag` and `wp_get_inline_script_tag` that support script attributes. Enables passing attributes such as `async` or `nonce`, creating a path forward for enabling a Content-Security-Policy in core, plugins and themes.

Props tomdxw, johnbillion, jadeddragoon, jrchamp, mallorydxw, epicfaace, alinod, enricocarraro, ocean90.
Fixes #39941.




git-svn-id: https://develop.svn.wordpress.org/trunk@50167 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:53:53 +00:00
Jake Spurlock
a31fc94dc3 Coding Standards: Update links to be https in package-lock.json
See [50163].

Unprops whyisjake.

Props clorith, antpb, jorbin.


git-svn-id: https://develop.svn.wordpress.org/trunk@50166 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:46:26 +00:00
Sergey Biryukov
f92eae92d0 Docs: Update documentation for wp_create_user_request() per the documentation standards.
Add a `@since` note for the `$send_confirmation_email` parameter.

Follow-up to [50159].

See #43890.

git-svn-id: https://develop.svn.wordpress.org/trunk@50165 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:40:53 +00:00
Sergey Biryukov
9615fc28d5 General: Restore the $pagenow global in get_home_url().
This fixes test failures in `Tests_WP_Resource_Hints`.

Follow-up to [50156].

See #52421.

git-svn-id: https://develop.svn.wordpress.org/trunk@50164 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:35:06 +00:00
Jake Spurlock
0c0805bb9e Administration: New filter ahead of the months drop-down.
As this can cause large, long running queries on sites with many posts, this filter allows the query to be modified, bypassing entirely if needed. 

Fixes #51660.

Props geoffguillain, SergeyBiryukov, hareesh-pillai, hellofromTonya, TimothyBlynJacobs, whyisjake. 



git-svn-id: https://develop.svn.wordpress.org/trunk@50163 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:32:42 +00:00
Aaron Jorbin
c42e99b3c5 Administration: use shorthand css properties to improve readability
Consolidating `border`, `padding`, and `margin` instances where the shorthand can be used to improve readability.

Props ankitmaru, audrasjb, sabernhardt, mukesh27, hellofromTonya.
Fixes #52148.



git-svn-id: https://develop.svn.wordpress.org/trunk@50162 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:26:48 +00:00
Timothy Jacobs
03e81107ad Privacy: Redesign the Privacy settings pages.
The Privacy settings pages now use the same design patterns as the Site Health screen. Additionally, each privacy policy guide is now contained in an accordion to make the page easier to navigate when multiple plugins are in use.

Props xkon, hedgefield, garrett-eclipse, hellofromTonya, paaljoachim, joedolson.
Fixes #49264.


git-svn-id: https://develop.svn.wordpress.org/trunk@50161 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 20:12:39 +00:00
Anthony Burchell
afb3ee8c5d Coding Standards: Fix spacing in test_pending_status_with_false_send_confirmation_email test.
Follow-up to [50159] adjusts alignment of the `$request_data` value.

See #43890.


git-svn-id: https://develop.svn.wordpress.org/trunk@50160 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 19:59:51 +00:00
Anthony Burchell
32395325e9 Privacy: Allow Admin to Skip e-mail confirmation for Export.
This adds a form option to skip the admin email alert when exporting personal data.

Props xkon, azaozz, TZ-Media, iandunn, desrosj, iprg, allendav, wesselvandenberg, karmatosed, birgire, davidbaumwald, estelaris, paaljoachim, hellofromTonya.
Fixes #43890.


git-svn-id: https://develop.svn.wordpress.org/trunk@50159 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 19:43:37 +00:00
Jonathan Desrosiers
d96e9c4839 Twenty Twenty-One: Fix wrapping for long text within comments.
This ensures that word wrapping occurs within comment content. 

Props mayankmajeji, audrasjb.
Fixes #52380.

git-svn-id: https://develop.svn.wordpress.org/trunk@50158 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 19:38:16 +00:00
Timothy Jacobs
032e946633 REST API: Allow for the posts endpoint include/exclude terms query to include_children.
For example the `categories` or `categories_exclude` parameters can now optionally accept an object with a `terms` property that accepts the list of term ids and a new `include_children` property which controls the Tax Query `include_children` field.

Props jason_the_adams, jnylen0, birgire, dlh.
Fixes #39494.


git-svn-id: https://develop.svn.wordpress.org/trunk@50157 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 19:23:08 +00:00
Sergey Biryukov
051c135c6e General: Remove admin and login exceptions for https in get_home_url().
Previously, `get_home_url()` would automatically switch to `https` if the current request is already `https`, but would only do so on the front end.

This addresses the inconsistent behavior of returning different values in the admin and on the frontend.

Follow-up to [12598], [21937], [24844].

Props herregroen, mukesh27.
Fixes #52421.

git-svn-id: https://develop.svn.wordpress.org/trunk@50156 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 19:01:18 +00:00
Sergey Biryukov
d041904a7d Block Editor: Drop Noto Serif in favor of system fonts.
This aims to improve privacy and performance of the editor.

Follow-up to [37361].

Props Joen, hellofromTonya, garrett-eclipse, aristath, noisysocks, hedgefield, pento, sabernhardt, joyously, yannkozon.
Fixes #46169.

git-svn-id: https://develop.svn.wordpress.org/trunk@50155 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 18:35:27 +00:00
Anthony Burchell
5dad681286 Twenty Twenty-One: Make transparent PNG logo visible on focus.
This ensures a transparent logo remains visible while focused.

Props bduclos, poena, paaljoachim, hellofromTonya.
Fixes #52257.


git-svn-id: https://develop.svn.wordpress.org/trunk@50154 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 18:27:20 +00:00
Sergey Biryukov
77a30d9def Login and Registration: Improve the UX of the Reset Password screen.
Previously, it was unclear that the displayed password is only being suggested and should be saved by clicking the Reset Password button.

This adds separate Generate Password and Save Password buttons, for clarity.

Props xkon, estelaris, jaymanpandya, hedgefield, audrasjb, erichmond, magicroundabout, lukecavanagh, knutsp, tinodidriksen, nico_martin, markhowellsmead, kara.mcnair, e_baker, pixelverbieger, souri_wpaustria, megabyterose, poena, whyisjake.
Fixes #39638.

git-svn-id: https://develop.svn.wordpress.org/trunk@50153 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 18:11:26 +00:00
Jonathan Desrosiers
6b3c79d67e Coding Standards: Fix several minor coding standards issues.
These are made by running `composer format`.

Follow up to [50124], [50129], [50143].

See #49961, #52192, #34281.

git-svn-id: https://develop.svn.wordpress.org/trunk@50152 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 18:02:36 +00:00
Sergey Biryukov
39edb7abe9 Upgrade/Install: Introduce a filter for the result of WP_Upgrader::install_package().
This allows for the capture and usage of error data from the method, to facilitate a potential plugin/theme rollback in the event of an update failure.

Props afragen, dd32.
Fixes #52381.

git-svn-id: https://develop.svn.wordpress.org/trunk@50151 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 17:29:27 +00:00
Timothy Jacobs
7f049d3ac1 REST API: Return detailed error information from request validation.
Previously, only the first error message for each parameter was made available. Now, all error messages for a parameter are concatenated. Additionally, the detailed error for each parameter is made available in a new `details` section of the validation error. Each error is formatted following the standard REST API error formatting.

The `WP_REST_Server::error_to_response` method has been abstracted out into a standalone function `rest_convert_error_to_response` to allow for reuse by `WP_REST_Request`. The formatted errors now also contain an `additional_data` property which contains the additional error data provided by `WP_Error::get_all_error_data`.

Props dlh, xkon, TimothyBlynJacobs.
Fixes #46191.


git-svn-id: https://develop.svn.wordpress.org/trunk@50150 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 17:26:06 +00:00
Sergey Biryukov
466698d127 Upgrade/Install: Return a WP_Error from copy_dir() and _copy_dir() if the directory listing failed.
Props afragen, dd32.
Fixes #52342.

git-svn-id: https://develop.svn.wordpress.org/trunk@50149 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 17:21:45 +00:00
Sergey Biryukov
bd870d997c Media: Move wp_getimagesize() to wp-includes/media.php, for consistency with other media functions.
Follow-up to [50146].

See #49889.

git-svn-id: https://develop.svn.wordpress.org/trunk@50148 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 17:08:48 +00:00
Sergey Biryukov
af40e9aa5f Privacy: Add help tabs for Export Personal Data and Erase Personal Data screens.
Props xkon, burtrw, netweblogic, desrosj, hellofromTonya, garrett-eclipse.
Fixes #43994.

git-svn-id: https://develop.svn.wordpress.org/trunk@50147 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 16:53:58 +00:00
Anthony Burchell
01df5322ef Media: Avoid suppressing errors when using getimagesize().
Previously, all logic utilizing `getimagesize()` was supressing errors making it difficult to debug usage of the function. 

A new `wp_getimagesize()` function has been added to allow the errors to no longer be suppressed when `WP_DEBUG` is enabled.

Props Howdy_McGee, SergeyBiryukov, mukesh27, davidbaumwald, noisysocks, hellofromTonya.
Fixes #49889.


git-svn-id: https://develop.svn.wordpress.org/trunk@50146 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 16:51:17 +00:00
Sergey Biryukov
0b9cff29e4 Privacy: Introduce manage_{$this->screen->id}_custom_column action in WP_Privacy_Requests_Table::column_default().
This brings some consistency with other list tables and allows for adding custom column data to columns registered with `manage_export-personal-data_columns` or `manage_erase-personal-data_columns` filters.

Props xkon, garrett-eclipse, birgire, pbiron, hellofromTonya, TimothyBlynJacobs, 7studio, mukesh27, Mista-Flo.
Fixes #44354.

git-svn-id: https://develop.svn.wordpress.org/trunk@50145 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 16:42:17 +00:00
Joe McGill
ae5a7149b4 Media: Make filename checks less strict in 'wp_image_src_get_dimensions'.
This modifies the check for full size files so that only the basename is compared with the image `src` to avoid misses whenever the `src` path has been modified.

Props ianmjones.
Fixes: #52417.


git-svn-id: https://develop.svn.wordpress.org/trunk@50144 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 15:26:13 +00:00
John Blackbourn
75d2020f3f Cron API: Introduce a $wp_error parameter to functions that write to the cron array.
This allows the functions to return a `WP_Error` object containing more information in case of a problem, instead of just boolean false.

The various `pre_` filters in these functions are also updated so they can return or be passed a `WP_Error` object.

Fixes #49961


git-svn-id: https://develop.svn.wordpress.org/trunk@50143 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 13:47:46 +00:00
Sergey Biryukov
feb86cb25f Block Editor: Remove the .is-dark-theme body class from the admin header.
With the changes to dark theme support in https://github.com/WordPress/gutenberg/pull/28233 to check the real background color of the theme, this no longer serves any purpose.

Follow-up to [44133].

Props scruffian, sabernhardt.
Fixes #52385.

git-svn-id: https://develop.svn.wordpress.org/trunk@50142 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 13:03:37 +00:00
Sergey Biryukov
1f33c5b66f Docs: Update documentation for retrieve_password() per the documentation standards.
Follow-up to [50129], [50140].

See #34281.

git-svn-id: https://develop.svn.wordpress.org/trunk@50141 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 12:41:22 +00:00
Sergey Biryukov
16cbb22700 Users: Move retrieve_password() to wp-includes/user.php, for consistency with other user functions.
Follow-up to [25231], [50129].

Props jfarthing84, dimadin.
See #34281, #31039.

git-svn-id: https://develop.svn.wordpress.org/trunk@50140 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 12:35:35 +00:00
Sergey Biryukov
d331daa9a0 Users: Use consistent strings for error messages in wp-admin/users.php.
Use `_n()` for a string with plural forms.

Follow-up to [50129].

See #34281.

git-svn-id: https://develop.svn.wordpress.org/trunk@50139 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-02 12:15:22 +00:00