TimothyBlynJacobs
ba5b09af09
REST API: Add HTTP/1.0 emulation to wp.apiRequest().
...
This allows for making REST API calls with the PUT and DELETE HTTP methods that may be blocked or unsupported by some server configurations.
Props yakimun.
Fixes #43605 .
Built from https://develop.svn.wordpress.org/trunk@49133
git-svn-id: http://core.svn.wordpress.org/trunk@48895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 20:11:06 +00:00
TimothyBlynJacobs
49a399db05
REST API: Introduce search post format handler.
...
This allows for clients to search the used post formats via the /wp/v2/search endpoint by using a type=post-format query parameter.
Fixes #51459 .
Props andraganescu, zieladam, noisysocks, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@49132
git-svn-id: http://core.svn.wordpress.org/trunk@48894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 19:54:05 +00:00
Sergey Biryukov
e36a4a7db9
Rewrite Rules: Add missing newline to the `HTTP_AUTHORIZATION` rewrite rule.
...
Follow-up to [49109].
Props nendeb55, georgestephanis, johnbillion.
Fixes #51495 . See #42790 .
Built from https://develop.svn.wordpress.org/trunk@49131
git-svn-id: http://core.svn.wordpress.org/trunk@48893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 19:10:07 +00:00
Sergey Biryukov
69217eb85b
Docs: Correct comments in `wpmu_new_site_admin_notification()` per the documentation standards.
...
See #42134 .
Built from https://develop.svn.wordpress.org/trunk@49130
git-svn-id: http://core.svn.wordpress.org/trunk@48892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 15:47:11 +00:00
jorgefilipecosta
1c7ebdab9f
Add wp-packages-update command to update WordPress packages.
...
This ticket exposes the packages-update script implemented at https://github.com/WordPress/gutenberg/pull/19448 on WordPress core.
By running "npm run wp-packages-update" all the WordPress packages are updated to the latest version. The command is very useful when updating the Gutenberg editor core exposes.
Props isabel_brison.
Fixes #51491 .
Built from https://develop.svn.wordpress.org/trunk@49129
git-svn-id: http://core.svn.wordpress.org/trunk@48891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-12 12:01:09 +00:00
John Blackbourn
33070fb7d2
Media: Allow the `gallery_shortcode()` and `get_image_tag()` functions to correctly accept an array of image dimensions.
...
These functions did previously accept an array of image dimensions but their class attributes were not properly constructed.
Fixes #51362
Built from https://develop.svn.wordpress.org/trunk@49128
git-svn-id: http://core.svn.wordpress.org/trunk@48890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 20:01:06 +00:00
John Blackbourn
e11accb411
Networks and Sites: Extract into a new function the email that gets sent to the network administrator when a new site is created, and introduce filters to disable and modify its
...
contents.
* The `send_new_site_email` filter can be used to disable this email.
* The `new_site_email` filter can be used to modify its contents.
Props Dhruvin, Dharm1025, dharmin16, jipmoors
Fixes #42134
Built from https://develop.svn.wordpress.org/trunk@49127
git-svn-id: http://core.svn.wordpress.org/trunk@48889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 19:29:08 +00:00
Sergey Biryukov
8d945f4811
Tests: Use `assertSame()` in `test_edit_user_blank_password()`, for consistency with other assertions.
...
Follow-up to [49118].
See #42766 , #38266 .
Built from https://develop.svn.wordpress.org/trunk@49126
git-svn-id: http://core.svn.wordpress.org/trunk@48888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 15:51:06 +00:00
John Blackbourn
bd1fa2d998
Posts, Post Types: Switch to restoring posts to `draft` status by default when they are untrashed.
...
This allows for edits to be made to a restored post before it goes live again. This also prevents scheduled posts being published unexpectedly if they are untrashed after their originally scheduled date.
The old behaviour of restoring untrashed posts to their original status can be reinstated using the `wp_untrash_post_set_previous_status()` helper function.
Also fixes an issue where the incorrect post ID gets passed to hooks if no post ID is passed to the function.
Props harrym, bananastalktome, jaredcobb, chriscct7, melchoyce, johnbillion, pankajmohale
Fixes #23022
Built from https://develop.svn.wordpress.org/trunk@49125
git-svn-id: http://core.svn.wordpress.org/trunk@48887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 13:39:07 +00:00
Sergey Biryukov
9bfc867e66
Docs: Correct comments in `test_wp_add_dashboard_widget()` per the documentation standards.
...
See #42791 .
Built from https://develop.svn.wordpress.org/trunk@49124
git-svn-id: http://core.svn.wordpress.org/trunk@48886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-11 02:37:07 +00:00
John Blackbourn
da04189357
Administration: Allow context and priority to be specified when adding dashboard widgets.
...
Props davidjlaietta, soulseekah, johnbillion
Fixes #42791
Built from https://develop.svn.wordpress.org/trunk@49123
git-svn-id: http://core.svn.wordpress.org/trunk@48885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:40:05 +00:00
John Blackbourn
cdd8b2cbfa
Site Health: Remove an unused function that was erroneously added when the site health feature was introduced.
...
This function was and is never used as the `is_in_debug_mode` check is a direct one.
Fixes #50282
Built from https://develop.svn.wordpress.org/trunk@49122
git-svn-id: http://core.svn.wordpress.org/trunk@48884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:24:03 +00:00
John Blackbourn
a7fafb3a1b
Build/Test Tools: Set the local development environment to a `local` environment type by default.
...
Props igorradovanov, TimothyBlynJacobs
Fixes #50903
See #33161
Built from https://develop.svn.wordpress.org/trunk@49121
git-svn-id: http://core.svn.wordpress.org/trunk@48883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:15:04 +00:00
John Blackbourn
905460bd5e
Docs: Standardise the type name for booleans and integers.
...
This brings these docs inline with the documentation standards.
Props ravipatel, justinahinon
Fixes #51426
Built from https://develop.svn.wordpress.org/trunk@49120
git-svn-id: http://core.svn.wordpress.org/trunk@48882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 20:02:05 +00:00
John Blackbourn
6b7ba33d68
Docs: Fix the types for some properties and parameters that use the generic `object` type.
...
See #50768
Built from https://develop.svn.wordpress.org/trunk@49119
git-svn-id: http://core.svn.wordpress.org/trunk@48881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 19:14:04 +00:00
Adam Silverstein
e3d280ffd8
Users: prevent saving empty passwords, trim space from password ends on save.
...
Fix an issue where users could save a password with only spaces, or spaces at the beginning or end of their password, preventing them from logging in.
Props ronakganatra, 1naveengiri, ajensen, oolleegg55, bookdude13, nrqsnchz, aristath.
Fixes #42766 .
Built from https://develop.svn.wordpress.org/trunk@49118
git-svn-id: http://core.svn.wordpress.org/trunk@48880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 16:51:07 +00:00
Sergey Biryukov
3e10f5a7e8
Tests: Update third-party video URLs in unit tests with more permanent videos.
...
This brings some consistency to the YouTube and Vimeo URLs used for tests:
* For YouTube, use the video of WordPress 5.0 release.
* For Vimeo, use one of the official test videos.
Props garrett-eclipse, dd32.
Fixes #51487 . See #meta5467.
Built from https://develop.svn.wordpress.org/trunk@49117
git-svn-id: http://core.svn.wordpress.org/trunk@48879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-10 01:39:11 +00:00
John Blackbourn
c1401d7009
General: Docblock improvements for the `WP_Error` class.
...
Props garrett-eclipse
See #38777
Built from https://develop.svn.wordpress.org/trunk@49116
git-svn-id: http://core.svn.wordpress.org/trunk@48878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 22:30:04 +00:00
John Blackbourn
543b14ed0a
General: Introduce the ability to merge multiple `WP_Error` objects into one another, and to store more than one item of data for an error.
...
This allows multiple errors to be instantiated independently but collected into one without having to manually combine their properties.
Props rmccue, dlh, TimothyBlynJacobs
Fixes #38777
Built from https://develop.svn.wordpress.org/trunk@49115
git-svn-id: http://core.svn.wordpress.org/trunk@48877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 22:22:05 +00:00
iandunn
92dacfafaf
Dashboard: Show `2` w.org news items to preserve clustered posts.
...
These days there are often 2 posts published close to each other, like a release announcement and a Month In WordPress post. When that happens, the earlier post is often pushed out of the widget before many people have had a chance to see it.
Ideally, the number of total items would remain at `4`, to reduce visual clutter. Implementing a conditional item would require a significant refactor, though. Increasing the total number of items to `5` is a practical compromise.
Props hlashbrooke, tellyworth.
Fixes #43441 .
Built from https://develop.svn.wordpress.org/trunk@49114
git-svn-id: http://core.svn.wordpress.org/trunk@48876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 16:07:07 +00:00
Sergey Biryukov
c628344422
Accessibility: Widgets: Add a "Cancel" link when editing a widget in accessibility mode.
...
This allows the user to go back without saving any changes to the widget.
Props garrett-eclipse, audrasjb, afercia.
Fixes #49354 .
Built from https://develop.svn.wordpress.org/trunk@49113
git-svn-id: http://core.svn.wordpress.org/trunk@48875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 15:53:08 +00:00
Sergey Biryukov
7a622f6ffd
Tests: Use consistent wording for the `$position` parameter in `add_submenu_page()` tests.
...
This replaces the instances of `$priority` with `$position`, to match the actual parameter name and avoid confusion.
Follow-up to [46197].
See #51344 , #39776 .
Built from https://develop.svn.wordpress.org/trunk@49112
git-svn-id: http://core.svn.wordpress.org/trunk@48874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 13:29:06 +00:00
Sergey Biryukov
4419f9b889
Docs: Correct description for `wp_set_comment_status` hook.
...
The action fires immediately after transitioning a comment's status from one to another in the database and removing the comment from the object cache, but prior to all status transition hooks.
Props davidbaumwald, henry.wright.
Fixes #51481 .
Built from https://develop.svn.wordpress.org/trunk@49111
git-svn-id: http://core.svn.wordpress.org/trunk@48873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 01:28:04 +00:00
Sergey Biryukov
5affd982a0
I18N: Add missing placeholders in some translator comments.
...
Follow-up to [49109].
See #42790 .
Built from https://develop.svn.wordpress.org/trunk@49110
git-svn-id: http://core.svn.wordpress.org/trunk@48872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-09 01:06:03 +00:00
TimothyBlynJacobs
d5ebe12f11
REST API: Introduce Application Passwords for API authentication.
...
In WordPress 4.4 the REST API was first introduced. A few releases later in WordPress 4.7, the Content API endpoints were added, paving the way for Gutenberg and countless in-site experiences. In the intervening years, numerous plugins have built on top of the REST API. Many developers shared a common frustration, the lack of external authentication to the REST API.
This commit introduces Application Passwords to allow users to connect to external applications to their WordPress website. Users can generate individual passwords for each application, allowing for easy revocation and activity monitoring. An authorization flow is introduced to make the connection flow simple for users and application developers.
Application Passwords uses Basic Authentication, and by default is only available over an SSL connection.
Props georgestephanis, kasparsd, timothyblynjacobs, afercia, akkspro, andraganescu, arippberger, aristath, austyfrosty, ayesh, batmoo, bradyvercher, brianhenryie, helen, ipstenu, jeffmatson, jeffpaul, joostdevalk, joshlevinson, kadamwhite, kjbenk, koke, michael-arestad, Otto42, pekz0r, salzano, spacedmonkey, valendesigns.
Fixes #42790 .
Built from https://develop.svn.wordpress.org/trunk@49109
git-svn-id: http://core.svn.wordpress.org/trunk@48871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 22:14:06 +00:00
Sergey Biryukov
897f004a9c
General: Replace older-style PHP type conversion functions with type casts.
...
This improves performance, readability, and consistency throughout core.
* `intval()` → `(int)`
* `strval()` → `(string)`
* `floatval()` → `(float)`
Props ayeshrajans.
Fixes #42918 .
Built from https://develop.svn.wordpress.org/trunk@49108
git-svn-id: http://core.svn.wordpress.org/trunk@48870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 21:15:13 +00:00
Sergey Biryukov
f25804699f
Build/Test Tools: Add missing `<ul>` tag in `tests/qunit/index.html`.
...
Props ravipatel, JeffPaul.
Fixes #51473 .
Built from https://develop.svn.wordpress.org/trunk@49107
git-svn-id: http://core.svn.wordpress.org/trunk@48869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 18:29:07 +00:00
Sergey Biryukov
5f2f199a75
Twenty Ten: Docs: Fix typo in `twentyten_custom_excerpt_more()` DocBlock.
...
Update `@return` tag for `twentyten_auto_excerpt_more()` for consistency with Twenty Eleven.
See #51477 , #50768 .
Built from https://develop.svn.wordpress.org/trunk@49106
git-svn-id: http://core.svn.wordpress.org/trunk@48868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 09:26:02 +00:00
Sergey Biryukov
37c3854083
Twenty Eleven: Docs: Add missing `@return` type for `twentyeleven_auto_excerpt_more()`.
...
Props ravipatel.
Fixes #51477 .
Built from https://develop.svn.wordpress.org/trunk@49105
git-svn-id: http://core.svn.wordpress.org/trunk@48867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 09:23:07 +00:00
noisysocks
92f3ef5980
Tests: Fix dependency tests
...
Fixes test_block_styles_for_editing_with_theme_support and
test_block_styles_for_viewing_with_theme_support by partially reverting [49102]
and only calling wp_should_load_block_editor_scripts_and_styles() when on an
admin screen.
Props TimothyBlynJacobs.
See #51330 .
Built from https://develop.svn.wordpress.org/trunk@49104
git-svn-id: http://core.svn.wordpress.org/trunk@48866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 03:36:04 +00:00
TimothyBlynJacobs
f5c67c386f
REST API: Introduce search term handler.
...
This allows for clients to search the available terms via the `/wp/v2/search` endpoint by using a `type=term` query parameter.
Fixes #51458 .
Props andraganescu, zieladam, noisysocks, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@49103
git-svn-id: http://core.svn.wordpress.org/trunk@48865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 01:32:05 +00:00
noisysocks
0dc073e589
Editor: Only call should_load_block_editor_scripts_and_styles on admin screens
...
Do not call the should_load_block_editor_scripts_and_styles filter on non-admin
screens. This makes it less likely that one will accidentally call
get_current_screen() when it doesn't exist.
Follow-up to [49080].
Props noahtallen.
See #51330 .
Built from https://develop.svn.wordpress.org/trunk@49102
git-svn-id: http://core.svn.wordpress.org/trunk@48864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 01:21:07 +00:00
Andrew Ozz
5cee7eced0
Update jQuery step two:
...
- Add jquery-migrate.js v.3.3.1 to core and load it in debug mode when `SCRIPT_DEBUG` is true.
- Add jquery.min.js, update jquery.js to 3.5.1 non-minified. This should help when debugging.
- Rebuild jQuery UI 1.12.1 and add it to core.
- Fix/adjust tests to match the above changes.
See #50564 .
Built from https://develop.svn.wordpress.org/trunk@49101
git-svn-id: http://core.svn.wordpress.org/trunk@48863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-07 16:33:25 +00:00
desrosj
0c64f0c663
Build/Test Tools: Ensure arguments are passed correctly for `test:php-composer` commands.
...
Follow-up to [49099].
Props swissspidy.
See #51456 .
Built from https://develop.svn.wordpress.org/trunk@49100
git-svn-id: http://core.svn.wordpress.org/trunk@48862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-07 13:21:04 +00:00
desrosj
6af2d1f4a5
Build/Test Tools: Add NPM script for using the Composer installed version of PHPUnit.
...
The `test:php` NPM script runs the PHP test suite using the system installed version of PHPUnit. In some cases, the version of PHPUnit installed through Composer may be preferred.
Currently, this is true when running the test suite using PHP 8. In order to add support for PHP 8 while maintaining compatibility for PHP 5.6.20, PHPUnit 7.x must be used. But, some modifications are required to be compatible with PHP 8 (see [49037], [48957]).
This change introduces the `test:php-composer` NPM script, which will run the test suite using the composer installed version.
Props desrosj, SergeyBiryukov.
Fixes #51456 .
Built from https://develop.svn.wordpress.org/trunk@49099
git-svn-id: http://core.svn.wordpress.org/trunk@48861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-07 13:10:05 +00:00
Sergey Biryukov
520be16b6e
Docs: Add missing `@return` tag for `wp_xmlrpc_server::_is_greater_than_one()`.
...
Props ankitmaru.
Fixes #51465 .
Built from https://develop.svn.wordpress.org/trunk@49098
git-svn-id: http://core.svn.wordpress.org/trunk@48860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-07 11:02:03 +00:00
Sergey Biryukov
a6ef541df0
Coding Standards: Add missing space in `js/_enqueues/lib/comment-reply.js`.
...
Props saqibameen, hareesh-pillai, imath, davidbaumwald.
Fixes #43907 .
Built from https://develop.svn.wordpress.org/trunk@49097
git-svn-id: http://core.svn.wordpress.org/trunk@48859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-07 10:38:08 +00:00
Sergey Biryukov
aef2b539cd
Docs: Correct `@since` version for `add_allowed_options()`.
...
Follow-up to [48121].
Props coffee2code.
Fixes #51450 .
Built from https://develop.svn.wordpress.org/trunk@49096
git-svn-id: http://core.svn.wordpress.org/trunk@48858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-06 15:55:05 +00:00
Sergey Biryukov
2670a6ad14
Docs: Synchronize descriptions of some query functions and their counterpart methods in `WP` and `WP_Query` classes:
...
* `set_query_var()`
* `get_query_var()`
* `get_queried_object()`
* `get_queried_object_id()`
Switch to third-person singular verbs, per the documentation standards.
See #50768 , #42783 .
Built from https://develop.svn.wordpress.org/trunk@49095
git-svn-id: http://core.svn.wordpress.org/trunk@48857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-06 08:59:04 +00:00
noisysocks
088aa1e864
Docs: Improve set_query_var() inline docs.
...
Makes the inline docs for set_query_var() consistent with the inline docs for
get_query_var().
See #42783 .
Props stevenlinx, markparnell.
Built from https://develop.svn.wordpress.org/trunk@49094
git-svn-id: http://core.svn.wordpress.org/trunk@48856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-06 05:40:11 +00:00
noisysocks
274cb9718d
Editor: Rename _should_load_block_editor_scripts_and_styles to wp_should_load_block_editor_scripts_and_styles
...
Follow-up to [49080].
Props zieladam, frank-klein.
See #51330 .
Built from https://develop.svn.wordpress.org/trunk@49093
git-svn-id: http://core.svn.wordpress.org/trunk@48855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-06 04:18:10 +00:00
Sergey Biryukov
dc7bda9620
Docs: Add brackets to function names in some `@see` tags, for consistency.
...
Props ravipatel, davidbaumwald.
Fixes #51441 .
Built from https://develop.svn.wordpress.org/trunk@49092
git-svn-id: http://core.svn.wordpress.org/trunk@48854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-05 14:03:02 +00:00
Sergey Biryukov
bea55db921
Docs: Add missing `@return` tag to `Language_Pack_Upgrader::check_package()`.
...
Synchronize documentation of the `::check_package()` method between `Plugin_Upgrader`, `Theme_Upgrader`, and `Language_Pack_Upgrader`.
Props ankitmaru, mukesh27, desrosj.
Fixes #51448 .
Built from https://develop.svn.wordpress.org/trunk@49091
git-svn-id: http://core.svn.wordpress.org/trunk@48853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-05 13:44:11 +00:00
Sergey Biryukov
1651342d2b
Privacy: Improve clarity of privacy error strings.
...
Primarily this adds "user privacy" to the strings for privacy requests, so they are more easily distinguished from other system actions within logs.
Props garrett-eclipse, carike, birgire.
Fixes #51351 .
Built from https://develop.svn.wordpress.org/trunk@49090
git-svn-id: http://core.svn.wordpress.org/trunk@48852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-04 03:23:09 +00:00
Sergey Biryukov
0f13b2c268
Docs: Add `@since` notes for the `$id` parameter of REST API search controller accepting a string.
...
Follow-up to [49088].
See #51131 .
Built from https://develop.svn.wordpress.org/trunk@49089
git-svn-id: http://core.svn.wordpress.org/trunk@48851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-03 01:22:11 +00:00
TimothyBlynJacobs
e9b5b1a5bc
REST API: Allow for string ids in the search controller.
...
Previously, the search controller infrastructure required that the id property was an integer. This prevents data models that use a string id from utilizing the search infrastructure.
This commit lifts the restraint that search handlers return integer ids. This will allow for the Post Formats search handler coming in 5.6 to use slugs instead of creating fake ids.
Props stoyangeorgiev.
Fixes #51131 .
Built from https://develop.svn.wordpress.org/trunk@49088
git-svn-id: http://core.svn.wordpress.org/trunk@48850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-02 17:47:09 +00:00
Adam Silverstein
f426a1fa04
Media: clear inputs after cropping on attachment details screen.
...
Clear the crop selection input fields after the crop action is complete.
Fixes unexpected re-cropping behavior if the crop button was clicked more than once.
Props davidbinda.
Fixes #30155 .
Built from https://develop.svn.wordpress.org/trunk@49087
git-svn-id: http://core.svn.wordpress.org/trunk@48849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-02 15:11:06 +00:00
Sergey Biryukov
f880f14080
Coding Standards: Make checks for an empty post in `wp-includes/post.php` more consistent.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@49086
git-svn-id: http://core.svn.wordpress.org/trunk@48848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-02 12:37:06 +00:00
Helen Hou-Sandí
b6641140fd
Tests: Fix a linting error in a test.
...
See #50679 .
Built from https://develop.svn.wordpress.org/trunk@49085
git-svn-id: http://core.svn.wordpress.org/trunk@48847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 21:44:09 +00:00
Helen Hou-Sandí
b108d4db71
Media: Don't unnecessarily check for a valid attachment before getting meta.
...
This makes `wp_get_attachment_metadata()` run significantly faster. See ticket for benchmarking.
Props Tkama, donmhico.
Fixes #50679 .
Built from https://develop.svn.wordpress.org/trunk@49084
git-svn-id: http://core.svn.wordpress.org/trunk@48846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 17:55:06 +00:00
Helen Hou-Sandí
e9d572f431
WP Date: Add timezone abbreviation to wp-date settings.
...
Props mkaz.
Fixes #50624 .
Built from https://develop.svn.wordpress.org/trunk@49083
git-svn-id: http://core.svn.wordpress.org/trunk@48845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 17:43:08 +00:00
TimothyBlynJacobs
69b9b23c49
REST API: Support the patternProperties JSON Schema keyword.
...
Props yakimun.
Fixes #51024 .
Built from https://develop.svn.wordpress.org/trunk@49082
git-svn-id: http://core.svn.wordpress.org/trunk@48844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 02:49:12 +00:00
Sergey Biryukov
0d52ba511c
Docs: Add missing `@since` entry for `_should_load_block_editor_scripts_and_styles()`.
...
Follow-up to [49080].
See #51330 .
Built from https://develop.svn.wordpress.org/trunk@49081
git-svn-id: http://core.svn.wordpress.org/trunk@48843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 01:14:04 +00:00
noisysocks
96f963a2b9
Editor: Add should_load_block_editor_scripts_and_styles
...
Adds a new should_load_block_editor_scripts_and_styles filter which can be used
by plugins including Gutenberg to more precisely customise when block editor
scripts and styles should be loaded by script-loader.php. Previously, plugins
had to fiddle with $current_screen->is_block_editor().
Props zieladam.
See #51330 .
Built from https://develop.svn.wordpress.org/trunk@49080
git-svn-id: http://core.svn.wordpress.org/trunk@48842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 00:39:04 +00:00
Sergey Biryukov
ca7063fd60
Script Loader: Update versions for MediaElement.js and related files.
...
Follow-up to [49070].
See #51315 .
Built from https://develop.svn.wordpress.org/trunk@49079
git-svn-id: http://core.svn.wordpress.org/trunk@48841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-01 00:04:05 +00:00
John Blackbourn
1079647d30
Docs: Various docblock improvements related to user and site signup functionality.
...
See #50768
Built from https://develop.svn.wordpress.org/trunk@49078
git-svn-id: http://core.svn.wordpress.org/trunk@48840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 21:54:07 +00:00
Sergey Biryukov
f7ba7c931c
Build/Test Tools: Remove PHP 8 from allowed failures.
...
With all known unit test issues now addressed, WordPress 5.6 aims to support PHP 8 as much as possible.
See #50913 , #50902 .
Built from https://develop.svn.wordpress.org/trunk@49077
git-svn-id: http://core.svn.wordpress.org/trunk@48839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 16:05:06 +00:00
Sergey Biryukov
829fc28a93
Code Modernization: Ignore the `_multiwidget` property when collecting widget numbers in `WP_Customize_Manager::import_theme_starter_content()`.
...
PHP 8 changes the way string to number comparisons are performed: https://wiki.php.net/rfc/string_to_number_comparison
In particular, when calling `max()` on an array with numeric values and a non-numeric string, in PHP 8 the string is returned instead of a number.
For `::import_theme_starter_content()`, this resulted in retrieving the `_multiwidget` property instead of the maximum widget number for a particular type.
By explicitly ignoring the `_multiwidget` property, we make sure to retrieve the correct widget number value.
Follow-up to [48960], [49043].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49076
git-svn-id: http://core.svn.wordpress.org/trunk@48838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 15:46:08 +00:00
Sergey Biryukov
09570be924
Docs: Fix typos in some DocBlocks in `js/_enqueues/wp/api.js`.
...
Additionally, rename a variable for clarity.
Props mukesh27.
Fixes #51420 .
Built from https://develop.svn.wordpress.org/trunk@49075
git-svn-id: http://core.svn.wordpress.org/trunk@48837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 13:54:06 +00:00
Sergey Biryukov
36c3a480c8
Build/Test Tools: Comment out the `xdebug` group test run for PHP 8 for now.
...
Xdebug supports PHP 8 only from version 3.0, which is not released yet.
Once Xdebug 3.0 is released and included in the Docker image, this should be uncommented again.
Follow-up to [48957], [49037].
See #50913 , #50902 .
Built from https://develop.svn.wordpress.org/trunk@49074
git-svn-id: http://core.svn.wordpress.org/trunk@48836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 13:14:04 +00:00
Sergey Biryukov
bdccfa3a03
Code Modernization: Check if the file to retrieve metadata from in `get_file_data()` was successfully opened.
...
This avoids a fatal error on PHP 8 caused by passing a `false` value to `fread()`, instead of a file resource.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49073
git-svn-id: http://core.svn.wordpress.org/trunk@48835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 12:20:03 +00:00
Sergey Biryukov
e43ff0e991
Code Modernization: Return `false` from `wpdb::query()` if the query was filtered to an empty string using the `query` filter.
...
This avoids a fatal error on PHP 8 caused by passing an empty string to `mysqli_query()`, and maintains the current behaviour.
Follow-up to [48980], [48981].
See #50913 , #50639 .
Built from https://develop.svn.wordpress.org/trunk@49072
git-svn-id: http://core.svn.wordpress.org/trunk@48834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 12:09:08 +00:00
Sergey Biryukov
b3b8942dfc
Docs: Correct description for `wp_ajax_update_widget()`.
...
Follow-up to [28355].
Props burhandodhy, sabernhardt.
Fixes #44583 .
Built from https://develop.svn.wordpress.org/trunk@49071
git-svn-id: http://core.svn.wordpress.org/trunk@48833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-30 09:44:09 +00:00
desrosj
f3168fa073
External Libraries: Update MediaElementJS to version 4.2.16.
...
This change brings a handful of bug fixes made since the previous update in [46436]. For a full list of changes included, see https://github.com/mediaelement/mediaelement/compare/4.2.13...4.2.16 .
Props mukesh27, hareesh-pillai, SergeyBiryukov.
Fixes #51315 .
Built from https://develop.svn.wordpress.org/trunk@49070
git-svn-id: http://core.svn.wordpress.org/trunk@48832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-29 15:53:06 +00:00
Sergey Biryukov
d660801d27
Tests: Require `imagejpeg()` function in Ajax media editing tests.
...
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045], [49050], [49052].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49069
git-svn-id: http://core.svn.wordpress.org/trunk@48831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-29 14:16:07 +00:00
Sergey Biryukov
12a36355e6
Code Modernization: Remove a single trailing percent sign before calling `sprintf()` on the `$default` parameter in `get_theme_mod()`.
...
This avoids a "Missing format specifier at end of string" fatal error on PHP 8, and maintains the current behaviour.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49068
git-svn-id: http://core.svn.wordpress.org/trunk@48830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-29 10:03:08 +00:00
Sergey Biryukov
41681b29b0
Posts, Post Types: Avoid a PHP notice in `wp_get_shortlink()` if the post type is no longer registered.
...
Props apedog.
Fixes #51376 .
Built from https://develop.svn.wordpress.org/trunk@49067
git-svn-id: http://core.svn.wordpress.org/trunk@48829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-28 11:53:08 +00:00
Sergey Biryukov
f1f579199b
Docs: Clarify the `false` return value of `get_post_type_archive_link()` and `get_post_type_archive_feed_link()`.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@49066
git-svn-id: http://core.svn.wordpress.org/trunk@48828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-28 11:12:03 +00:00
Sergey Biryukov
249451fe08
Docs: Correct formatting for the `autosave()` function return value in `js/_enqueues/wp/autosave.js`.
...
Props dilipbheda, mukesh27.
Fixes #51401 .
Built from https://develop.svn.wordpress.org/trunk@49065
git-svn-id: http://core.svn.wordpress.org/trunk@48827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-28 10:46:05 +00:00
Sergey Biryukov
2cbcc5d548
Media: Make the "Copy URL" button implementation more consistent with other instances in core:
...
* Make the "Copied!" text green.
* Make the button verbiage clear that it's copied "to clipboard".
Props garrett-eclipse, mukesh27.
Fixes #51355 .
Built from https://develop.svn.wordpress.org/trunk@49064
git-svn-id: http://core.svn.wordpress.org/trunk@48826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 20:48:05 +00:00
TimothyBlynJacobs
bed5797cf6
REST API: Support the multipleOf JSON Schema keyword.
...
Props yakimun.
Fixes #51022 .
Built from https://develop.svn.wordpress.org/trunk@49063
git-svn-id: http://core.svn.wordpress.org/trunk@48825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 19:03:05 +00:00
Sergey Biryukov
6bdbb8b25c
Media: Check if the item is defined before setting the `skipHistory` property in media frame router.
...
This avoids a JS error when refreshing the "Attachment details" modal for an item that is not currently queried.
Follow-up to [41021].
Props Mista-Flo, mukesh27.
Fixes #51395 .
Built from https://develop.svn.wordpress.org/trunk@49062
git-svn-id: http://core.svn.wordpress.org/trunk@48824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 08:50:06 +00:00
Sergey Biryukov
c298458751
Docs: Add missing `@return` tags for some `WP_Automatic_Updater` methods:
...
* `::is_vcs_checkout()`
* `::should_update()`
* `::send_core_update_notification_email()`
Props ankitmaru, mukesh27.
Fixes #51385 .
Built from https://develop.svn.wordpress.org/trunk@49061
git-svn-id: http://core.svn.wordpress.org/trunk@48823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 08:36:06 +00:00
Sergey Biryukov
d36da091c4
Taxonomy: Restore documentation for the `taxonomy` parameter of `wp_list_categories()`.
...
The parameter's default value is different from the one in `WP_Term_Query::__construct()`, and should be documented accordingly.
This also clarifies that the `taxonomy` parameter of `wp_list_categories()` only accepts a string, not an array.
Follow-up to [40903], [41767], [45894], [45895].
Props grapplerulrich, mukesh27, TimothyBlynJacobs, SergeyBiryukov.
Fixes #51378 . See #47896 .
Built from https://develop.svn.wordpress.org/trunk@49060
git-svn-id: http://core.svn.wordpress.org/trunk@48822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 08:19:04 +00:00
Sergey Biryukov
5c3a734df0
Docs: Correct description for the `taxonomy` parameter of `wp_dropdown_categories()`.
...
Follow-up to [40903], [41767].
Props grapplerulrich, mukesh27, TimothyBlynJacobs.
See #51378 .
Built from https://develop.svn.wordpress.org/trunk@49059
git-svn-id: http://core.svn.wordpress.org/trunk@48821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 07:49:06 +00:00
Sergey Biryukov
a8b070b56b
Docs: Fix typo in a comment in `js/media/routers/manage.js`.
...
Props mukesh27, garrett-eclipse.
Fixes #51397 .
Built from https://develop.svn.wordpress.org/trunk@49058
git-svn-id: http://core.svn.wordpress.org/trunk@48820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 07:38:05 +00:00
Sergey Biryukov
bf2edf9cab
External Libraries: Backport a commit from sodium_compat trunk to fix a PHP 8 error.
...
This addresses an "Undefined constant `MB_OVERLOAD_STRING`" fatal error in the `ParagonIE_Sodium_Core_Util::isMbStringOverride()` method.
In PHP 8, the `MB_OVERLOAD_STRING` constant has been removed, along with the `mbstring` function overloading feature.
Fixes #51399 .
Built from https://develop.svn.wordpress.org/trunk@49057
git-svn-id: http://core.svn.wordpress.org/trunk@48819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 05:17:05 +00:00
Sergey Biryukov
67752b98e0
Upgrade/Install: Update sodium_compat to v1.13.0.
...
This includes a few autoloader fixes and improvements.
A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.12.1...v1.13.0
See #51399 .
Built from https://develop.svn.wordpress.org/trunk@49056
git-svn-id: http://core.svn.wordpress.org/trunk@48818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-27 04:46:05 +00:00
TimothyBlynJacobs
0db3f859ea
Add ircs and irc6 to the list of allowed protocols.
...
This adds support for the secure and ipv6 variants of the already allowed irc protocol.
Props arealnobrainer, markparnell, ctmartin.
Built from https://develop.svn.wordpress.org/trunk@49055
git-svn-id: http://core.svn.wordpress.org/trunk@48817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 21:02:04 +00:00
TimothyBlynJacobs
bf397c8d89
REST API: Correct @since version after [49053].
...
See #51023 .
Built from https://develop.svn.wordpress.org/trunk@49054
git-svn-id: http://core.svn.wordpress.org/trunk@48816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 18:56:04 +00:00
TimothyBlynJacobs
9951662ebb
REST API: Support the minProperties and maxProperties JSON Schema keywords.
...
Props yakimun.
Fixes #51023 .
Built from https://develop.svn.wordpress.org/trunk@49053
git-svn-id: http://core.svn.wordpress.org/trunk@48815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 18:20:07 +00:00
Sergey Biryukov
c9def12900
Tests: Require `imagejpeg()` function in `WP_Widget_Media_Image::render_media()` test.
...
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
This test relies on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045], [49050].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49052
git-svn-id: http://core.svn.wordpress.org/trunk@48814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 14:52:07 +00:00
Sergey Biryukov
2e56bb91a8
Tests: Correct assertion in `WP_Test_REST_Comments_Controller::check_comment_data()`.
...
`author_avatar_urls` should be present in the comment data array keys, not values.
The test only passed accidentally due to `assertContains()` not performing a strict type check.
See #38266 , #50913 .
Built from https://develop.svn.wordpress.org/trunk@49051
git-svn-id: http://core.svn.wordpress.org/trunk@48813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 03:14:07 +00:00
Sergey Biryukov
cd1f30e28d
Tests: Require `imagejpeg()` function in one more media test.
...
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
This test relies on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49050
git-svn-id: http://core.svn.wordpress.org/trunk@48812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 02:34:06 +00:00
Sergey Biryukov
346794bc57
Upload: Add a check in `wp_check_filetype_and_ext()` to account for CSV files having the `application/csv` MIME type.
...
Previously, the PHP Fileinfo extension used to detect CSV files as `text/plain`.
In PHP 8, this has changed, and CSV files are detected as `application/csv`.
Follow-up to [44438].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49049
git-svn-id: http://core.svn.wordpress.org/trunk@48811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-26 01:11:09 +00:00
John Blackbourn
eaf325e386
Upgrade/Install: Introduce the `wp_installed_email` filter for filtering the contents of the email sent when WordPress is installed, without needing to override the `wp_new_blog_notification()` pluggable function.
...
Props Dharm1025, nikolam, johnbillion
Fixes #42133
Built from https://develop.svn.wordpress.org/trunk@49048
git-svn-id: http://core.svn.wordpress.org/trunk@48810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 22:33:08 +00:00
Sergey Biryukov
fe9e57c1c3
Tests: Require `imagejpeg()` function in some REST API attachments controller tests.
...
This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025], [49045].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49047
git-svn-id: http://core.svn.wordpress.org/trunk@48809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 02:23:04 +00:00
Sergey Biryukov
5d31e4368e
Tests: Correct the check for image sizes in some REST API attachments controller tests.
...
If the sizes data could not be retrieved, the controller returns an empty object instead of an array.
This makes sure that the value is in fact an array before proceeding, and outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
Follow-up to [49044].
See #50913 , #51393 .
Built from https://develop.svn.wordpress.org/trunk@49046
git-svn-id: http://core.svn.wordpress.org/trunk@48808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 02:11:03 +00:00
Sergey Biryukov
0485a4ad01
Tests: Require `imagejpeg()` function in some more media tests.
...
This outputs a proper message if the requirement is not met, instead of an obscure PHP error further in the test.
These tests rely on multiple resized copies of a test JPEG image being generated and available.
Follow-up to [49010], [49024], [49025].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49045
git-svn-id: http://core.svn.wordpress.org/trunk@48807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 01:45:04 +00:00
Sergey Biryukov
312f42f375
Tests: Check if image sizes were successfully retrieved in some REST API attachments controller tests.
...
This outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
Props TimothyBlynJacobs.
See #50913 , #51393 .
Built from https://develop.svn.wordpress.org/trunk@49044
git-svn-id: http://core.svn.wordpress.org/trunk@48806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 01:31:04 +00:00
Sergey Biryukov
4f8f42747f
Code Modernization: Correct the check for `parent` argument in `wp_insert_term()` and `wp_update_term()`.
...
PHP 8 changes the way string to number comparisons are performed: https://wiki.php.net/rfc/string_to_number_comparison
In particular, checking if a non-empty, non-numeric string is greater than zero in PHP 8 evaluates to `true`, not `false`.
For `wp_insert_term()`, this resulted in a "Parent term does not exist" error for a non-numeric string, instead of discarding the value.
By explicitly casting the value to `int`, we make sure to compare both values as numbers, rather than a string and a number.
Follow-up to [29196], [29830], [29867].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49043
git-svn-id: http://core.svn.wordpress.org/trunk@48805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-25 00:04:04 +00:00
Sergey Biryukov
cfe5b1c9f2
Docs: Add a `@since` note to `wp_privacy_exports_dir` and `wp_privacy_exports_url` filters about exports using relative paths since WordPress 5.5.
...
When changing exports location via these filters, make sure to migrate the files to the new directory, to avoid breaking any existing exports.
Follow-up to [48127], [48330].
Props garrett-eclipse.
Fixes #51361 .
Built from https://develop.svn.wordpress.org/trunk@49042
git-svn-id: http://core.svn.wordpress.org/trunk@48804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-24 05:00:06 +00:00
noisysocks
8fa8aad136
Documentation: Add 'template' arg documentation
...
Add inline documentation for the 'template' arg accepted by
register_post_type().
Props milana_cap.
See #46261 .
Built from https://develop.svn.wordpress.org/trunk@49041
git-svn-id: http://core.svn.wordpress.org/trunk@48803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-24 03:12:04 +00:00
noisysocks
41b456eca9
Editor: Hide Screen Options tab from block editor
...
The block editor provides its own interface for managing screen options, so we
can safely hide Screen Options tab found in the top right of the page.
Props aduth.
See #46157 .
Built from https://develop.svn.wordpress.org/trunk@49040
git-svn-id: http://core.svn.wordpress.org/trunk@48802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-24 03:00:08 +00:00
Sergey Biryukov
c10acd850e
Build/Test Tools: Use trunk revision 2387243 of the WordPress Importer plugin.
...
This revision includes a change to only call `libxml_disable_entity_loader()` in PHP < 8, in order for unit tests in the `import` group to pass on PHP 8.
This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading is disabled by default, so this function is no longer needed to protect against XXE attacks.
Follow-up to [46542], [48789].
Props jrf.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49039
git-svn-id: http://core.svn.wordpress.org/trunk@48801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-23 18:39:07 +00:00
Sergey Biryukov
5c1889f3d8
Docs: Remove obsolete `$wpdb` global reference from `get_site_by_path()`.
...
Follow-up to [37628].
Props ravivaddweb, mukesh27.
Fixes #51380 .
Built from https://develop.svn.wordpress.org/trunk@49038
git-svn-id: http://core.svn.wordpress.org/trunk@48800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-23 14:11:07 +00:00
Sergey Biryukov
a610519297
Tests: Backport two changes from PHPUnit 9.3:
...
* Replace the `Match` interface with `ParametersMatch`, to avoid parse errors due to `match` being a reserved keyword in PHP 8.
* Replace `ReflectionParameter::getClass()` usage, which is deprecated in PHP 8.
This allows tests relying on the `getMockForAbstractClass()` and `getMockBuilder()` methods to run again on PHP 8.
When the test suite is updated for compatibility with PHPUnit 9.x, these overrides can be removed.
Follow-up to [48972].
See #50913 , #50902 .
Built from https://develop.svn.wordpress.org/trunk@49037
git-svn-id: http://core.svn.wordpress.org/trunk@48799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-23 13:54:07 +00:00
Sergey Biryukov
d4a319c453
Users: Check if the user ID passed as `selected` to `wp_dropdown_users()` corresponds to an existing user.
...
This avoids a few PHP notices if the `include_selected` parameter was specified and a non-existing user ID was passed.
Props campusboy1987.
Fixes #51370 .
Built from https://develop.svn.wordpress.org/trunk@49036
git-svn-id: http://core.svn.wordpress.org/trunk@48798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-23 00:27:07 +00:00
desrosj
a16faa6989
Privacy: Ensure bulk action related strings end with periods.
...
Props garrett-eclipse, mukesh27.
Fixes #51371 .
Built from https://develop.svn.wordpress.org/trunk@49035
git-svn-id: http://core.svn.wordpress.org/trunk@48797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-22 18:40:04 +00:00
desrosj
6ff2fbb6cd
External Libraries: Upgrade PHPMailer to version 6.1.7.
...
For a full list of changes in this update, see the PHPMailer GitHub: https://github.com/PHPMailer/PHPMailer/compare/v6.1.6...v6.1.7 .
Props ayeshrajans, jrf.
Fixes #51311 .
Built from https://develop.svn.wordpress.org/trunk@49034
git-svn-id: http://core.svn.wordpress.org/trunk@48796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-22 18:37:08 +00:00
Sergey Biryukov
b7431cfa83
Tests: Use consistent trailing punctuation in `fail()` messages.
...
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49033
git-svn-id: http://core.svn.wordpress.org/trunk@48795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-22 12:34:04 +00:00
Sergey Biryukov
d9346ea967
Tests: Check if image metadata for a particular size was successfully retrieved in some media tests.
...
This outputs a proper message in case of failure, instead of an obscure PHP error further in the test.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49032
git-svn-id: http://core.svn.wordpress.org/trunk@48794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-22 12:32:07 +00:00
TimothyBlynJacobs
883ace38f1
REST API: Regenerate test fixtures after [48982].
...
Props garrett-eclipse.
Fixes #50805 .
Built from https://develop.svn.wordpress.org/trunk@49031
git-svn-id: http://core.svn.wordpress.org/trunk@48793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 22:54:06 +00:00
Sergey Biryukov
5d99107bf3
Tests: Fix typo in some `markTestSkipped()` messages.
...
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49030
git-svn-id: http://core.svn.wordpress.org/trunk@48792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 20:20:07 +00:00
John Blackbourn
175c2c5b7c
Users: Introduce the `invited_user_email` filter for filtering the contents of the email sent when an existing user is invited to a site on Multisite.
...
Props contact-banker, anand.au14, nikolam, johnbillion
Fixes #42132
Built from https://develop.svn.wordpress.org/trunk@49029
git-svn-id: http://core.svn.wordpress.org/trunk@48791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 17:16:07 +00:00
John Blackbourn
aef504acfd
Docs: Correct the indentation for some array type docs.
...
See #50768
Built from https://develop.svn.wordpress.org/trunk@49028
git-svn-id: http://core.svn.wordpress.org/trunk@48790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 16:46:06 +00:00
Sergey Biryukov
790983eca4
Tests: Use consistent trailing punctuation in `markTestSkipped()` messages.
...
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49027
git-svn-id: http://core.svn.wordpress.org/trunk@48789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 14:07:05 +00:00
Sergey Biryukov
29c0edfbba
Privacy: Check if the accumulated data in `wp_privacy_process_personal_data_export_page()` is not empty.
...
This avoids an error on PHP 8 caused by passing an empty string to `array_merge()`, instead of an array.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49026
git-svn-id: http://core.svn.wordpress.org/trunk@48788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 13:51:03 +00:00
Sergey Biryukov
a95e9a91da
Tests: Convert a few more `function_exists()` and `extension_loaded()` checks to `@requires` annotations.
...
This better utilizes the PHPUnit native functionality.
Follow-up to [49024].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49025
git-svn-id: http://core.svn.wordpress.org/trunk@48787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 13:27:02 +00:00
Sergey Biryukov
1e39e21616
Tests: Convert the checks for `imagejpeg()` function availability to use the `@requires` annotation.
...
This better utilizes the PHPUnit native functionality.
Props ayeshrajans, jrf, johnbillion.
Fixes #50639 . See #50640 .
Built from https://develop.svn.wordpress.org/trunk@49024
git-svn-id: http://core.svn.wordpress.org/trunk@48786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 11:36:04 +00:00
Sergey Biryukov
6e5ca746e1
General: Give the `$is` variable in `is_wp_error()` a more descriptive name.
...
Follow-up to [49022].
See #40568 .
Built from https://develop.svn.wordpress.org/trunk@49023
git-svn-id: http://core.svn.wordpress.org/trunk@48785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-21 11:13:05 +00:00
John Blackbourn
964d0784be
General: Introduce the `wp_error_added` and `wp_error_checked` actions.
...
These actions allow debugging tools to track `WP_Error` instances as they're created and subsequently passed between functions which check for error objects.
Props Shelob9, Mte90, TimothyBlynJacobs, johnbillion
Fixes #40568
Built from https://develop.svn.wordpress.org/trunk@49022
git-svn-id: http://core.svn.wordpress.org/trunk@48784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 17:44:07 +00:00
John Blackbourn
aba2165aae
Media: Standardise the description for image size parameters.
...
This brings continuity to all the image related functions and filters which accept or pass a size parameter.
Props dilipbheda, johnbillion
Fixes #47364
Built from https://develop.svn.wordpress.org/trunk@49021
git-svn-id: http://core.svn.wordpress.org/trunk@48783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 16:23:07 +00:00
John Blackbourn
0b2e31a7f8
Docs: Inline documentation improvements for media related functions and hooks.
...
See #47364 , #50768
Built from https://develop.svn.wordpress.org/trunk@49020
git-svn-id: http://core.svn.wordpress.org/trunk@48782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 15:55:10 +00:00
Sergey Biryukov
2884b7b1b7
Media: Return a `WP_Error` from `WP_Image_Editor_GD::load()` if file contents could not be retrieved.
...
This avoids an error on PHP 8 caused by calling `imagecreatefromstring()` on an empty result.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49019
git-svn-id: http://core.svn.wordpress.org/trunk@48781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 14:28:05 +00:00
Sergey Biryukov
8752dbaaba
Tests: Correctly unset non-supported image editor engines in some image tests.
...
Follow-up to [49009], [49014].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49018
git-svn-id: http://core.svn.wordpress.org/trunk@48780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 14:15:03 +00:00
John Blackbourn
43b11121de
Media: Correct some types for attachment ID parameters passed to functions and filters.
...
See #47364 , #50768
Built from https://develop.svn.wordpress.org/trunk@49017
git-svn-id: http://core.svn.wordpress.org/trunk@48779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 14:05:05 +00:00
John Blackbourn
e22107ce4e
Media: Correct some types in docblocks for filters related to thumbnails.
...
Props dilipbheda
See #47364 , #50768
Built from https://develop.svn.wordpress.org/trunk@49016
git-svn-id: http://core.svn.wordpress.org/trunk@48778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:40:04 +00:00
Sergey Biryukov
e6fd778208
Tests: Use more specific assertions in `Tests_Image_Functions::test_load_directory()`.
...
This avoids an error on PHP 8 caused by calling `get_resource_type()` on a string.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49015
git-svn-id: http://core.svn.wordpress.org/trunk@48777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:33:04 +00:00
Sergey Biryukov
a29b071f80
Tests: Optimize some image tests to avoid checking for image editor engines availability twice.
...
Follow-up to [49009].
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49014
git-svn-id: http://core.svn.wordpress.org/trunk@48776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:27:05 +00:00
John Blackbourn
7d61c45afc
I18N: Add a language icon next to the Default Language network option.
...
Fixes #51359
Built from https://develop.svn.wordpress.org/trunk@49013
git-svn-id: http://core.svn.wordpress.org/trunk@48775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:18:05 +00:00
John Blackbourn
ecfff6fe80
Media: Correct the image thumbnail logic in media templates.
...
This ensures the correct data properties are checked before displaying image thumbnails.
Props chetan200891
Fixes #49655
Built from https://develop.svn.wordpress.org/trunk@49012
git-svn-id: http://core.svn.wordpress.org/trunk@48774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 13:15:04 +00:00
John Blackbourn
123806ff28
Themes: Remove the ability to delete themes from the single site Appearance screen on Multisite installations.
...
This brings theme deletion inline with plugin deletion and theme and plugin editing, which can only be performed from within Network Admin.
Props Mista-Flo, williampatton, johnbillion
Fixes #41441
Built from https://develop.svn.wordpress.org/trunk@49011
git-svn-id: http://core.svn.wordpress.org/trunk@48773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 12:03:05 +00:00
Sergey Biryukov
e8f35359d7
Tests: Consistently require `imagejpeg()` function in `image_make_intermediate_size()` tests.
...
This outputs a proper message if the requirement is not met, instead of an obscure PHP error further in the test.
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49010
git-svn-id: http://core.svn.wordpress.org/trunk@48772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 03:33:05 +00:00
Sergey Biryukov
795e4ebd31
Tests: Skip some image tests if neither GD nor Imagick image editor engines are supported on the system.
...
The explicit message brings some consistency with other image editor tests, specifically the ones using the `WP_Image_UnitTestCase` class.
Previously, the tests were marked as "risky" in that scenario, due to performing no assertions.
See #50639 , #50640 .
Built from https://develop.svn.wordpress.org/trunk@49009
git-svn-id: http://core.svn.wordpress.org/trunk@48771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 02:47:05 +00:00
Sergey Biryukov
8791de899a
Coding Standards: Fix WPCS issue in [49007].
...
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49008
git-svn-id: http://core.svn.wordpress.org/trunk@48770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 01:18:04 +00:00
Sergey Biryukov
9e3b5d2f12
Tests: Fix the failures in REST API `format` keyword validation tests on PHP 8.
...
The tests ensure that `rest_sanitize_value_from_schema()` and `rest_validate_value_from_schema()` throw an "undefined offset" notice when the required `type` schema keyword is not passed.
In PHP 8, that notice is now a warning, so the tests need to be adjusted accordingly.
Follow-up to [48300], [48993].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@49007
git-svn-id: http://core.svn.wordpress.org/trunk@48769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-20 00:57:06 +00:00
Sergey Biryukov
4ae2bafafd
Tests: Add missing `@covers` tags for files in `phpunit/tests/functions/`.
...
Props pbearne, jrf.
See #39265 .
Built from https://develop.svn.wordpress.org/trunk@49006
git-svn-id: http://core.svn.wordpress.org/trunk@48768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 15:54:03 +00:00
Sergey Biryukov
9bb4b76044
Tests: Speed up slashed data tests by reusing some more shared fixtures.
...
Follow-up to [35249], [49003].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49005
git-svn-id: http://core.svn.wordpress.org/trunk@48767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 11:12:04 +00:00
Sergey Biryukov
b27ebaa269
Coding Standards: Give the `$id` variable in slashed data tests a more descriptive name.
...
See #50767 , #51344 .
Built from https://develop.svn.wordpress.org/trunk@49004
git-svn-id: http://core.svn.wordpress.org/trunk@48766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 10:55:05 +00:00
Sergey Biryukov
54fe0e0698
Tests: Speed up slashed data tests by reusing shared fixtures.
...
Follow-up to [35249].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49003
git-svn-id: http://core.svn.wordpress.org/trunk@48765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 10:36:03 +00:00
Sergey Biryukov
c50c266e51
Tests: Speed up tests for `wp_allow_comment()` by reusing shared fixtures.
...
Props frank-klein.
Fixes #51216 .
Built from https://develop.svn.wordpress.org/trunk@49002
git-svn-id: http://core.svn.wordpress.org/trunk@48764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 09:27:06 +00:00
Sergey Biryukov
f2a2ffbf2c
Tests: Simplify the logic in `WP_UnitTestCase_Base::setUpBeforeClass()` and `::tearDownAfterClass()`.
...
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@49001
git-svn-id: http://core.svn.wordpress.org/trunk@48763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 09:13:07 +00:00
Peter Wilson
b1505c2d9c
Posts, Post Types: Ensure default terms are added by `wp_publish_post()`.
...
Transitioning posts from `auto-draft` to `publish` via `wp_publish_post()` could result in published posts without the default category or custom taxonomy default terms.
Props frank-klein, TimothyBlynJacobs, peterwilsoncc.
Fixes #51292 .
Built from https://develop.svn.wordpress.org/trunk@49000
git-svn-id: http://core.svn.wordpress.org/trunk@48762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-19 01:22:08 +00:00
Sergey Biryukov
88ea2929b7
Tests: Simplify `PluralFormsTest::test_exceptions()`.
...
Previously, the test had to use an older pattern for catching the generic `Exception` exceptions for compatibility with PHPUnit 3.6 on PHP 5.2.
Now that WordPress supports PHPUnit 5.4 as the minimum version, the `expectException()` method can be used directly.
Follow-up to [41725], [41730].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@48999
git-svn-id: http://core.svn.wordpress.org/trunk@48761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 14:13:03 +00:00
Sergey Biryukov
0e0c620dee
Docs: Update the code example in `WP_Ajax_UnitTestCase::dieHandler()` DocBlock to use `expectException()`.
...
Follow-up to [48996], [48997].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@48998
git-svn-id: http://core.svn.wordpress.org/trunk@48760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 13:55:04 +00:00
Sergey Biryukov
b69db72a08
Tests: Switch Ajax tests to use the `expectException()` method directly, instead of the `WP_UnitTestCase_Base::setExpectedException()` wrapper.
...
This brings some consistency with other tests.
Follow-up to [48996].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@48997
git-svn-id: http://core.svn.wordpress.org/trunk@48759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 13:50:04 +00:00
Sergey Biryukov
e42779f9a0
Tests: Consistently use the `expectException()` method instead of the older `@expectedException` annotation.
...
See https://thephp.cc/news/2016/02/questioning-phpunit-best-practices
The method is available since PHPUnit 5.2, and WordPress currently supports PHPUnit 5.4 as the minimum version.
Follow-up to [48993].
See #51344 .
Built from https://develop.svn.wordpress.org/trunk@48996
git-svn-id: http://core.svn.wordpress.org/trunk@48758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 13:24:07 +00:00
Sergey Biryukov
68d3c5ca56
Docs: Add a `@since` note about `adjacent_posts_rel_link_wp_head()` no longer being used in core.
...
Follow-up to [48966].
Props jnylen0.
See #39111 .
Built from https://develop.svn.wordpress.org/trunk@48995
git-svn-id: http://core.svn.wordpress.org/trunk@48757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 11:06:04 +00:00
Sergey Biryukov
0cdab6e91d
Docs: Add a `@since` note for the `recovery_mode_email` filter about the `$email` argument now including the `attachments` key.
...
Follow-up to [48964].
See #51276 .
Built from https://develop.svn.wordpress.org/trunk@48994
git-svn-id: http://core.svn.wordpress.org/trunk@48756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 11:03:02 +00:00
Sergey Biryukov
6f4de5f31a
Tests: Fix the failure in `test_get_weekday_undefined_index()` on PHP 8.
...
The test ensures that `WP_Locale::get_weekday()` throws an "undefined offset" notice when called with an incorrect `$weekday_number` parameter.
In PHP 8, that notice is now a warning, so the test needs to be adjusted accordingly.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48993
git-svn-id: http://core.svn.wordpress.org/trunk@48755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 10:58:03 +00:00
Sergey Biryukov
ddefc9ee9a
Twenty Twenty: Update the URL for PHP date formats table in translator comments.
...
Follow-up to [48991].
Props hareesh-pillai, mukesh27, iandunn.
Fixes #51335 . See #51332 .
Built from https://develop.svn.wordpress.org/trunk@48992
git-svn-id: http://core.svn.wordpress.org/trunk@48754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 10:44:04 +00:00
Sergey Biryukov
d5b8d282e8
Docs: Update the URL for PHP date formats table in translator comments.
...
Props hareesh-pillai, iandunn.
Fixes #51332 .
Built from https://develop.svn.wordpress.org/trunk@48991
git-svn-id: http://core.svn.wordpress.org/trunk@48753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-18 10:37:08 +00:00
Sergey Biryukov
e1a05a42d3
Comments: Assign the array of comment data returned from the `comments_pre_query` filter to the `comments` property of the current `WP_Comment_Query` instance.
...
This avoids the performance overhead of calling `WP_Comment_Query::get_comments()` twice: first when creating the object instance, then to retrieve the filtered results.
This also makes the filter a bit more consistent with other similar filters, e.g. `posts_pre_query`, `terms_pre_query`, or `users_pre_query`.
Follow-up to [46086].
Props dinhtungdu, imath, spacedmonkey, adamsilverstein, SergeyBiryukov.
Fixes #50521 .
Built from https://develop.svn.wordpress.org/trunk@48990
git-svn-id: http://core.svn.wordpress.org/trunk@48752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 19:55:08 +00:00
antpb
541796de46
Media: Allow contextually generated images to show in Media Library grid view.
...
In grid view, contextually generated or cropped media is filtered out causing page numbering to be offset and incorrect. This also impacted any media utilizing `media-models.js`.
Props webmandesign, audrasjb, afercia, pbiron, mista-flo.
Fixes #46127 , #50410 , #47215 .
Built from https://develop.svn.wordpress.org/trunk@48989
git-svn-id: http://core.svn.wordpress.org/trunk@48751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 14:42:04 +00:00
Sergey Biryukov
359119a31e
Tests: Move the `data_wp_site_query_meta_query()` data provider next to the test it's used in.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48988
git-svn-id: http://core.svn.wordpress.org/trunk@48750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 11:30:02 +00:00
Sergey Biryukov
226dc9fc2c
Docs: Correct comments in `comments_pre_query`, `networks_pre_query`, and `sites_pre_query` tests.
...
Follow-up to [44983], [46086].
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48987
git-svn-id: http://core.svn.wordpress.org/trunk@48749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 11:20:04 +00:00
Sergey Biryukov
e01409866e
Docs: Reformat `comments_pre_query`, `networks_pre_query`, `sites_pre_query` DocBlocks for better readability.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48986
git-svn-id: http://core.svn.wordpress.org/trunk@48748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 11:10:03 +00:00
Sergey Biryukov
b66ff2f68d
Docs: Fix typo in `*_pre_query` filter DocBlocks.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48985
git-svn-id: http://core.svn.wordpress.org/trunk@48747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 10:45:03 +00:00
Sergey Biryukov
06e53b90a1
Docs: Correct the parameter type for `networks_pre_query` filter.
...
The filter should return the network count as an integer if `$this->query_vars['count']` is set.
Follow-up to [46100].
See #50768 , #47599 .
Built from https://develop.svn.wordpress.org/trunk@48984
git-svn-id: http://core.svn.wordpress.org/trunk@48746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 10:37:05 +00:00
Sergey Biryukov
ac00862f44
Formatting: Make sure `links_add_target()` adds the `target` attribute to the correct tag.
...
Previously, the attribute could unintentionally be added to a tag that starts with the same characters, e.g. `<aside>` instead of `<a>`.
Props antonlukin.
Fixes #51313 .
Built from https://develop.svn.wordpress.org/trunk@48983
git-svn-id: http://core.svn.wordpress.org/trunk@48745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-17 10:14:07 +00:00
Helen Hou-Sandí
75262781d9
i18n: Ensure block type strings in the REST API end with a full stop.
...
Props ramiy, justinahinon.
Fixes #50805 .
Built from https://develop.svn.wordpress.org/trunk@48982
git-svn-id: http://core.svn.wordpress.org/trunk@48744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-16 19:23:07 +00:00
Sergey Biryukov
eef2e5c85c
Code Modernization: Return an empty string from `wpdb::prepare()` if there are not enough arguments to match the placeholders.
...
This avoids a fatal error on PHP 8 caused by passing mismatched arguments to `vsprintf()`, and maintains the current behaviour.
Follow-up to [48979], [48980].
See #50913 , #50639 .
Built from https://develop.svn.wordpress.org/trunk@48981
git-svn-id: http://core.svn.wordpress.org/trunk@48743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-16 02:29:06 +00:00
Sergey Biryukov
9734ed5673
Code Modernization: Return an empty string from `wpdb::_real_escape()` if a non-scalar value is passed.
...
This avoids a fatal error on PHP 8 caused by passing a non-string value to ` mysqli_real_escape_string()`, and maintains the current behaviour.
See #50913 , #50639 .
Built from https://develop.svn.wordpress.org/trunk@48980
git-svn-id: http://core.svn.wordpress.org/trunk@48742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-16 01:48:10 +00:00
Sergey Biryukov
b37e0cec1b
Tests: Revert [48973].
...
These tests ensure that a `_doing_it_wrong()` notice is thrown when `wpdb::prepare()` is called incorrectly, but also that the function will still handle the provided input as correctly as possible.
Disabling these tests on PHP 8 hides a problem, i.e. the function will no longer throw a notice and handle things correctly, it will now cause a white screen of death due to a fatal error.
That is a backward compatibility break, and `wpdb::prepare()` should be updated instead to maintain the original behaviour on PHP 8.
Props jrf, ayeshrajans.
See #50913 , #50639 .
Built from https://develop.svn.wordpress.org/trunk@48979
git-svn-id: http://core.svn.wordpress.org/trunk@48741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-16 01:35:09 +00:00
Sergey Biryukov
3838ecccdd
Build/Test Tools: Restore the `QUnit` global in JSHint config for QUnit.
...
Follow-up to [47512], [48977].
See #51312 , #37117 .
Built from https://develop.svn.wordpress.org/trunk@48978
git-svn-id: http://core.svn.wordpress.org/trunk@48740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-15 10:09:07 +00:00
Sergey Biryukov
79ab76f5d8
Build/Test Tools: Remove unused legacy globals from JSHint config for QUnit.
...
Follow-up to [47512].
Props TimoTijhof.
Fixes #51312 . See #37117 .
Built from https://develop.svn.wordpress.org/trunk@48977
git-svn-id: http://core.svn.wordpress.org/trunk@48739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-15 10:04:05 +00:00
Sergey Biryukov
042bdf66fd
Docs: Document the usage of `$wpdb` global in `wp_delete_attachment_files()`.
...
Props jontyravi.
Fixes #51309 .
Built from https://develop.svn.wordpress.org/trunk@48976
git-svn-id: http://core.svn.wordpress.org/trunk@48738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-14 13:43:04 +00:00
Sergey Biryukov
d1dbc3c69d
Docs: Document the usage of `$wpdb` global in `wp_get_post_autosave()`.
...
Follow-up to [48422].
Props ravivaddweb.
Fixes #51308 . See #34560 .
Built from https://develop.svn.wordpress.org/trunk@48975
git-svn-id: http://core.svn.wordpress.org/trunk@48737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-14 13:37:06 +00:00
Sergey Biryukov
f851814996
Tests: Correct assertion in `Tests_DB::test_prepare_incorrect_arg_count()`.
...
On failure, `wpdb::prepare()` returns either an empty string or `null`, not `false`.
The test only passed accidentally due to `assertEquals()` not performing a strict type check.
Follow-up to [41662].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48974
git-svn-id: http://core.svn.wordpress.org/trunk@48736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-13 15:21:06 +00:00
Sergey Biryukov
7e2c6d63b7
Tests: Require PHP less than 8.0 for some `wpdb` tests.
...
These tests ensure that `wpdb::prepare()` throws a `_doing_it_wrong()` notice when called with an incorrect number of arguments, or with arguments of a wrong type.
PHP 8 introduces similar error messages natively, making these tests redundant on PHP 8.0 or later.
Follow-up to [41470], [41662].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48973
git-svn-id: http://core.svn.wordpress.org/trunk@48735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-13 02:49:06 +00:00
Sergey Biryukov
a2947f7054
Tests: Replace the native PHPUnit `getMockForAbstractClass()` and `getMockBuilder()` methods.
...
This avoids parse errors in PHPUnit internals due to `match` being a reserved keyword in PHP 8.
To run on PHP 8, the tests relying on these methods require PHPUnit 9.3 or later.
When the test suite is updated for compatibility with PHPUnit 9.x, these overrides can be removed.
See #50913 , #50902 .
Built from https://develop.svn.wordpress.org/trunk@48972
git-svn-id: http://core.svn.wordpress.org/trunk@48734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-13 02:38:07 +00:00
Sergey Biryukov
282c813259
Coding Standards: Explicitly declare the `$wp_version` global used in some core files.
...
Props jaydeep-rami, sabernhardt.
Fixes #44932 .
Built from https://develop.svn.wordpress.org/trunk@48971
git-svn-id: http://core.svn.wordpress.org/trunk@48733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-12 00:12:08 +00:00
Sergey Biryukov
f29d62012d
Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-plugin-install-list-table.php`.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48970
git-svn-id: http://core.svn.wordpress.org/trunk@48732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-11 01:05:08 +00:00
Helen Hou-Sandí
4e5211a691
REST API: Include attribute name in schema validation error message.
...
Props bobbingwide.
Fixes #51231 .
Built from https://develop.svn.wordpress.org/trunk@48969
git-svn-id: http://core.svn.wordpress.org/trunk@48731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-10 16:34:11 +00:00
Sergey Biryukov
e36c7f0ba0
Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-plugins-list-table.php`.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48968
git-svn-id: http://core.svn.wordpress.org/trunk@48730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-10 14:23:08 +00:00
Sergey Biryukov
7dada5df2f
Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-ms-themes-list-table.php`.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48967
git-svn-id: http://core.svn.wordpress.org/trunk@48729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-10 14:21:09 +00:00
John Blackbourn
526f0d01d4
Posts, Post Types: Don't output the adjacent posts `rel` link by default.
...
This has a considerable performance impact on sites which don't otherwise show previous and next post links, and has no SEO benefit.
Props joostdevalk, swissspidy, johnbillion
Fixes #39111
Built from https://develop.svn.wordpress.org/trunk@48966
git-svn-id: http://core.svn.wordpress.org/trunk@48728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 21:34:08 +00:00
Helen Hou-Sandí
447b526379
Privacy: Remove extraneous colon from settings screen.
...
Props vinita29, garrett-eclipse.
Fixes #50414 .
Built from https://develop.svn.wordpress.org/trunk@48965
git-svn-id: http://core.svn.wordpress.org/trunk@48727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 19:43:08 +00:00
desrosj
8e9e942215
Site Health: Allow attachments to be added to recovery mode emails.
...
The `wp_mail()` function has the ability to add attachments to emails. There is currently no way to add attachments to the recovery mode email sent out to site admins when a PHP error is encountered on their site.
This change adds that ability through the use of the `recovery_mode_email` filter, allowing developers to use the full capabilities of `wp_mail()`.
Props desrosj, timothyblynjacobs.
Fixes #51276 .
Built from https://develop.svn.wordpress.org/trunk@48964
git-svn-id: http://core.svn.wordpress.org/trunk@48726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 16:21:06 +00:00
desrosj
04c8217724
Administration: Add the `aria-hidden` attribute to admin menu icons.
...
The admin menu icons are included as a visual element to support the text links. Without the `aria-hidden=“true”` attribute, they are also exposed to assistive technologies (which can process icon fonts in unpredictable ways).
This change improves the experience for multiple types of assistive technologies, including screen reading and voice control software. With `aria-hidden=“true”` added, the icons will not be read, and a user can now trigger a click of a top level admin menu item with commands such as “click posts”, or “click plugins”.
Props joedolson, afercia, audrasjb, adriantirusli.
Fixes #51012 .
Built from https://develop.svn.wordpress.org/trunk@48963
git-svn-id: http://core.svn.wordpress.org/trunk@48725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 16:15:06 +00:00
desrosj
5be5b975c3
Docs: Improve the `recovery_mode_email` inline docs.
...
See #51267 , #50768 .
Built from https://develop.svn.wordpress.org/trunk@48962
git-svn-id: http://core.svn.wordpress.org/trunk@48724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 15:48:07 +00:00
Sergey Biryukov
649348cf5b
Code Modernization: Remove unnecessary reference sign from `get_comment()` definition.
...
This fixes a PHP 8 "argument must be passed by reference, value given" error when using `array_map( 'get_comment', ... )`.
Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around.
Note: This reverts [48838], which is now redundant.
Follow-up to a similar change for `get_post()` in [21572].
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48961
git-svn-id: http://core.svn.wordpress.org/trunk@48723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 03:55:07 +00:00
Sergey Biryukov
7c60a660f1
Code Modernization: Correct the check for negative post IDs in `WP_Query::parse_query()` to work as expected on PHP 8.
...
PHP 8 changes the way string to number comparisons are performed: https://wiki.php.net/rfc/string_to_number_comparison
In particular, checking if an empty string is less than zero in PHP 8 evaluates to `true`, not `false`.
For `WP_Query`, this resulted in unintentionally returning a 404 error for most of front-end requests, instead of the relevant content.
By explicitly casting the value to `int`, we make sure to compare both values as numbers, rather than a string and a number.
Follow-up to [38288].
Props trepmal.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48960
git-svn-id: http://core.svn.wordpress.org/trunk@48722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-09 02:35:06 +00:00
Sergey Biryukov
17a4c20d55
Comments: Check if a valid comment ID was passed when editing a comment.
...
This avoids a PHP notice after submitting the Edit Comment form.
Props regan.khadgi.
Fixes #51263 .
Built from https://develop.svn.wordpress.org/trunk@48958
git-svn-id: http://core.svn.wordpress.org/trunk@48720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-08 13:41:08 +00:00
Sergey Biryukov
ed86c0da6c
Build/Test Tools: Allow unit tests to run on PHP 8 in full.
...
PHP 8 introduces a new control structure called `match`, which makes `match` a reserved keyword in PHP 8.
One of the PHPUnit dependencies declares a class named `Match`, which triggered a fatal error before PHPUnit could even start.
To be able to use PHPUnit 7.x on PHP 8 and run the tests, core needs a new version of that dependency, which is now installed using Composer.
This is the simplest way to get things working again and start addressing the individual test failures.
Additionally, various test runs on PHP 8 on Travis are now performed individually instead of being chained, so that failures outside of WP scope don't block further execution.
Props jrf, jorbin, pento.
See #50902 .
Built from https://develop.svn.wordpress.org/trunk@48957
git-svn-id: http://core.svn.wordpress.org/trunk@48719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-07 19:23:05 +00:00
Sergey Biryukov
f01b307dc1
Tests: Replace a few instances of `assertNotEquals()` with `assertNotFalse()`.
...
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48954
git-svn-id: http://core.svn.wordpress.org/trunk@48716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-07 04:13:09 +00:00
Sergey Biryukov
d52809e5f1
Tests: Remove the polyfill for `assertNotFalse()`.
...
`assertNotFalse()` is available in PHPUnit since version 4.0.
The polyfill was introduced back when WordPress still supported PHP 5.2 and PHPUnit 3.6.x, and is now redundant.
Follow-up to [39919], [45058], [47880].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48953
git-svn-id: http://core.svn.wordpress.org/trunk@48715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-07 03:28:04 +00:00
Sergey Biryukov
cb67321277
Tests: Add a polyfill for `assertEqualsWithDelta()` to `WP_UnitTestCase` and use it where appropriate.
...
`assertEqualsWithDelta()` was added in PHPUnit 7.5, while WordPress still supports PHPUnit 5.4.x as the minimum version.
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48952
git-svn-id: http://core.svn.wordpress.org/trunk@48714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-07 03:14:04 +00:00
TimothyBlynJacobs
55c21acc9f
REST API: Extract `WP_REST_Controller::get_endpoint_args_for_item_schema()` to a standalone function.
...
This method is useful whenever a JSON Schema needs to be converted to a format suitable for argument validation with `WP_REST_Request`. Moving the logic into a standalone function allows developers to use it outside of the `WP_REST_Controller` context.
Props pentatonicfunk.
Fixes #50876 .
Built from https://develop.svn.wordpress.org/trunk@48951
git-svn-id: http://core.svn.wordpress.org/trunk@48713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-07 02:37:07 +00:00
Sergey Biryukov
6cbbd32eb5
Tests: Add a test case for storing `false` in the cache.
...
Follow-up to [20089], [48949].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48950
git-svn-id: http://core.svn.wordpress.org/trunk@48712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-06 04:25:04 +00:00
Sergey Biryukov
b4e2dc1331
Tests: Correct assertion in `Tests_Cache::test_add_get_null()`.
...
It is possible to store `null` in the cache without it being converted to an empty string.
Follow-up to [20089].
Props johnbillion, SergeyBiryukov.
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48949
git-svn-id: http://core.svn.wordpress.org/trunk@48711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-06 03:37:04 +00:00
Sergey Biryukov
628a149789
Tests: Correct assertion in `Tests_Cache::test_miss()`.
...
On failure to retrieve contents, `WP_Object_Cache::get()` returns `false`, not `null`.
The test only passed accidentally due to `assertEquals()` not performing a strict type check.
Props johnbillion.
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48948
git-svn-id: http://core.svn.wordpress.org/trunk@48710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-06 02:53:08 +00:00
TimothyBlynJacobs
a63708debf
REST API: Refactor `WP_REST_Server::dispatch()` to make internal logic reusable.
...
#50244 aims to introduce batch processing in the REST API. An important feature is the ability to enforce that all requests have valid data before executing the route callbacks in "pre-validate" mode.
This necessitates splitting `WP_REST_Server::dispatch()` into two methods so the batch controller can determine the request handler to perform pre-validation and then respond to the requests.
The two new methods, `match_request_to_handler` and `respond_to_request`, have a public visibility, but are marked as `@access private`. This is to allow for iteration on the batch controller to happen in the Gutenberg repository. Developers should not rely upon these methods, their visibility may change in the future.
See #50244 .
Props andraganescu, zieladam, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@48947
git-svn-id: http://core.svn.wordpress.org/trunk@48709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 21:52:07 +00:00
Sergey Biryukov
93b8183327
Media: In `wp_ajax_image_editor()`, check if the `error` property exists before accessing it.
...
This avoids a PHP notice when editing an image.
Follow-up to [48375].
Props Mista-Flo.
Fixes #51251 .
Built from https://develop.svn.wordpress.org/trunk@48946
git-svn-id: http://core.svn.wordpress.org/trunk@48708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 18:12:08 +00:00
TimothyBlynJacobs
f43ca27db9
REST API: Support a route-level validation callback.
...
Most request data is validated on a per-parameter basis. Often, however, additional validation is needed that operates on the entire request object. Currently, this is done in the route callback and often in the `prepare_item_for_database` method specifically.
#50244 aims to introduce batch processing in the REST API. An important feature is the ability to enforce that all requests have valid data before executing the route callbacks in "pre-validate" mode.
This patch introduces support for calling a `validate_callback` after all parameter validation has succeeded. That allows moving more validation outside of the route callback and into `WP_REST_Request` which will improve "pre-validate" support.
Props TimothyBlynJacobs, zieladam.
Fixes #51255 .
See #50244 .
Built from https://develop.svn.wordpress.org/trunk@48945
git-svn-id: http://core.svn.wordpress.org/trunk@48707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 18:09:06 +00:00
Sergey Biryukov
63b15a6fd6
Tests: Replace a few more instances of `assertEquals()` with `assertSame()`.
...
These were previously missed due to incorrect capitalization.
Follow-up to [48937], [48939], [48940].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48944
git-svn-id: http://core.svn.wordpress.org/trunk@48706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 16:49:07 +00:00
Sergey Biryukov
e05edbcd53
Comments: Rename `WP_Comments_List_Table::comment_status_dropdown()` to `::comment_type_dropdown()`.
...
This better reflects the purpose of the method, which doesn't have anything to do with a comment status.
Follow-up to [48521].
Props davidbaumwald, johnbillion, SergeyBiryukov.
Fixes #51248 .
Built from https://develop.svn.wordpress.org/trunk@48943
git-svn-id: http://core.svn.wordpress.org/trunk@48705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-05 00:33:05 +00:00
Sergey Biryukov
dd03a5a156
Docs: Further correct placement for `wp_editor_expand` filter DocBlock.
...
This ensures that the filter is only applied if the conditions before it are evaluated to true.
Follow-up to [48714].
Props johnbillion.
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48942
git-svn-id: http://core.svn.wordpress.org/trunk@48704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 21:48:07 +00:00
John Blackbourn
d0a32c5111
Docs: Various docblock corrections and improvements.
...
See #50768
Built from https://develop.svn.wordpress.org/trunk@48941
git-svn-id: http://core.svn.wordpress.org/trunk@48703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 20:41:07 +00:00
Sergey Biryukov
7ad3a59ca4
Tests: Replace a few more instances of `assertEquals()` with `assertSame()`.
...
These were previously missed due to incorrect capitalization.
Follow-up to [48937], [48939].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48940
git-svn-id: http://core.svn.wordpress.org/trunk@48702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 07:38:06 +00:00
Sergey Biryukov
fab9a6e435
Tests: Introduce `assertSameSets()` and `assertSameSetsWithIndex()`, and use them where appropriate.
...
This ensures that not only the array values being compared are equal, but also that their type is the same.
These new methods replace most of the existing instances of `assertEqualSets()` and `assertEqualSetsWithIndex()`.
Going forward, stricter type checking by using `assertSameSets()` or `assertSameSetsWithIndex()` should generally be preferred, to make the tests more reliable.
Follow-up to [48937].
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48939
git-svn-id: http://core.svn.wordpress.org/trunk@48701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-04 07:02:05 +00:00
Sergey Biryukov
6d0491119e
Administration: Give the `$error` variable in `wp-admin/admin-header.php` a more descriptive name.
...
This avoids a conflict with the same global variable used elsewhere, e.g. in Theme Editor.
Follow-up to [48850].
Props vinayak.anivase.
Fixes #51219 .
Built from https://develop.svn.wordpress.org/trunk@48938
git-svn-id: http://core.svn.wordpress.org/trunk@48700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-03 01:43:07 +00:00
Sergey Biryukov
831c62ea8e
Tests: First pass at using `assertSame()` instead of `assertEquals()` in most of the unit tests.
...
This ensures that not only the return values match the expected results, but also that their type is the same.
Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.
Props johnbillion, jrf, SergeyBiryukov.
See #38266 .
Built from https://develop.svn.wordpress.org/trunk@48937
git-svn-id: http://core.svn.wordpress.org/trunk@48699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-02 00:37:09 +00:00
Sergey Biryukov
675f4fa43a
General: Set `svn:eol-style` for `phpunit/includes/normalize-xml.xsl`.
...
Follow-up to [48072], [48845].
See #51113 .
Built from https://develop.svn.wordpress.org/trunk@48931
git-svn-id: http://core.svn.wordpress.org/trunk@48693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-01 16:50:09 +00:00
Sergey Biryukov
593624f182
General: Correct reversed `svn:auto-props` for `.mo` and `.po` files.
...
* `.mo` files are binary and should have `svn:mime-type=application/octet-stream`.
* `.po` files are text and should have `svn:eol-style=native`, same as `.pot` files.
Follow-up to [46636], [48845].
See #51113 .
Built from https://develop.svn.wordpress.org/trunk@48930
git-svn-id: http://core.svn.wordpress.org/trunk@48692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-01 16:40:08 +00:00
Sergey Biryukov
0418dad234
Docs: Synchronize the description of the `$format` parameter in various date/time functions for posts and comments.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48929
git-svn-id: http://core.svn.wordpress.org/trunk@48691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-09-01 00:43:06 +00:00
Sergey Biryukov
2df5ec1234
Tests: Move the tests for `get_the_modified_time()` to a more appropriate place.
...
Add some new tests to better cover the functionality, for consistency with `get_the_date()` and `get_the_time()`.
Follow-up to [48911], [48912], [48918].
Props wittich.
Fixes #51184 .
Built from https://develop.svn.wordpress.org/trunk@48924
git-svn-id: http://core.svn.wordpress.org/trunk@48686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 22:43:05 +00:00
Sergey Biryukov
68dfbf51d9
Script Loader: Add backward compatibility for JavaScript i18n globals and properties deprecated in WordPress 5.5.
...
The recommended approach for any plugins using these globals or properties is to switch to the newer `wp.i18n` functions.
In the meantime, this ensures that accessing any of these globals does not break the rest of the code on the page, and an appropriate warning message is logged to the JavaScript console.
Follow-up to: https://core.trac.wordpress.org/query?summary=~wp.i18n&milestone=5.5
Props omarreiss, peterwilsoncc, kbjohnson90, johnbillion, TimothyBlynJacobs, joostdevalk, ocean90, desrosj, SergeyBiryukov.
Fixes #51123 .
Built from https://develop.svn.wordpress.org/trunk@48923
git-svn-id: http://core.svn.wordpress.org/trunk@48685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 20:30:03 +00:00
Sergey Biryukov
d3abb209e1
Date/Time: In `get_the_date()` and related functions, pass the original, unmodified `$format` value to the filters.
...
Additionally, simplify the `$format` argument checks for consistency with similar checks in `get_the_modified_date()` and `get_the_modified_time()`.
Follow-up to [48912].
Props Rarst.
See #51184 .
Built from https://develop.svn.wordpress.org/trunk@48918
git-svn-id: http://core.svn.wordpress.org/trunk@48680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 18:30:05 +00:00
Sergey Biryukov
d4d3e23ad0
Themes: Normalize the installed theme path in `Theme_Installer_Skin::do_overwrite()` before comparing with the uploaded theme.
...
This ensures that the data for the currently installed theme is picked up properly when uploading a theme update on Windows.
Follow-up to [48390].
Props bobbingwide, wpamitkumar, mukesh27.
Fixes #51182 .
Built from https://develop.svn.wordpress.org/trunk@48913
git-svn-id: http://core.svn.wordpress.org/trunk@48675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 17:11:04 +00:00
Sergey Biryukov
aec28121b3
Date/Time: Make sure `get_the_date()` and related functions return correct time if the format was specified as `false`.
...
Technically, the `$format` argument should always be a string, but passing `false` used to work before [47808], so this restores backward compatibility.
The list of affected functions:
* `get_the_date()`
* `get_the_time()`
* `get_comment_date()`
* `get_comment_time()`
Props wittich, Rarst, akabarikalpesh, SergeyBiryukov.
Fixes #51184 .
Built from https://develop.svn.wordpress.org/trunk@48912
git-svn-id: http://core.svn.wordpress.org/trunk@48674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 15:58:04 +00:00
Sergey Biryukov
e501d8ead8
Tests: Bring some consistency to Date/Time tests:
...
* Move some tests from `post.php` to a more appropriate location in the `date` directory.
* Rename `date/postTime.php` to `date/getPostTime.php` to match the function name.
Props Rarst.
See #51184 .
Built from https://develop.svn.wordpress.org/trunk@48911
git-svn-id: http://core.svn.wordpress.org/trunk@48673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 15:35:05 +00:00
Sergey Biryukov
ee33a7b019
Docs: Add a `@since` note to the `display_post_states` filter to clarify that it is now also applied in the Customizer context.
...
If any admin functions are used within the filter, their existence should be checked with `function_exists()` before being used.
Follow-up to [47763], [48620].
Props audrasjb, garrett-eclipse, Howdy_McGee, dlh, khag7, SergeyBiryukov.
Fixes #51081 .
Built from https://develop.svn.wordpress.org/trunk@48910
git-svn-id: http://core.svn.wordpress.org/trunk@48672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 13:32:04 +00:00
Sergey Biryukov
94555079eb
Docs: Clarify the usage of `null` for `auto_update_{$type}` filter.
...
The value is internally used to detect whether nothing has hooked into this filter.
Props audrasjb, pbiron, johnbillion, SergeyBiryukov.
Fixes #50848 .
Built from https://develop.svn.wordpress.org/trunk@48909
git-svn-id: http://core.svn.wordpress.org/trunk@48671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 13:20:07 +00:00
Sergey Biryukov
06fc8fa3f5
Tests: Reset the `$wp_sitemap` global after each test, so that sitemaps are re-initialized when the next test runs.
...
This ensures consistent results in query var tests, regardless of whether they are run in isolation or as part of a larger group of tests.
Props pbiron, peterwilsoncc.
Fixes #51154 .
Built from https://develop.svn.wordpress.org/trunk@48908
git-svn-id: http://core.svn.wordpress.org/trunk@48670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-31 03:59:05 +00:00
Sergey Biryukov
ccd5fc2c8f
Tests: Move the tests for `selected()` and `checked()` to a more appropriate place.
...
Convert the tests to use data providers.
Props wittich.
Fixes #51166 .
Built from https://develop.svn.wordpress.org/trunk@48907
git-svn-id: http://core.svn.wordpress.org/trunk@48669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-30 01:36:08 +00:00
Sergey Biryukov
be4ad8548c
Administration: Correct the padding for "Warning: these pages should not be the same" messages on Reading Settings screen.
...
Replace the legacy `.error` class with a more appropriate `.notice-warning`.
Props musicaljoeker, shital-patel, man4toman, garrett-eclipse, SergeyBiryukov.
Fixes #50766 .
Built from https://develop.svn.wordpress.org/trunk@48906
git-svn-id: http://core.svn.wordpress.org/trunk@48668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-29 00:42:05 +00:00
Sergey Biryukov
af523447f4
Media: Make the `is_gd_image()` function available on front end.
...
This avoids a fatal error if a plugin calls image creation or editing functions like `wp_imagecreatetruecolor()` outside of the admin.
Follow-up to [48798]
Props BackuPs.
Fixes #51174 . See #50833 .
Built from https://develop.svn.wordpress.org/trunk@48905
git-svn-id: http://core.svn.wordpress.org/trunk@48667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-28 16:45:06 +00:00
Sergey Biryukov
12b68c6671
Comments: Check if reply heading text node exists before accessing its property in `comment-reply.js`.
...
Follow-up to [47506], [48876].
Props johannadevos, mailnew2ster.
Fixes #38009 .
Built from https://develop.svn.wordpress.org/trunk@48904
git-svn-id: http://core.svn.wordpress.org/trunk@48666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-28 13:12:06 +00:00
Sergey Biryukov
71ffaac835
Docs: Correct formatting of the `auto_theme_update_send_email` filter DocBlock.
...
Synchronize description of the `$enabled` parameter with the `auto_plugin_update_send_email` filter.
Follow-up to [48889].
See #50768 , #50988 .
Built from https://develop.svn.wordpress.org/trunk@48903
git-svn-id: http://core.svn.wordpress.org/trunk@48665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-28 02:38:05 +00:00
Sergey Biryukov
308f752596
Upgrade/Install: Only display the auto-update links on the Network Admin > Themes screen for themes that support the feature.
...
Follow-up to [48669], [48688].
Props afragen, pbiron, audrasjb, desrosj, SergeyBiryukov.
Fixes #51129 .
Built from https://develop.svn.wordpress.org/trunk@48899
git-svn-id: http://core.svn.wordpress.org/trunk@48661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 22:24:07 +00:00
Sergey Biryukov
3cd1c953b2
Script Loader: Disable concatenation for scripts with translations to ensure they are printed in the right order.
...
Props herregroen, ocean90, desrosj, mikeyarce, bobbingwide, audrasjb, johnbillion.
Fixes #50999 .
Built from https://develop.svn.wordpress.org/trunk@48897
git-svn-id: http://core.svn.wordpress.org/trunk@48659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 21:58:04 +00:00
Sergey Biryukov
c19f5ae907
Bootstrap/Load: Check if the `__()` function is available in `wp_get_environment_type()`.
...
The function would not exist in `SHORTINIT` mode.
Follow-up to [48894].
See #50992 .
Built from https://develop.svn.wordpress.org/trunk@48895
git-svn-id: http://core.svn.wordpress.org/trunk@48657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 21:39:05 +00:00
Sergey Biryukov
da19724be9
Bootstrap/Load: Remove the ability to alter the list of environment types in `wp_get_environment_type()`.
...
The intention of `wp_get_environment_type()` is to provide a consistent means of identifying the environment type, not of identifying a specific environment.
Actual environments should fit within one of the existing types: `local`, `development`, `staging`, or `production`. That should cover the types that plugins and themes might be concerned about when toggling functionality.
Props johnbillion, joostdevalk, TimothyBlynJacobs, jeremyfelt, batmoo, claytoncollie, Clorith, markjaquith, garrett-eclipse, GaryJ, elrae.
Fixes #50992 .
Built from https://develop.svn.wordpress.org/trunk@48894
git-svn-id: http://core.svn.wordpress.org/trunk@48656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 21:32:08 +00:00
Sergey Biryukov
bf2b283b6b
Tests: Update `wp_add_inline_script()` unit tests to account for the `jquery` handle being an alias for `jquery-core` again.
...
Follow-up to [48323], [48324], [48890].
Props davidbaumwald, audrasjb.
See #50919 .
Built from https://develop.svn.wordpress.org/trunk@48892
git-svn-id: http://core.svn.wordpress.org/trunk@48654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 20:54:07 +00:00
Sergey Biryukov
4c4952d3f9
Script Loader: Change the `jquery` handle back to an alias for `jquery-core`.
...
This ensures that `wp_localize_script( 'jquery', ... )` continues to work as expected, since `WP_Scripts::localize()` rewrites the `jquery` handle to `jquery-core` internally.
Follow-up to [48323].
Props mukesh27, rajeshsingh520, johnbillion, TimothyBlynJacobs, TobiasBg.
Fixes #50919 .
Built from https://develop.svn.wordpress.org/trunk@48890
git-svn-id: http://core.svn.wordpress.org/trunk@48652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 20:33:04 +00:00
desrosj
2aba7550c4
Upgrade/Install: Pass details about the specific plugin and theme updates attempted to filters.
...
This adds an additional parameter to the `auto_plugin_update_send_email` and `auto_theme_update_send_email` filters to provide the additional context of which updates were attempted and their outcome. This will help plugin and theme auto-update emails to be better tailored to a site owner’s liking.
Props audrasjb, Paddy Landau, desrosj.
Fixes #50988 .
Built from https://develop.svn.wordpress.org/trunk@48888
git-svn-id: http://core.svn.wordpress.org/trunk@48650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 19:27:03 +00:00
desrosj
b0fd7c18e8
Build/Test Tools: Update the package lock file.
...
Follow up to [48884].
See #51151 .
Built from https://develop.svn.wordpress.org/trunk@48886
git-svn-id: http://core.svn.wordpress.org/trunk@48648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 18:58:06 +00:00
jorgefilipecosta
e9e6e0dbe6
Editor: update packages.
...
The following package versions were changed:
@wordpress/block-directory: 1.13.6 -> 1.13.7
@wordpress/block-editor: 4.3.6 -> 4.3.7
@wordpress/block-library: 2.22.6 -> 2.22.7
@wordpress/components: 10.0.5 -> 10.0.6
@wordpress/edit-post: 3.21.6 -> 3.21.7
@wordpress/editor: 9.20.6 -> 9.20.7
@wordpress/format-library: 1.22.6 -> 1.22.7
@wordpress/list-reusable-blocks: 1.21.5 -> 1.21.6
@wordpress/nux: 3.20.5 -> 3.20.6
@wordpress/server-side-render: 1.16.5 -> 1.16.6
Includes PR WordPress/gutenberg#24828
Props nosolosw, desrosj, SergeyBiryukov, youknowriad.
Fixes : #51151 .
Built from https://develop.svn.wordpress.org/trunk@48884
git-svn-id: http://core.svn.wordpress.org/trunk@48646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 16:36:39 +00:00
TimothyBlynJacobs
ae5fb83507
REST API: Fix multi-type schemas with integer fields.
...
In [48306] support for multi-typed schemas was improved to first detect the data type of the value before applying further validation. The `integer` data type was detected using the new `rest_is_integer` function. This function used logic, however, that assumed that the value had already passed an `is_numeric` check. This meant that if `integer` and `string` were both acceptable types, the value would always be considered an `integer` causing the later accurate type validation to fail.
This commit fixes the `rest_is_integer` logic to include an `is_numeric` check.
Props rtagliento.
Fixes #51146 .
Built from https://develop.svn.wordpress.org/trunk@48881
git-svn-id: http://core.svn.wordpress.org/trunk@48643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 02:57:03 +00:00
Sergey Biryukov
604b273c0f
Taxonomy: Make sure `wp_terms_checklist()` and `Walker_Category_Checklist::start_el()` properly handle an array of strings as `selected_cats` or `popular_cats` values.
...
Even with these values documented as an array of integers, they can technically also accept an array of strings, e.g. as form results.
Add a unit test.
Props brianhogg, TimothyBlynJacobs, SergeyBiryukov.
Fixes #51137 .
Built from https://develop.svn.wordpress.org/trunk@48880
git-svn-id: http://core.svn.wordpress.org/trunk@48642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 02:48:06 +00:00
Sergey Biryukov
95c2f6d67f
Tests: Update one more test to account for lazy-loading being disabled for custom logos by default.
...
Follow-up to [48870], [48874].
Props desrosj.
See #50933 .
Built from https://develop.svn.wordpress.org/trunk@48878
git-svn-id: http://core.svn.wordpress.org/trunk@48640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 02:03:02 +00:00
Sergey Biryukov
e85d243d81
Comments: Correct the check for reply element existence in `comment-reply.js`.
...
`document.getElementById()` returns `null` if no matching element was found, so the previous comparison didn't work as expected.
Follow-up to [47506].
Props mailnew2ster, sarahricker.
Fixes #38009 .
Built from https://develop.svn.wordpress.org/trunk@48876
git-svn-id: http://core.svn.wordpress.org/trunk@48638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 01:59:09 +00:00
Sergey Biryukov
c015f95eee
Tests: Update unit tests to account for lazy-loading being disabled for custom logos by default.
...
Follow-up to [48870].
See #50933 .
Built from https://develop.svn.wordpress.org/trunk@48874
git-svn-id: http://core.svn.wordpress.org/trunk@48636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 01:55:04 +00:00
Peter Wilson
2db137784b
Sitemaps: Prevent incorrect redirection of paged sitemap requests.
...
Update `redirect_canonical()` to account for custom pagination and URL format used by sitemaps in order to follow standard practices.
Introduce the function `get_sitemap_url()` to simplify getting the index and provider URLs as needed.
Props jonathanstegall, pbiron, GamerZ, salvoaranzulla, peterwilsoncc.
Fixes #50910 .
Built from https://develop.svn.wordpress.org/trunk@48872
git-svn-id: http://core.svn.wordpress.org/trunk@48634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 01:30:04 +00:00
desrosj
a861ce1b5f
Media: Disable lazy-loading for custom logos by default.
...
Custom site logos are most commonly displayed above the fold, so lazy-loading is unnecessary.
Props demetris, khag7, johnbillion, rebasaurus, audrasjb.
Fixes #50933 .
Built from https://develop.svn.wordpress.org/trunk@48870
git-svn-id: http://core.svn.wordpress.org/trunk@48632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-27 01:07:11 +00:00
Sergey Biryukov
aa803be1ec
Upgrade/Install: Make the check for empty `home` option in `__get_option()` more resilient.
...
This addresses a regression in [47808], where the `home` check expected an empty string to use `siteurl` as a fallback, but `wpdb::get_var()` returns `null` if the option is empty.
Props fjarrett.
Fixes #51011 .
Built from https://develop.svn.wordpress.org/trunk@48868
git-svn-id: http://core.svn.wordpress.org/trunk@48630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-26 16:57:16 +00:00
Sergey Biryukov
9700ca0f55
Quick/Bulk Edit: Revert [48134] to address the bottom "Bulk actions" dropdown not functioning properly on Posts and Users list tables.
...
A better solution for the original issue will be explored in a future release.
Props audrasjb, garrett-eclipse, webzunft, Krstarica, chunkysteveo, SergeyBiryukov.
Fixes #50882 , #50998 . See #46872 .
Built from https://develop.svn.wordpress.org/trunk@48866
git-svn-id: http://core.svn.wordpress.org/trunk@48628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-26 14:18:04 +00:00
Sergey Biryukov
868d48e773
Editor: Remove some hardcoded text color values from patterns that have body text with no specific background color.
...
This ensures that the patterns respect the theme's default color for body text and avoids contrast issues, particularly in dark themes.
Props nrqsnchz, mapk, fullofcaffeine.
Fixes #50892 .
Built from https://develop.svn.wordpress.org/trunk@48864
git-svn-id: http://core.svn.wordpress.org/trunk@48626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-26 13:34:03 +00:00
Sergey Biryukov
8c2c812cf9
Administration: Remove non-color related styling from Modern color scheme.
...
Color schemes should only affect colors, to avoid diverging from a consistent and predictable layout, especially if core CSS rules subsequently change.
Follow-up to [48277], [48286], [48345].
Props Joen, johnbillion, afercia, johnjamesjacoby.
Fixes #51127 . See #50504 .
Built from https://develop.svn.wordpress.org/trunk@48862
git-svn-id: http://core.svn.wordpress.org/trunk@48624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-26 13:19:08 +00:00
Sergey Biryukov
3a85c4741b
Twenty Twenty: Add context to adjectives and homonyms.
...
This allows for better localization in languages where adjectives are translated differently depending on which noun they modify, or when a different translation is required for a noun vs. a verb.
Props dimadin, justinahinon.
Fixes #49797 .
Built from https://develop.svn.wordpress.org/trunk@48861
git-svn-id: http://core.svn.wordpress.org/trunk@48623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-26 01:35:11 +00:00
Sergey Biryukov
93f7b7fa81
Editor: Make some hardcoded strings in block patterns translatable.
...
Follow-up to [48726].
Props justinahinon, audrasjb, nabilmoqbel, tobifjellner, yoavf, ramiy.
Fixes #50845 .
Built from https://develop.svn.wordpress.org/trunk@48859
git-svn-id: http://core.svn.wordpress.org/trunk@48621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-25 12:40:08 +00:00
Sergey Biryukov
c53b456cfc
Tests: Clean up some existing `@covers` tags.
...
The `()` at the end is unnecessary and disregarded by PHPUnit, so can be removed.
Props jrf.
See #39265 .
Built from https://develop.svn.wordpress.org/trunk@48858
git-svn-id: http://core.svn.wordpress.org/trunk@48620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-25 00:59:06 +00:00
Sergey Biryukov
8169ae35a0
Bootstrap/Load: Add `local` environment type to `wp_get_environment_type()`.
...
This gives developers a better control over their existing development workflow and ensures that `local` is not the exact same as `development` if it does not need to be.
Props claytoncollie, johnbillion, jeremyfelt, kreppar, dushakov, TimothyBlynJacobs, Ipstenu, khag7, knutsp, Clorith, markjaquith, joostdevalk, SergeyBiryukov.
Fixes #51064 .
Built from https://develop.svn.wordpress.org/trunk@48856
git-svn-id: http://core.svn.wordpress.org/trunk@48618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-24 22:32:05 +00:00
Sergey Biryukov
0c8644c071
Docs: Improve documentation for `wp_lazy_loading_enabled()` per the documentation standards.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48855
git-svn-id: http://core.svn.wordpress.org/trunk@48617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-24 22:16:06 +00:00
Sergey Biryukov
c3a7d6c379
Docs: Add a `@since` note about the `$srcset` and `$sizes` attributes added to `wp_get_attachment_image()`.
...
Follow-up to [34855].
See #51122 .
Built from https://develop.svn.wordpress.org/trunk@48853
git-svn-id: http://core.svn.wordpress.org/trunk@48615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-24 22:12:03 +00:00
Sergey Biryukov
147ed6ebdb
Docs: Add documentation and a `@since` note about the `loading` attribute added to `wp_get_attachment_image()`.
...
Follow-up to [48272].
Props audrasjb.
Fixes #51122 .
Built from https://develop.svn.wordpress.org/trunk@48852
git-svn-id: http://core.svn.wordpress.org/trunk@48614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-24 22:04:04 +00:00
Sergey Biryukov
5ce95b7c88
Administration: Don't print the `.php-error` class in the admin header for PHP notices in `wp-config.php`.
...
Any notices in that file happen before `WP_DEBUG` takes effect, and should not be displayed with the `error_reporting` level previously set in `wp-load.php`.
Adding the class when there is no notice displayed results in extra padding under the admin bar, which should be avoided.
Follow-up to [20102], [21025], [26620], [47745].
Props akissz, tw2113, laxman-prajapati, sabernhardt, johnbillion, SergeyBiryukov.
Fixes #51073 .
Built from https://develop.svn.wordpress.org/trunk@48850
git-svn-id: http://core.svn.wordpress.org/trunk@48612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-24 10:48:06 +00:00
Sergey Biryukov
4b28c4804d
Tests: Correct a number of malformed `@covers` tags.
...
As per the documentation of the `@covers` tag, global functions being covered should be prefixed with `::`. Also, the `()` after the function name is redundant.
Follow-up to [39918].
Props jrf.
See #50267 .
Built from https://develop.svn.wordpress.org/trunk@48848
git-svn-id: http://core.svn.wordpress.org/trunk@48610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 17:26:04 +00:00
Sergey Biryukov
6c0ead3e97
Build/Test Tools: Update code coverage setup in the `phpunit.xml.dist` file to point to the `build` directory.
...
This makes the configuration consistent with the `WP_RUN_CORE_TESTS` constant being set to `1` in the same config file.
Additionally, update the list to be in line with the current codebase, excluding the plugins and themes bundled with WordPress core from being considered for code coverage.
Note: If you have a local `phpunit.xml` file that changes the `WP_RUN_CORE_TESTS` constant to `0`, you should also - in the same file - change the code coverage setup to use the `src` directory.
Follow-up to [42665], [43311].
Props jrf, mmarco9.
See #50267 .
Built from https://develop.svn.wordpress.org/trunk@48847
git-svn-id: http://core.svn.wordpress.org/trunk@48609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 17:24:05 +00:00
Sergey Biryukov
b0041bd4a1
Tests: Update `wp-api-generated.js` to reflect the new "Reusable Blocks" post type label.
...
Follow-up to [48829].
See #50755 .
Built from https://develop.svn.wordpress.org/trunk@48846
git-svn-id: http://core.svn.wordpress.org/trunk@48608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 14:40:06 +00:00
Sergey Biryukov
f53cc9e0c8
General: Ensure `svn:eol-style` is consistently set for all recently added files.
...
Fixes #51113 .
Built from https://develop.svn.wordpress.org/trunk@48845
git-svn-id: http://core.svn.wordpress.org/trunk@48607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 14:36:06 +00:00
Sergey Biryukov
9606340d0f
Tests: Clear any previous term IDs from the metadata lazyloader queue in term meta lazy-loading test.
...
This fixes random test failures when one of the term IDs from previous tests coincides with the orphan term ID from this test that should not be lazy-loaded.
Follow-up to [34529], [36566].
Fixes #51109 .
Built from https://develop.svn.wordpress.org/trunk@48844
git-svn-id: http://core.svn.wordpress.org/trunk@48606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 03:48:05 +00:00
Sergey Biryukov
5fc75503e4
Docs: Update the description for the `$legacy` parameter of `wp_count_terms()` for consistency with `get_terms()`.
...
Follow-up to [48840].
See #36399 .
Built from https://develop.svn.wordpress.org/trunk@48843
git-svn-id: http://core.svn.wordpress.org/trunk@48605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-23 00:08:06 +00:00
Sergey Biryukov
ee0943482f
REST API: In `WP_REST_Block_Directory_Controller::get_items()`, make sure the blocks data for a plugin is not empty before proceeding.
...
This avoids a PHP notice if the API returns a plugin with empty data for `blocks` key.
Props khag7, TwentyZeroTwo, justinahinon, TimothyBlynJacobs, dd32, SergeyBiryukov.
Fixes #51018 .
Built from https://develop.svn.wordpress.org/trunk@48842
git-svn-id: http://core.svn.wordpress.org/trunk@48604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-22 01:54:11 +00:00
Sergey Biryukov
23b4fd4a86
Editor: Use `wp_add_inline_script()` instead of `wp_localize_script()` to pass the `_wpMetaBoxUrl` value to the `wp-editor` script.
...
This fixes a PHP 8 "Only the first byte will be assigned to the string offset" warning on Edit Post screen.
The correct usage of `wp_localize_script()` is to pass an array of data, not a string.
Fixes #51108 .
Built from https://develop.svn.wordpress.org/trunk@48841
git-svn-id: http://core.svn.wordpress.org/trunk@48603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-22 00:04:06 +00:00
Felix Arntz
5918f7e11d
Taxonomy: Allow for `wp_count_terms( $args )` signature, making passing a taxonomy optional.
...
This brings `wp_count_terms()` in line with other taxonomy functions such as `get_terms()` which technically no longer require a taxonomy. Similar to the previously modified functions, no deprecation warning is triggered when using the legacy signature.
Fixes #36399 .
Built from https://develop.svn.wordpress.org/trunk@48840
git-svn-id: http://core.svn.wordpress.org/trunk@48602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 22:32:06 +00:00
Sergey Biryukov
40ea11468b
Code Modernization: Fix PHP 8 "ArgumentCountError: array_merge() does not accept unknown named parameters" fatal error in `retrieve_widgets()`.
...
As per the documentation of `call_user_func_array()`, the `$param_arr` should be a (numerically) indexed array, not a string-keyed array.
As we can use the spread operator in PHP 5.6+, there isn't really any need to use `call_user_func_array()` anyhow, we can call the `array_merge()` function directly.
The caveat to this is that the spread operator only works on numerically indexed arrays, so we need to wrap the `$sidebars_widgets` variable in a call to `array_values()` when using the spread operator.
Using `array_values()` in the existing `call_user_func_array()` call would also have solved this, but the solution now proposed, has the added benefit of getting rid of the overhead of `call_user_func_array()`.
Props jrf.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48839
git-svn-id: http://core.svn.wordpress.org/trunk@48601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 21:51:03 +00:00
Sergey Biryukov
7ba8aa2bb4
Code Modernization: Fix PHP 8 "argument must be passed by reference, value given" error in `WP_Comment_Query::get_comments()`.
...
The WP native `get_comment()` function expects the first argument `$comment` to be passed by reference.
The PHP `array_map()` function, however, passes by value, not by reference, resulting in an "arguments must be passed by reference, value given" error.
The PHP native `array_walk()` function does pass by reference. Using this prevents the error on PHP 8 and maintains the existing behaviour on PHP < 8.
Props jrf.
See #50913 .
Built from https://develop.svn.wordpress.org/trunk@48838
git-svn-id: http://core.svn.wordpress.org/trunk@48600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 21:34:03 +00:00
Sergey Biryukov
6766375f84
Twenty Nineteen: Remove trailing commas after selectors in `style-editor.scss`.
...
Remove one empty CSS block.
Props justinahinon.
Fixes #51095 .
Built from https://develop.svn.wordpress.org/trunk@48837
git-svn-id: http://core.svn.wordpress.org/trunk@48599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 15:42:05 +00:00
Sergey Biryukov
0c0e39d8bf
Privacy: Avoid a PHP 7.4 notice in `WP_Privacy_Policy_Content::text_change_check()`.
...
When iterating over the items stored in '_wp_suggested_privacy_policy_content` meta value for the Privacy Policy page, make sure the item is an array before accessing its properties.
Props treibstoff.
Fixes #51084 .
Built from https://develop.svn.wordpress.org/trunk@48836
git-svn-id: http://core.svn.wordpress.org/trunk@48598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 01:13:05 +00:00
Sergey Biryukov
25b0783629
Docs: Correct references to `WP_Filesystem_Base` methods in various DocBlocks.
...
Props pbiron.
Fixes #51087 .
Built from https://develop.svn.wordpress.org/trunk@48835
git-svn-id: http://core.svn.wordpress.org/trunk@48597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-21 00:43:05 +00:00
Sergey Biryukov
1a230a752a
Customize: Add `/` character to `<img>` tag in `WP_Customize_Manager` and `WP_Customize_Header_Image_Control` JS templates.
...
While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.
Props laxman-prajapati.
Fixes #51077 .
Built from https://develop.svn.wordpress.org/trunk@48834
git-svn-id: http://core.svn.wordpress.org/trunk@48596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-20 13:13:10 +00:00
Sergey Biryukov
ebf80f8e01
Docs: Update documentation for `get_custom_logo()` and `the_custom_logo()` to mention the `unlink-homepage-logo` theme feature.
...
Follow-up to [48039], [48283], [48749], [48757], [48758].
Props sabernhardt.
Fixes #51075 .
Built from https://develop.svn.wordpress.org/trunk@48832
git-svn-id: http://core.svn.wordpress.org/trunk@48594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-20 10:41:06 +00:00
Sergey Biryukov
53399672b8
Coding Standards: Fix WPCS issue in [48830].
...
See #51044 .
Built from https://develop.svn.wordpress.org/trunk@48831
git-svn-id: http://core.svn.wordpress.org/trunk@48593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 16:35:03 +00:00
Sergey Biryukov
821c1c8095
Tests: Update unit tests to account for `comment_agent` and `comment_author_IP` values being passed to the `preprocess_comment` filter.
...
See #51044 .
Built from https://develop.svn.wordpress.org/trunk@48830
git-svn-id: http://core.svn.wordpress.org/trunk@48592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 16:08:06 +00:00
desrosj
4ad0086a2a
Editor: Update the post type labels for the reusable blocks post type.
...
Previously, the labels for the reusable block post type were just “block”. The document settings tab in the block editor has been changed to use the post type label specified instead to be more specific. Changing the reusable block post type labels to “reusable block” prevents two “Block” tabs from showing in the editor.
Props desaiuditd, peterwilsoncc.
Fixes #50755 .
Built from https://develop.svn.wordpress.org/trunk@48829
git-svn-id: http://core.svn.wordpress.org/trunk@48591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 13:40:12 +00:00
Sergey Biryukov
2326c8196d
Docs: Add a `@since` note to `register_rest_route()` about the `_doing_it_wrong()` notice when the required `permission_callback` argument is not set.
...
Follow-up to [48526].
Props psykro.
Fixes #51060 .
Built from https://develop.svn.wordpress.org/trunk@48827
git-svn-id: http://core.svn.wordpress.org/trunk@48589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 12:31:08 +00:00
Sergey Biryukov
d7c0343d5f
Docs: Improve description for `WP_Admin_Bar::add_group()`.
...
Props stevenlinx.
Fixes #50779 .
Built from https://develop.svn.wordpress.org/trunk@48826
git-svn-id: http://core.svn.wordpress.org/trunk@48588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 02:46:04 +00:00
Sergey Biryukov
216c1e01b4
Bundled Themes: Correct punctuation in "Your comment is awaiting moderation" string.
...
Props llizard, mayankmajeji.
Fixes #49867 .
Built from https://develop.svn.wordpress.org/trunk@48825
git-svn-id: http://core.svn.wordpress.org/trunk@48587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 02:28:13 +00:00
Sergey Biryukov
800f43ebbe
Comments: Correct punctuation in "Your comment is awaiting moderation" string in `Walker_Comment`.
...
Props llizard.
See #49867 .
Built from https://develop.svn.wordpress.org/trunk@48824
git-svn-id: http://core.svn.wordpress.org/trunk@48586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 02:27:08 +00:00
Sergey Biryukov
c66d70f2a5
Comments: Revert unintended changes from [48822].
...
See #51044 .
Built from https://develop.svn.wordpress.org/trunk@48823
git-svn-id: http://core.svn.wordpress.org/trunk@48585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 01:59:04 +00:00
Sergey Biryukov
3e16f7510a
Comments: Make sure the comment data passed to the `preprocess_comment` filter includes the `comment_agent` and `comment_author_IP` values.
...
Props zodiac1978, SergeyBiryukov.
Fixes #51044 .
Built from https://develop.svn.wordpress.org/trunk@48822
git-svn-id: http://core.svn.wordpress.org/trunk@48584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-19 01:57:08 +00:00
Sergey Biryukov
8b3a813e1a
Plugins: Avoid a PHP notice if the `update-supported` key in plugin data is not set.
...
Props sanzeeb3.
Fixes #51052 .
Built from https://develop.svn.wordpress.org/trunk@48820
git-svn-id: http://core.svn.wordpress.org/trunk@48582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 20:38:09 +00:00
desrosj
106a6ba9e1
Build/Test Tools: Update several NPM dependencies.
...
These updates were applied by running `npm audit fix`.
See #50769 .
Built from https://develop.svn.wordpress.org/trunk@48818
git-svn-id: http://core.svn.wordpress.org/trunk@48580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 15:18:02 +00:00
Sergey Biryukov
13647464a5
Formatting: Make the check for empty text in `wp_trim_excerpt()` more resilient.
...
This addresses a regression in [47808], which caused excerpts to be generated from post content if an empty string is passed, but not for other values considered empty, e.g. `null` or `false`.
Props riaanlom, laxman-prajapati, SergeyBiryukov.
Fixes #51042 .
Built from https://develop.svn.wordpress.org/trunk@48817
git-svn-id: http://core.svn.wordpress.org/trunk@48579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 15:10:04 +00:00
Sergey Biryukov
7a8df073cd
Docs: Correct alignment for some DocBlocks in `WP_Query::get_posts()`.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48816
git-svn-id: http://core.svn.wordpress.org/trunk@48578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 12:39:03 +00:00
Sergey Biryukov
26cf7ec46d
Docs: Add a `@since` note to `get_the_archive_title()` about the title part being wrapped in a `<span>` element.
...
Follow-up to [48294].
Props justinahinon, audrasjb.
Fixes #51050 .
Built from https://develop.svn.wordpress.org/trunk@48814
git-svn-id: http://core.svn.wordpress.org/trunk@48576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-18 12:05:09 +00:00
Sergey Biryukov
7d0d6672c4
Accessibility: Toolbar: Don't output the "Skip to toolbar" link in modern themes that support the `wp_body_open` action.
...
The links is unnecessary there, as the toolbar is the first thing in the DOM within the `<body>` element.
For themes that don't implement the `wp_body_open` action yet and render the admin bar in the footer, the "Skip to toolbar" link with `tabindex="1"` is still necessary, to ensure it's the first focusable element in the page.
Props sarahricker, afercia, erikjandelange, audrasjb.
Fixes #50702 .
Built from https://develop.svn.wordpress.org/trunk@48812
git-svn-id: http://core.svn.wordpress.org/trunk@48574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-17 14:26:07 +00:00
Sergey Biryukov
fdeba269ca
Help/About: Fix typo and remove trailing spaces from some strings.
...
Props mukesh27, casiepa, davidbaumwald.
Fixes #51028 .
Built from https://develop.svn.wordpress.org/trunk@48809
git-svn-id: http://core.svn.wordpress.org/trunk@48571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-17 02:12:04 +00:00
Sergey Biryukov
e50ac120a3
Site Health: Ensure that the tests returned by `WP_Site_Health::get_tests()` always have the required array keys: `direct` and `async`.
...
This avoids PHP notices if these keys were accidentally removed using the `site_status_tests` filter.
Props khag7, Ov3rfly, desrosj, Clorith.
Fixes #50858 .
Built from https://develop.svn.wordpress.org/trunk@48808
git-svn-id: http://core.svn.wordpress.org/trunk@48570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-17 02:03:04 +00:00
Sergey Biryukov
d9135ad9d0
Site Health: Add site environment type to the debug information.
...
Follow-up to [47919], [48188], [48372].
Props joostdevalk, Clorith.
Fixes #50887 .
Built from https://develop.svn.wordpress.org/trunk@48802
git-svn-id: http://core.svn.wordpress.org/trunk@48564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 18:27:04 +00:00
Sergey Biryukov
7cb2ca73a2
Site Health: Rename the `$upload_max_size` variable to `$upload_max_filesize`, for consistency with the PHP setting name.
...
Follow-up to [48535], [48538], [48539], [48544], [48800].
See #50945 .
Built from https://develop.svn.wordpress.org/trunk@48801
git-svn-id: http://core.svn.wordpress.org/trunk@48563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 17:54:05 +00:00
Sergey Biryukov
88e668d8e6
Site Health: Only display the warning about the `post_max_size` PHP value when it's lower than `upload_max_filesize`.
...
Previously, the warning was displayed even if the value was higher than `upload_max_filesize`, which made the report inaccurate, as these values don't necessarily have to match.
Props oakesjosh, jeroenrotty, desrosj, Clorith.
Fixes #50945 .
Built from https://develop.svn.wordpress.org/trunk@48800
git-svn-id: http://core.svn.wordpress.org/trunk@48562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 17:48:08 +00:00
Sergey Biryukov
54184bf872
Docs: Fix typo in the `$image` parameter description in `is_gd_image()`.
...
Follow-up to [48798].
See #50833 .
Built from https://develop.svn.wordpress.org/trunk@48799
git-svn-id: http://core.svn.wordpress.org/trunk@48561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 14:02:03 +00:00
Sergey Biryukov
12c8f0e678
Code Modernization: Introduce `is_gd_image()` to check for PHP 8 `GdImage` object instances.
...
In PHP 8, the GD extension uses `GdImage` objects instead of resources for its underlying data structures.
This updates the existing `is_resource()` calls for image resources in core to accomodate for `GdImage` instances as well.
Props ayeshrajans, jrf.
Fixes #50833 .
Built from https://develop.svn.wordpress.org/trunk@48798
git-svn-id: http://core.svn.wordpress.org/trunk@48560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-16 13:33:09 +00:00
Sergey Biryukov
a5edb2a8a1
Filesystem API: Use correct variable when closing the file handle in `WP_Filesystem_FTPext::get_contents()`.
...
Props gothick@gothick.org.uk .
Fixes #51029 .
Built from https://develop.svn.wordpress.org/trunk@48797
git-svn-id: http://core.svn.wordpress.org/trunk@48559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-15 20:56:02 +00:00
TimothyBlynJacobs
e1da1ae3e4
REST API: Add uniqueItems as a permitted endpoint argument JSON Schema keyword.
...
Support for the `uniqueItems` keyword was added in [48357], but wasn't included in the list of permitted keywords for `WP_REST_Controller::get_endpoint_args_for_item_schema()`. This prevented the keyword from being automatically supported if specified in a controller's item schema.
Fixes #51021 .
Built from https://develop.svn.wordpress.org/trunk@48796
git-svn-id: http://core.svn.wordpress.org/trunk@48558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-15 16:11:07 +00:00
Sergey Biryukov
b29ea455e8
Menus: Make the `$object_id` parameter of `_wp_delete_post_menu_item()` required, for consistency with `_wp_delete_tax_menu_item()`.
...
The function is private (only intended for core usage) and is hooked to the `delete_post` action, which always passes a non-zero post ID.
Follow-up to [14295], [48794].
See #50343 .
Built from https://develop.svn.wordpress.org/trunk@48795
git-svn-id: http://core.svn.wordpress.org/trunk@48557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-15 13:45:06 +00:00
Sergey Biryukov
d3a3862248
Code Modernization: Fix PHP 8 deprecation notices for optional function parameters declared before required parameters.
...
As it already was not possible to pass the required parameters without also passing the optional one anyway, removing the default value for the (not so) optional parameters should not affect backward compatibility.
This change affects three functions in core:
* `get_comment_delimited_block_content()`
* `do_enclose()`
* `_wp_delete_tax_menu_item()`
Props jrf, ayeshrajans, desrosj.
Fixes #50343 .
Built from https://develop.svn.wordpress.org/trunk@48794
git-svn-id: http://core.svn.wordpress.org/trunk@48556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-15 13:40:03 +00:00
Sergey Biryukov
756de63216
Docs: Document the parameters of `wp_get_associated_nav_menu_items()` as optional.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48793
git-svn-id: http://core.svn.wordpress.org/trunk@48555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-15 13:12:06 +00:00
Sergey Biryukov
440eb31bb7
Site Health: Recognize `define( 'WP_AUTO_UPDATE_CORE', 'minor' )` as an acceptable value.
...
Previously, it was only incidentally recognized as valid due to a loose comparison with `true`.
With the strict comparison added to `WP_Site_Health_Auto_Updates::test_constants()`, this was no longer the case.
Follow-up to [47841].
Props sterndata, mukesh27, avixansa, desrosj, SergeyBiryukov.
Fixes #50912 .
Built from https://develop.svn.wordpress.org/trunk@48792
git-svn-id: http://core.svn.wordpress.org/trunk@48554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-14 20:39:08 +00:00
Sergey Biryukov
27c5f5f1ab
Tests: Consistently unregister custom settings after performing assertions in `WP_Test_REST_Settings_Controller`.
...
This ensures that those settings don't leak to other tests.
Props david.binda, TimothyBlynJacobs, SergeyBiryukov.
Fixes #50986 .
Built from https://develop.svn.wordpress.org/trunk@48791
git-svn-id: http://core.svn.wordpress.org/trunk@48553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-14 16:35:06 +00:00
Sergey Biryukov
703be7e1f3
Code Modernization: Change `create_function()` in `phpunit/includes/plural-form-function.php` to closure.
...
`create_function()` has been deprecated in PHP >= 7.2 and removed in PHP 8.
The only instance left in core was used in a test that was being skipped on PHP >= 7.2. This allows the test to run again.
Follow-up to [41722], [41730].
Props jrf.
Fixes #50899 .
Built from https://develop.svn.wordpress.org/trunk@48790
git-svn-id: http://core.svn.wordpress.org/trunk@48552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-13 12:34:10 +00:00
Sergey Biryukov
07ec574a54
Code Modernization: Only call `libxml_disable_entity_loader()` in PHP < 8.
...
This function has been deprecated in PHP 8.0 because in libxml 2.9.0, external entity loading is disabled by default, so this function is no longer needed to protect against XXE attacks.
Props jrf.
Fixes #50898 .
Built from https://develop.svn.wordpress.org/trunk@48789
git-svn-id: http://core.svn.wordpress.org/trunk@48551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-12 15:25:03 +00:00
Sergey Biryukov
3ccc91894b
Code Modernization: Remove `final` keyword from private methods.
...
Declaring a `private` method as `final` is an oxymoron, as `private` methods cannot be overloaded anyway.
Using `final private function...` will generate a warning in PHP 8.
Props jrf.
Fixes #50897 .
Built from https://develop.svn.wordpress.org/trunk@48788
git-svn-id: http://core.svn.wordpress.org/trunk@48550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-12 15:05:08 +00:00
desrosj
dc63fb7c85
Help/About: Final adjustments to the 5.5 About page.
...
- Final CDN asset URLs.
- Some minor color adjustments.
Props ryelle, marybaum, davidbaumwald, audrasjb, estelaris, afercia, cbringmann, andreamiddleton, desrosj, SergeyBiryukov, ocean90, nrqsnchz, spacedmonkey, whyisjake, man4toman.
Fixes #50416 .
Built from https://develop.svn.wordpress.org/trunk@48783
git-svn-id: http://core.svn.wordpress.org/trunk@48545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-11 16:53:09 +00:00
Sergey Biryukov
1f85e7484f
Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48782
git-svn-id: http://core.svn.wordpress.org/trunk@48544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-11 00:34:08 +00:00
Sergey Biryukov
4da5577136
Docs: Update documentation for `get_{$meta_type}_metadata` filter for consistency with `default_{$meta_type}_metadata`.
...
Follow-up to [48777].
See #50891 .
Built from https://develop.svn.wordpress.org/trunk@48778
git-svn-id: http://core.svn.wordpress.org/trunk@48540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 15:50:04 +00:00
whyisjake
52df01d961
Options, Meta APIs: Update the docs around default metadata values.
...
Add a missing @since value for 5.5 and potential default filter names.
Fixes #50891 .
Props johnbillion.
Built from https://develop.svn.wordpress.org/trunk@48777
git-svn-id: http://core.svn.wordpress.org/trunk@48539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 15:42:04 +00:00
desrosj
14d561ac57
Bundled Themes: Bump theme versions ahead of WordPress 5.5.
...
The following theme versions will be released in coordination with WordPress 5.5:
- Twenty Ten: 3.1
- Twenty Eleven: 3.5
- Twenty Twelve: 3.2
- Twenty Thirteen: 3.1
- Twenty Fourteen: 2.9
- Twenty Fifteen: 2.7
- Twenty Sixteen: 2.2
- Twenty Seventeen: 2.4
- Twenty Nineteen: 1.7
- Twenty Twenty: 1.5
Props whyisjake, desrosj.
Fixes #50769 .
Built from https://develop.svn.wordpress.org/trunk@48775
git-svn-id: http://core.svn.wordpress.org/trunk@48537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 15:32:05 +00:00
desrosj
5a6fef41f3
Build/Test Tools: Update `elliptic` in Twenty Twenty.
...
See #50769 .
Built from https://develop.svn.wordpress.org/trunk@48774
git-svn-id: http://core.svn.wordpress.org/trunk@48536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 15:19:03 +00:00
ellatrix
3bf88764f1
Editor: update packages
...
Fixes #50888
Built from https://develop.svn.wordpress.org/trunk@48772
git-svn-id: http://core.svn.wordpress.org/trunk@48534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 14:18:33 +00:00
Sergey Biryukov
9214595e90
I18N: Fix typo in a screen reader text string on the About page.
...
Follow-up to [48729].
Props pedromendonca.
Fixes #50884 .
Built from https://develop.svn.wordpress.org/trunk@48770
git-svn-id: http://core.svn.wordpress.org/trunk@48532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 13:15:04 +00:00
Sergey Biryukov
113acf42d5
I18N: Add a `class_exists()` check to `Plural_Forms` class for consistency with other POMO library classes.
...
Follow-up to [41722].
Fixes #50881 .
Built from https://develop.svn.wordpress.org/trunk@48769
git-svn-id: http://core.svn.wordpress.org/trunk@48531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-10 11:33:09 +00:00
Sergey Biryukov
18cd7519e1
I18N: Fix typo in a string in `rest_validate_value_from_schema()`.
...
Props pedromendonca.
Fixes #50879 .
Built from https://develop.svn.wordpress.org/trunk@48767
git-svn-id: http://core.svn.wordpress.org/trunk@48529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-09 02:00:04 +00:00
Sergey Biryukov
5c0361aeb1
Coding Standards: Remove a few more extra brackets from some conditions in `wp-admin/includes/plugin.php`.
...
Follow-up to [48764].
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48766
git-svn-id: http://core.svn.wordpress.org/trunk@48528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-09 01:56:05 +00:00
Sergey Biryukov
350ad6141e
Coding Standards: Use consistent formatting for translator comments in `wp-includes/rest-api.php`.
...
See #50767 .
Built from https://develop.svn.wordpress.org/trunk@48765
git-svn-id: http://core.svn.wordpress.org/trunk@48527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-09 01:46:07 +00:00
Sergey Biryukov
004e3f897f
Coding Standards: Fix WPCS issues in `wp-admin/includes/plugin.php`.
...
Includes minor code layout fixes for better readability.
Props rnaby for initial patch.
See #50767 , #43848 .
Built from https://develop.svn.wordpress.org/trunk@48764
git-svn-id: http://core.svn.wordpress.org/trunk@48526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-08 21:04:04 +00:00
Sergey Biryukov
f5a4ac614e
Coding Standards: Simplify some parts of `user_can_access_admin_page()` for better readability.
...
Props rnaby, valentinbora, khag7.
Fixes #43848 .
Built from https://develop.svn.wordpress.org/trunk@48762
git-svn-id: http://core.svn.wordpress.org/trunk@48524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-08 20:24:05 +00:00
Sergey Biryukov
1e5b6101e7
Help/About: Update videos and their descriptions on the About page.
...
Follow-up to [48675], [48686], [48721], [48729], [48730], [48736].
Props ryelle, marybaum, estelaris, desrosj, joen, afercia.
See #50416 .
Built from https://develop.svn.wordpress.org/trunk@48761
git-svn-id: http://core.svn.wordpress.org/trunk@48523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-08 14:16:02 +00:00
Sergey Biryukov
132942b9fa
Docs: Document the return value of `get_settings_errors()` using hash notation.
...
Props stevenlinx, webdevmattcrom, atachibana.
Fixes #42786 .
Built from https://develop.svn.wordpress.org/trunk@48760
git-svn-id: http://core.svn.wordpress.org/trunk@48522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-08 12:39:06 +00:00
whyisjake
649ab58d96
Themes: Update the `test_theme_supports_custom_logo` to check for the `unlink-homepage-logo` property.
...
See #37011 , [48757].
Props TimothyBlynJacobs, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48758
git-svn-id: http://core.svn.wordpress.org/trunk@48520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 20:44:05 +00:00
Sergey Biryukov
7690f48cec
Themes: Add `unlink-homepage-logo` to the `create_initial_theme_features()` registration for the `custom-logo` theme feature.
...
Follow-up to [48039], [48283], [48749].
Props TimothyBlynJacobs.
Fixes #37011 .
Built from https://develop.svn.wordpress.org/trunk@48757
git-svn-id: http://core.svn.wordpress.org/trunk@48519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 19:43:05 +00:00
Andrew Ozz
283f841dac
Script Loader: Remove the `jquery-migrate-compat-5.5` temporary script handle for now. Can be re-added later if there is a compelling use case. For now it doesn't seem necessary.
...
See #37110 .
Built from https://develop.svn.wordpress.org/trunk@48754
git-svn-id: http://core.svn.wordpress.org/trunk@48516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 18:30:06 +00:00
Sergey Biryukov
ddcf09ace3
Script Loader: Add a temporary `jquery-migrate-compat-5.5` script handle.
...
This is intended as an easy way for plugins and themes to still be able to load jQuery with jQuery Migrate in WordPress 5.5.
Once jQuery is updated to 3.x, this temporary script handle will be removed. This means plugins and themes still using it at that point will fail to load their scripts (as a dependency will be missing), but will not cause "fatal errors" breaking the rest of JS.
Follow-up to [48323], [48324].
Props azaozz, desrosj, apedog, Clorith, jorbin.
Fixes #37110 .
Built from https://develop.svn.wordpress.org/trunk@48753
git-svn-id: http://core.svn.wordpress.org/trunk@48515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 16:51:06 +00:00
Sergey Biryukov
961f455a00
Comments: Update DB version number used to trigger the upgrade routine for changing the `comment_type` DB field value in comments table.
...
Follow-up to [47597], [47626], [48225], [48227], [48748].
Props desrosj.
See #49236 .
Built from https://develop.svn.wordpress.org/trunk@48751
git-svn-id: http://core.svn.wordpress.org/trunk@48513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 16:32:03 +00:00
Sergey Biryukov
6b5e748dee
Docs: Correct usage of the dynamic `auto_update_{$type}` filter.
...
This ensures that the canonical name of the filter is used in Site Health debug data, as well as on plugin and theme screens, so the developer reference site remains correct.
Props johnbillion.
Fixes #50868 .
Built from https://develop.svn.wordpress.org/trunk@48750
git-svn-id: http://core.svn.wordpress.org/trunk@48512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 16:14:03 +00:00
Sergey Biryukov
df6e548b14
Accessibility: Themes: Only unlink custom logo on the home page if the theme declares support for that.
...
To accommodate for the change, the `custom-logo` theme feature now accepts the `unlink-homepage-logo` parameter.
If and when the logo is linked on the home page, the link has the `aria-current` attribute for better accessibility.
Follow-up to [48039], [48283].
Props sabernhardt, audrasjb, johnstonphilip, demetris.
Fixes #37011 .
Built from https://develop.svn.wordpress.org/trunk@48749
git-svn-id: http://core.svn.wordpress.org/trunk@48511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 15:26:03 +00:00
Sergey Biryukov
c64297ce61
Comments: Update comment cache in the upgrade routine for changing the `comment_type` DB field value in comments table.
...
This ensures that comment object cache is cleared after changing the comment type to `comment` instead of an empty string.
Add a unit test for `_wp_batch_update_comment_type()`.
Follow-up to [47597], [47626], [48225], [48227].
Props imath, westonruter.
Fixes #49236 .
Built from https://develop.svn.wordpress.org/trunk@48748
git-svn-id: http://core.svn.wordpress.org/trunk@48510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 14:29:02 +00:00
Sergey Biryukov
5221a27593
Site Health: Consistently pass an object to the `auto_update_{$type}` filter in Site Health debug data.
...
Previously, some instances of the filter received an array from a plugin or theme update response, potentially triggering PHP notices.
Props bpayton, pbiron.
Fixes #50852 .
Built from https://develop.svn.wordpress.org/trunk@48745
git-svn-id: http://core.svn.wordpress.org/trunk@48507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-07 13:28:05 +00:00
Sergey Biryukov
68dd986b07
Tests: Correct duplicate array keys in `Tests_Kses::test_wp_filter_post_kses_address()`.
...
Previously, only the last `style` value was actually tested.
Props ediamin.
Fixes #50860 .
Built from https://develop.svn.wordpress.org/trunk@48744
git-svn-id: http://core.svn.wordpress.org/trunk@48506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-06 13:28:05 +00:00
Sergey Biryukov
3a32284b26
Posts, Post Types: Use a consistent wording in messages about a locked post.
...
Props ramiy.
Fixes #50859 .
Built from https://develop.svn.wordpress.org/trunk@48743
git-svn-id: http://core.svn.wordpress.org/trunk@48505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-06 13:14:08 +00:00
Sergey Biryukov
7e1e4f379a
Site Health: Check if `session_status()` exists before calling it.
...
Props bgermann.
Fixes #50862 .
Built from https://develop.svn.wordpress.org/trunk@48742
git-svn-id: http://core.svn.wordpress.org/trunk@48504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-06 00:25:07 +00:00
Sergey Biryukov
ee213e333b
Comments: Remove a few more unnecessary instances of `esc_html()` in `WP_Comments_List_Table::comment_status_dropdown()`.
...
Core translations are considered safe, and these labels are not escaped in any other instances.
Follow-up to [48521], [48722], [48724].
See #40188 , #50815 .
Built from https://develop.svn.wordpress.org/trunk@48741
git-svn-id: http://core.svn.wordpress.org/trunk@48503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-05 13:53:06 +00:00
Sergey Biryukov
2f878f1e74
Help/About: Correct header spacing on shorter screens after removing the musician name.
...
Remove some unnecessary CSS.
Follow-up to [48730].
Props ryelle.
See #50416 .
Built from https://develop.svn.wordpress.org/trunk@48736
git-svn-id: http://core.svn.wordpress.org/trunk@48498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 18:11:09 +00:00
Sergey Biryukov
aaf49752b2
Plugins: Move the "Successfully installed the plugin" string to the correct `Plugin_Upgrader` method.
...
The string refers to the installation, and belongs in the `::install_strings()` method, not in `::upgrade_strings()`.
Props sswebster, nateinaction, SergeyBiryukov.
Fixes #50837 .
Built from https://develop.svn.wordpress.org/trunk@48734
git-svn-id: http://core.svn.wordpress.org/trunk@48496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 17:54:04 +00:00
whyisjake
b84d7f1fd3
Site Health: Display auto-update properly for plugins that don't support auto-updates.
...
Properly filter `auto_update_plugin` when displaying the table.
Fixes #50822 .
Props Gwendydd, pbiron, audrasjb, SergeyBiryukov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48731
git-svn-id: http://core.svn.wordpress.org/trunk@48493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 17:37:02 +00:00
desrosj
fa9b043313
Help/About: Remove “Musician Name” placeholder.
...
The musician name is traditionally not included on the About page due to i18n concerns regarding last minute changes.
Props audrasjb, SergeyBiryukov.
See #50416 .
Built from https://develop.svn.wordpress.org/trunk@48730
git-svn-id: http://core.svn.wordpress.org/trunk@48492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 17:35:06 +00:00
desrosj
527ca5ff78
Help/About: String updates and accessibility improvements to the 5.5 About page.
...
Props ryelle, nrqsnchz, desrosj, audrasjb, marybaum, spacedmonkey, SergeyBiryukov, estelaris, afercia, ocean90.
See #50416 .
Built from https://develop.svn.wordpress.org/trunk@48729
git-svn-id: http://core.svn.wordpress.org/trunk@48491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 17:26:03 +00:00
Sergey Biryukov
a9da1150ee
Editor: Make some hardcoded strings in block patterns translatable.
...
Props ocean90, youknowriad.
Fixes #50842 .
Built from https://develop.svn.wordpress.org/trunk@48726
git-svn-id: http://core.svn.wordpress.org/trunk@48488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 17:01:05 +00:00
ellatrix
69370fa0da
Editor: update JS packages
...
Fixes #50844 .
Built from https://develop.svn.wordpress.org/trunk@48725
git-svn-id: http://core.svn.wordpress.org/trunk@48487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 16:48:43 +00:00
Sergey Biryukov
315db55458
Comments: Restore the `::has_items()` call in `WP_Comments_List_Table::extra_tablenav()` for now, until unit tests are updated accordingly.
...
Follow-up to [48722].
Fixes #40188 . See #50815 .
Built from https://develop.svn.wordpress.org/trunk@48724
git-svn-id: http://core.svn.wordpress.org/trunk@48486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 16:26:03 +00:00
Sergey Biryukov
b615c45103
Comments: Use the existing static variable instead of calling `::has_items()` again in `WP_Comments_List_Table::extra_tablenav()`.
...
Additionally, removed unnecessary `esc_html()` on the Filter button label. Core translations are considered safe, and this label is not escaped in any other instance.
Props whyisjake, SergeyBiryukov.
Fixes #40188 .
Built from https://develop.svn.wordpress.org/trunk@48722
git-svn-id: http://core.svn.wordpress.org/trunk@48484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 15:58:06 +00:00
whyisjake
500c0118d4
Help/About: String update for 5.5 release.
...
We don't use hyphens for the [block editor](https://make.wordpress.org/core/handbook/best-practices/spelling/ ).
See #50416 .
Props davidbaumwald, marybaum, desrosj.
Built from https://develop.svn.wordpress.org/trunk@48721
git-svn-id: http://core.svn.wordpress.org/trunk@48483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 15:56:02 +00:00
ellatrix
f85fe2882a
Editor: update JS packages
...
Fixes #50841 .
Built from https://develop.svn.wordpress.org/trunk@48719
git-svn-id: http://core.svn.wordpress.org/trunk@48481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 13:43:40 +00:00
Andrea Fercia
efdd927b48
Accessibility: Administration: Address backward compatibility concerns for the sortable postboxes areas after [48340].
...
Fixes #49288 .
Built from https://develop.svn.wordpress.org/trunk@48717
git-svn-id: http://core.svn.wordpress.org/trunk@48479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 13:17:02 +00:00
Sergey Biryukov
b1c6077591
Media: Remove extra space from the `width` attribute in `wp_playlist_shortcode()` output.
...
Props hvar.
Fixes #50840 .
Built from https://develop.svn.wordpress.org/trunk@48716
git-svn-id: http://core.svn.wordpress.org/trunk@48478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-04 12:47:06 +00:00
Sergey Biryukov
e2c8e2fa5a
Administration: Allow `wp_credits()` to accept `$version` and `$locale` parameters.
...
This can be helpful for plugin developers to get credits information for older versions or different locales.
Props ramiy.
Fixes #35910 .
Built from https://develop.svn.wordpress.org/trunk@48715
git-svn-id: http://core.svn.wordpress.org/trunk@48477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-03 12:53:08 +00:00
Sergey Biryukov
016df3b6c6
Docs: Correct placement for `wp_editor_expand` filter DocBlock.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48714
git-svn-id: http://core.svn.wordpress.org/trunk@48476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-03 12:11:06 +00:00
Sergey Biryukov
8ff7595ae9
Permalinks: Don't show "You should update your `.htaccess` file now" message when saving permalink settings on Multisite.
...
Multisite routing is taken care of by WordPress, not by the web server.
Follow-up to [13706], [37747], [38066].
Props boonebgorges.
Fixes #39547 .
Built from https://develop.svn.wordpress.org/trunk@48713
git-svn-id: http://core.svn.wordpress.org/trunk@48475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-02 12:57:08 +00:00
Sergey Biryukov
0a76cb6240
Permalinks: Simplify the logic for displaying "You should update your `.htaccess` file now" message.
...
See #39547 , #50834 .
Built from https://develop.svn.wordpress.org/trunk@48712
git-svn-id: http://core.svn.wordpress.org/trunk@48474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-02 12:51:03 +00:00
Sergey Biryukov
c9cf1ba365
Docs: Correct formatting for a comment in `wp-admin/options-permalink.php`.
...
Previously committed in [48694], accidentally reverted in [48710].
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48711
git-svn-id: http://core.svn.wordpress.org/trunk@48473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-02 12:39:07 +00:00
Sergey Biryukov
38f653b639
Permalinks: Correct the check whether `.htaccess` update is required when saving permalink settings.
...
The check should be performed after the permalink structure update, not before.
Fixes #50834 .
Built from https://develop.svn.wordpress.org/trunk@48710
git-svn-id: http://core.svn.wordpress.org/trunk@48472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-02 12:36:02 +00:00
Sergey Biryukov
85c38d54e6
Upgrade/Install: Show the installed WordPress version number on WordPress Updates screen if there is a newer version available.
...
This makes it easier for a user to know how significant of an update the change might be, and helps them make an informed decision about how to proceed.
Props tmdesigned, dd32, circlecube, dkarfa, hakre, scribu, MadtownLems, markshep, nbachiyski, dmchale, miqrogroove, ovann86, danieltj, sterndata, seanpaulrasmussen, mrgrt, Commeuneimage, dpacks, puneetsahalot, jonoaldersonwp, SergeyBiryukov.
Fixes #15101 . See #35554 , #47848 .
Built from https://develop.svn.wordpress.org/trunk@48709
git-svn-id: http://core.svn.wordpress.org/trunk@48471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-01 19:46:04 +00:00
Sergey Biryukov
90672b07ab
HTTP: Update the Root Certificate bundle.
...
Keep 1024-bit legacy root certificates re-added in [35919], except for those already expired, for compatibility with older OpenSSL versions.
Props barry, ayeshrajans, desrosj, whyisjake.
See #50828 .
Built from https://develop.svn.wordpress.org/trunk@48707
git-svn-id: http://core.svn.wordpress.org/trunk@48469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-08-01 14:09:06 +00:00
Aaron Jorbin
8fb366a83b
Build/Test Tools: Update grunt-patch-wordpress
...
See: #50769
Built from https://develop.svn.wordpress.org/trunk@48705
git-svn-id: http://core.svn.wordpress.org/trunk@48467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-31 18:35:23 +00:00
whyisjake
224fdb27b8
Upgrade/Install: Ensure the proper count of plugins that have auto-update enabled.
...
As certain plugins may not support updates, this count needs to accurately reflect that in the navbar.
Fixes 50808.
Props knutsp, audrasjb, pbiron, dd32, apedog, afragen, chriscct7, garyc40, whyisjake, SergeyBiryukov.
Built from https://develop.svn.wordpress.org/trunk@48703
git-svn-id: http://core.svn.wordpress.org/trunk@48465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-31 17:21:04 +00:00
whyisjake
b4497ef13f
Upgrade/Install: Allow for WordPress.org to remotely disable auto-updates for plugins/themes
...
As auto-updates are rolled out across WordPress.org, the API response can modulate the response, ensuring that a rolled out could be stalled or staggered if needed for security or performance reasons.
Fixes #50824 .
Props dd32, whyisjake, SergeyBiryukov.
Built from https://develop.svn.wordpress.org/trunk@48701
git-svn-id: http://core.svn.wordpress.org/trunk@48463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-31 17:03:05 +00:00
Sergey Biryukov
3f83523b4e
Editor: Correctly back up the global `$post` in `wp-admin/edit-form-blocks.php`.
...
To create a copy of the object, instead of a reference to the same object, the `clone` keyword should be used.
Props scarolan.
Fixes #50775 .
Built from https://develop.svn.wordpress.org/trunk@48700
git-svn-id: http://core.svn.wordpress.org/trunk@48462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-31 14:00:05 +00:00
Sergey Biryukov
07b4429203
Widgets: Use correct escaping function in `WP_Widget_Archives::widget()`.
...
Props chintan1896, afercia.
See #50826 .
Built from https://develop.svn.wordpress.org/trunk@48699
git-svn-id: http://core.svn.wordpress.org/trunk@48461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-31 13:15:05 +00:00
whyisjake
078db63c4b
Upgrade/Install: Pass the plugin file path into the `plugin_auto_update_debug_string` filter.
...
Adds better tooling for when user specific plugins can be updated, but platform specific ones cannot.
Fixes #50821 .
Props bpayton, pbiron, audrasjb, SergeyBiryukov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48696
git-svn-id: http://core.svn.wordpress.org/trunk@48458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-30 21:50:02 +00:00
John Blackbourn
782f05d2c5
Docs: Various fixes and improvements to inline documentation.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48695
git-svn-id: http://core.svn.wordpress.org/trunk@48457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-30 19:14:03 +00:00
Sergey Biryukov
629af79b24
Docs: Correct formatting for a comment in `wp-admin/options-permalink.php`.
...
See #50768 .
Built from https://develop.svn.wordpress.org/trunk@48694
git-svn-id: http://core.svn.wordpress.org/trunk@48456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-30 14:02:04 +00:00
Sergey Biryukov
cf137e7c1b
Comments: Pass the `$which` parameter to the `manage_comments_nav` action.
...
This brings some consistency with the `manage_users_extra_tablenav` and `manage_users_extra_tablenav` actions.
Props Tkama, wpgurudev.
Fixes #50736 .
Built from https://develop.svn.wordpress.org/trunk@48693
git-svn-id: http://core.svn.wordpress.org/trunk@48455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-30 13:27:04 +00:00
Sergey Biryukov
bb0630caa9
I18N: Use a placeholder instead of the `\` character in a translatable string in `WP_REST_Users_Controller::check_user_password()`.
...
Props ramiy.
Fixes #50812 .
Built from https://develop.svn.wordpress.org/trunk@48692
git-svn-id: http://core.svn.wordpress.org/trunk@48454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-30 12:28:06 +00:00
Sergey Biryukov
72b87b3d74
Themes: Pass correct variable to `is_php_version_compatible()` in `wp_theme_update_row()`.
...
This applies to the Themes screen in Multisite network admin.
Follow-up to [48660].
Props pbiron, afragen.
Fixes #48507 . See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48689
git-svn-id: http://core.svn.wordpress.org/trunk@48451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-29 21:08:02 +00:00
whyisjake
e6bfdde581
Upgrade/Install: Only show auto-update for themes that support the feature.
...
Similar to the changes for plugins in [48669], let's only show the UI for themes when updates are supported for that theme.
See #50280 .
Props dd32.
Built from https://develop.svn.wordpress.org/trunk@48688
git-svn-id: http://core.svn.wordpress.org/trunk@48450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-29 20:01:08 +00:00
Sergey Biryukov
1d552ea6b1
Help/About: Adjust two strings on the About page for better i18n.
...
Follow-up to [48675].
Props ocean90, audrasjb, kittmedia, nao.
See #50416 .
Built from https://develop.svn.wordpress.org/trunk@48686
git-svn-id: http://core.svn.wordpress.org/trunk@48448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-29 13:29:04 +00:00
Sergey Biryukov
d351100eba
Upgrade/Install: Pass correct argument to `clear_destination` in `Theme_Upgrader::install()`.
...
Follow-up to [48390].
Props afragen, sabernhardt.
Fixes #9757 .
Built from https://develop.svn.wordpress.org/trunk@48685
git-svn-id: http://core.svn.wordpress.org/trunk@48447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-29 13:09:04 +00:00
Sergey Biryukov
c5ef3b7976
Media: Pass the `$rel` parameter to `image_send_to_editor` filter.
...
Props mihdan, pputzer.
Fixes #50765 .
Built from https://develop.svn.wordpress.org/trunk@48684
git-svn-id: http://core.svn.wordpress.org/trunk@48446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 21:21:05 +00:00
Sergey Biryukov
7ad3de836f
Trunk is now 5.6 alpha.
...
Built from https://develop.svn.wordpress.org/trunk@48683
git-svn-id: http://core.svn.wordpress.org/trunk@48445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 20:56:04 +00:00
whyisjake
0976fed6c8
Post WordPress 5.5 RC 1 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@48681
git-svn-id: http://core.svn.wordpress.org/trunk@48443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 19:15:05 +00:00
whyisjake
fc1c3ab4a3
WordPress 5.5 RC 1.
...
Built from https://develop.svn.wordpress.org/trunk@48680
git-svn-id: http://core.svn.wordpress.org/trunk@48442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 18:54:03 +00:00
whyisjake
7788261f42
WordPress 5.5 RC 1.
...
Built from https://develop.svn.wordpress.org/trunk@48679
git-svn-id: http://core.svn.wordpress.org/trunk@48441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 18:50:02 +00:00
whyisjake
d8fd6d05a3
Upgrade/Install: Swap `auto-update-supported` to `update-supported` in update checks.
...
Ensures backwards compatability with external updaters.
See #50280 .
Props everyone-in-the-core-updates-channel.
Built from https://develop.svn.wordpress.org/trunk@48678
git-svn-id: http://core.svn.wordpress.org/trunk@48440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 18:28:06 +00:00
desrosj
6209a40fd9
Upgrade/Install: Clarify the descriptions for `install_(plugin|theme)_overwrite_actions`.
...
See #9757 .
Built from https://develop.svn.wordpress.org/trunk@48677
git-svn-id: http://core.svn.wordpress.org/trunk@48439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 18:16:07 +00:00
desrosj
1aa48c68f5
Upgrade/Install: Correct spelling of “overwrite” in new hooks and array indexes.
...
See #9757 .
Built from https://develop.svn.wordpress.org/trunk@48676
git-svn-id: http://core.svn.wordpress.org/trunk@48438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:56:04 +00:00
whyisjake
7267fc02b0
Help/About: WordPress 5.5 About Page.
...
Speed. Search. Security.
This is the start of the WordPress 5.5 about page.
Fixes #50416 .
Props ryelle, marybaum, estelaris, yvettesonneveld, michelebutcher-jones, metalandcoffee, melchoyce, marktimemedia, abhanonstopnewsuk, elmastudio, davidbaumwald, audrasjb, afercia, cbringmann, andreamiddleton, desrosj, earnjam, SergeyBiryukov, whyisjake, elrae.
Built from https://develop.svn.wordpress.org/trunk@48675
git-svn-id: http://core.svn.wordpress.org/trunk@48437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:46:04 +00:00
Sergey Biryukov
404b1a4238
Login and Registration: Correct the logic for determining the path to `wp-login.php` in `wp_lostpassword_url()`.
...
Follow-up to [48672], [48673].
See #39311 .
Built from https://develop.svn.wordpress.org/trunk@48674
git-svn-id: http://core.svn.wordpress.org/trunk@48436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:44:06 +00:00
Sergey Biryukov
466a057422
Login and Registration: Only call `get_blog_details()` in `wp_lostpassword_url()` on Multisite.
...
The function does not exist on single site.
Follow-up to [48672].
See #39311 .
Built from https://develop.svn.wordpress.org/trunk@48673
git-svn-id: http://core.svn.wordpress.org/trunk@48435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:40:05 +00:00
Sergey Biryukov
31702738d6
Login and Registration: Link to the correct site after activating a user on a Multisite install in subdirectory mode.
...
Props pkarjala, Mista-Flo, tmoore41, Ipstenu, ksoares, mukesh27, whyisjake.
Fixes #39311 .
Built from https://develop.svn.wordpress.org/trunk@48672
git-svn-id: http://core.svn.wordpress.org/trunk@48434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:20:06 +00:00
Sergey Biryukov
eb0869755e
Administration: Correct alignment of the "PHP Update Required" dashboard box title.
...
Restore one instance of `!important` CSS rule for backward compatibility.
Follow-up to [48129], [48373].
Props whyisjake, sabernhardt, TimothyBlynJacobs, SergeyBiryukov.
Fixes #50788 .
Built from https://develop.svn.wordpress.org/trunk@48671
git-svn-id: http://core.svn.wordpress.org/trunk@48433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 17:08:03 +00:00
Sergey Biryukov
e4b2ad02b6
Administration: Don't override the `$mode` global in `WP_Screen::render_view_mode()` if it's already set.
...
Follow-up to [48398], [48423], [48424], [48450].
See #49715 .
Built from https://develop.svn.wordpress.org/trunk@48670
git-svn-id: http://core.svn.wordpress.org/trunk@48432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 16:55:04 +00:00
whyisjake
0f1f9bdb03
Upgrade/Install: Enhance auto-updates to be disabled for plugins that don't suport updates.
...
This removes the toggle UI when updates aren't available. When plugins use the filter, the UI is updated to show that they are being controlled via code. And then removed entirely when not available.
See #50798 .
Fixes #50280 .
Props elrae, pbiron, SergeyBiryukov, audrasjb, azaozz, StephenCronin, whyisjake, dd32, TimothyBlynJacobs, desrosj.
Built from https://develop.svn.wordpress.org/trunk@48669
git-svn-id: http://core.svn.wordpress.org/trunk@48431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 16:32:01 +00:00
Sergey Biryukov
2bf5b5749f
Administration: Pull the `table_view_mode` filter for now.
...
The extensibility of list table view modes will be explored in a future release.
Props audrasjb.
See #49715 .
Built from https://develop.svn.wordpress.org/trunk@48668
git-svn-id: http://core.svn.wordpress.org/trunk@48430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 16:19:03 +00:00
Sergey Biryukov
3db534a988
Upgrade/Install: Disable the plugin/theme auto-updates UI if `AUTOMATIC_UPDATER_DISABLED` is defined and set as `true`.
...
Props pbiron, dd32.
Fixes #50798 . See #50280 .
Built from https://develop.svn.wordpress.org/trunk@48667
git-svn-id: http://core.svn.wordpress.org/trunk@48429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 16:15:03 +00:00
Sergey Biryukov
4cfc383544
Upgrade/Install: Check WordPress and PHP version requirements when uploading a plugin or theme from ZIP file.
...
Props mariovalney, desrosj.
See #50593 .
Built from https://develop.svn.wordpress.org/trunk@48666
git-svn-id: http://core.svn.wordpress.org/trunk@48428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 16:07:02 +00:00
Sergey Biryukov
3da046e1bc
Taxonomy: Rename the `default_taxonomy_$taxonomy` option key to `default_term_$taxonomy`.
...
This better reflects the purpose of the option.
Follow-up to [48356], [48480].
See #43517 .
Built from https://develop.svn.wordpress.org/trunk@48665
git-svn-id: http://core.svn.wordpress.org/trunk@48427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 15:42:07 +00:00
Sergey Biryukov
38e6367808
Coding Standards: Reformat a condifion for default taxonomy terms in `map_meta_cap()` for better readability.
...
Follow-up to [48356], [48480].
See #43517 .
Built from https://develop.svn.wordpress.org/trunk@48664
git-svn-id: http://core.svn.wordpress.org/trunk@48426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 14:42:04 +00:00
Sergey Biryukov
ba445c0a59
Taxonomy: Ensure the `child_of` argument of `get_terms()` works as expected with `'fields' => 'id=>name'` or `'id=>slug'`.
...
Props Howdy_McGee, deepaklalwani, planvova.
Fixes #46768 .
Built from https://develop.svn.wordpress.org/trunk@48663
git-svn-id: http://core.svn.wordpress.org/trunk@48425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 14:23:04 +00:00
Sergey Biryukov
fbebb744b0
Bootstrap/Load: Remove the `wp_environment_type` and `wp_get_environment_type` filters.
...
Since `wp_get_environment_type()` runs too early for plugins to hook these filters, and the result is then cached in a static variable and cannot be changed later, the filters are not that useful.
The `WP_ENVIRONMENT_TYPES` and `WP_ENVIRONMENT_TYPE` constants and environment variables should be enough for now.
Follow-up to [47919], [48188], [48372].
Props Clorith, SergeyBiryukov.
Fixes #33161 .
Built from https://develop.svn.wordpress.org/trunk@48662
git-svn-id: http://core.svn.wordpress.org/trunk@48424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 12:10:05 +00:00
Sergey Biryukov
0dd2f9f5c5
Docs: Add missing documentation for various upgrade/install class properties and methods.
...
Props ramiy.
Fixes #42923 .
Built from https://develop.svn.wordpress.org/trunk@48661
git-svn-id: http://core.svn.wordpress.org/trunk@48423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 11:57:03 +00:00
Sergey Biryukov
a745f035ab
Themes: Display a message on Themes list table if a theme update requires a higher version of PHP or WordPress.
...
This applies to the Themes screen in Multisite network admin.
Props afragen, SergeyBiryukov.
Fixes #48507 . See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48660
git-svn-id: http://core.svn.wordpress.org/trunk@48422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 11:34:04 +00:00
Sergey Biryukov
e349d92b53
Themes: Include theme name in available update messages, for better accessibility and consistency with other similar messages.
...
Follow-up to [48652-48654].
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48659
git-svn-id: http://core.svn.wordpress.org/trunk@48421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 11:31:01 +00:00
Sergey Biryukov
5f6d6a79e8
Docs: Document that various metadata functions return false for an invalid ID.
...
Props salcode.
See #40519 .
Built from https://develop.svn.wordpress.org/trunk@48658
git-svn-id: http://core.svn.wordpress.org/trunk@48420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 10:15:04 +00:00
Mike Schroder
8c3d56919e
Upgrade/Install: Improve `wp_opcache_invalidate()` performance.
...
Changes from using `preg_match()` based `.php` extension checking to using `substr()` in `wp_opcache_invalidate()`.
Props jnylen0, aaroncampbell, SergeyBiryukov, desrosj, mikeschroder.
Fixes #50784 .
Built from https://develop.svn.wordpress.org/trunk@48657
git-svn-id: http://core.svn.wordpress.org/trunk@48419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 08:09:05 +00:00
TimothyBlynJacobs
c461697c31
REST API: Remove assets field from block directory controller.
...
Gutenberg no longer uses the assets field to fetch the assets for the installed block so this field can be dropped from the endpoint. This allows us to reintroduce it at a later point without needing to worry about backward compatibility.
See #50732 .
Built from https://develop.svn.wordpress.org/trunk@48656
git-svn-id: http://core.svn.wordpress.org/trunk@48418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 04:10:10 +00:00
whyisjake
26b706e27f
Site Health: Incorrect file path in `require_once`.
...
Ensure that background updater can be loaded for testing to see if auto-updates can enable automatic updates.
Fixes #50793 .
Props dd32.
Built from https://develop.svn.wordpress.org/trunk@48655
git-svn-id: http://core.svn.wordpress.org/trunk@48417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 02:21:06 +00:00
Sergey Biryukov
db175a9868
Themes: Display a message in theme updates list if an update requires a higher version of PHP or WordPress.
...
This applies to the WordPress Updates screen.
Props afragen, SergeyBiryukov.
Fixes #48491 .
Built from https://develop.svn.wordpress.org/trunk@48654
git-svn-id: http://core.svn.wordpress.org/trunk@48416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 01:02:04 +00:00
Sergey Biryukov
ab6c396531
Themes: Correct the logic for displaying a message in theme grid if a theme update requires a higher version of PHP or WordPress.
...
This applies to the Themes screen fallback used when JS is turned off.
Follow-up to [48652].
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48653
git-svn-id: http://core.svn.wordpress.org/trunk@48415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 00:43:02 +00:00
Sergey Biryukov
0122e035b0
Themes: Display a message in theme grid and Theme Details modal if a theme update requires a higher version of PHP or WordPress.
...
This applies to the Themes screen and the Customizer theme browser.
Props afragen, SergeyBiryukov.
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48652
git-svn-id: http://core.svn.wordpress.org/trunk@48414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 00:09:02 +00:00
Sergey Biryukov
6307a7c41c
Docs: Correct alignment for some parameters in JS documentation.
...
Follow-up to [48650].
See #43828 .
Built from https://develop.svn.wordpress.org/trunk@48651
git-svn-id: http://core.svn.wordpress.org/trunk@48413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-28 00:07:03 +00:00
whyisjake
3dd9628aae
Build/Test Tools: Enable JSDocs to be linted with ESLint.
...
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/ ) this add some tooling to lint Javascript docblocks. Two new commands:
* `npm run lint:jsdoc`
* `npm run lint:jsdoc:fix`
The latter will run the linter and try to fix an possible issues automatically.
Fixes #43828 .
Props netweb, atimmer, kamataryo, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48650
git-svn-id: http://core.svn.wordpress.org/trunk@48412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 23:35:02 +00:00
Sergey Biryukov
5d21bc9386
Docs: Correct description for `wp_filter_content_tags()` per the documentation standards.
...
DocBlocks should start with a brief, one sentence explanation of the purpose of the function spanning a maximum of two lines.
Follow-up to [48648].
See #44427 .
Built from https://develop.svn.wordpress.org/trunk@48649
git-svn-id: http://core.svn.wordpress.org/trunk@48411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 21:49:04 +00:00
Andrew Ozz
000086828f
Media: Improve inline docs for `wp_filter_content_tags()`.
...
Props johnstonphilip.
See #44427 .
Built from https://develop.svn.wordpress.org/trunk@48648
git-svn-id: http://core.svn.wordpress.org/trunk@48410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 21:06:03 +00:00
whyisjake
e4b8f29a79
Post WordPress 5.5 Beta 4 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@48647
git-svn-id: http://core.svn.wordpress.org/trunk@48409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 21:01:03 +00:00
whyisjake
5212e88727
WordPress 5.5 Beta 4.
...
Built from https://develop.svn.wordpress.org/trunk@48646
git-svn-id: http://core.svn.wordpress.org/trunk@48408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 20:40:07 +00:00
whyisjake
53c909a825
Mail: PHPMailer swap to use is_email for the default validator.
...
Prior to the PHPMailer update in 5.5, old version of the PHPMailer was setting the validator to 'auto' resulting in a sophisticated logic for determining what email address validation should be used. But the new version defaults to 'php', possibly leading to rejection of email addresses which were fine prior to the upgrade. Let's use the WordPress core function `is_email()` so that it can be fully pluggable.
Fixes #50720 .
Props david.binda, ayeshrajans, Synchro, SergeyBiryukov, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48645
git-svn-id: http://core.svn.wordpress.org/trunk@48407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 20:19:05 +00:00
youknowriad
8e433f2a57
Block Editor: Updated WordPress Packages for 5.5 beta 4
...
Updated packages:
- @wordpress/annotations@1.20.3
- @wordpress/block-directory@1.13.3
- @wordpress/block-editor@4.3.3
- @wordpress/block-library@2.22.3
- @wordpress/blocks@6.20.3
- @wordpress/components@10.0.3
- @wordpress/compose@3.19.3
- @wordpress/core-data@2.20.3
- @wordpress/data-controls@1.16.3
- @wordpress/data@4.22.3
- @wordpress/e2e-test-utils@4.11.1
- @wordpress/e2e-tests@1.20.3
- @wordpress/edit-post@3.21.3
- @wordpress/edit-site@1.11.3
- @wordpress/editor@9.20.3
- @wordpress/format-library@1.22.3
- @wordpress/interface@0.7.3
- @wordpress/keyboard-shortcuts@1.9.3
- @wordpress/list-reusable-blocks@1.21.3
- @wordpress/notices@2.8.3
- @wordpress/nux@3.20.3
- @wordpress/plugins@2.20.3
- @wordpress/rich-text@3.20.3
- @wordpress/server-side-render@1.16.3
- @wordpress/viewport@2.21.3
Fixes #50791 .
Built from https://develop.svn.wordpress.org/trunk@48644
git-svn-id: http://core.svn.wordpress.org/trunk@48406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 20:10:36 +00:00
youknowriad
bb54ebcd0d
Administration: Fix the red links on the Media Modal.
...
The custom link colors for admin scheme colors were overriding the danger color.
Props kebbet, dlh.
Fixes #50547 .
Built from https://develop.svn.wordpress.org/trunk@48643
git-svn-id: http://core.svn.wordpress.org/trunk@48405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 19:17:05 +00:00
TimothyBlynJacobs
86ea4f0838
REST API: Fix warning when using `set_param()` on a JSON request with no body.
...
In [47559] the `WP_REST_Request::set_param()` method was adjusted to try and overwrite an existing parameter definition before forcing the value in the first parameter slot. If `set_param()` was called on a request with an `application/json` content type and an empty body, a PHP warning would be issued. This was due to the JSON parameter type not being set to an array when the body is empty.
This commit avoids the warning by adding an `is_array()` check before calling `array_key_exists`. Ideally, `WP_REST_Reuest::parse_json_params()` would set the JSON parameter type to an empty array in this case, but that is too large of a change at this point in the cycle.
Props manooweb.
Fixes #50786 .
Built from https://develop.svn.wordpress.org/trunk@48642
git-svn-id: http://core.svn.wordpress.org/trunk@48404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 18:46:05 +00:00
whyisjake
de5533e56b
REST API: Install plugin translations after the plugin install. This only installs for the plugin in question, not all plugins.
...
Support for retrieving the langauge pack alongside the install API request was added in https://meta.trac.wordpress.org/changeset/10091 to avoid having to make a plugin update check during the REST API check.
Fixes #50732 .
Props dd32, ocean90, ryelle, swissspidy, tellyworth, whyisjake, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@48641
git-svn-id: http://core.svn.wordpress.org/trunk@48403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 18:31:06 +00:00
Sergey Biryukov
e071ace6c4
Themes: Display a message in theme grid if a theme requires a higher version of PHP or WordPress.
...
This applies to the Themes screen fallback used when JS is turned off.
Props afragen, desrosj, SergeyBiryukov.
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48640
git-svn-id: http://core.svn.wordpress.org/trunk@48402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 15:21:02 +00:00
youknowriad
7d639498e5
Block Editor: Update the Core Block Patterns.
...
Backport the latest block patterns from the Gutenberg plugin.
The new patterns adapt properly to Core themes.
Props nrqsnchz.
Fixes #50550 , #50594 .
Built from https://develop.svn.wordpress.org/trunk@48639
git-svn-id: http://core.svn.wordpress.org/trunk@48401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 15:14:04 +00:00
Sergey Biryukov
4336a2b9a7
Themes: Display a message in theme grid if a theme requires a higher version of PHP or WordPress.
...
This applies to the Themes screen, Add Themes screen, and the Customizer theme browser.
Props afragen, desrosj, SergeyBiryukov.
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48638
git-svn-id: http://core.svn.wordpress.org/trunk@48400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 15:04:03 +00:00
Sergey Biryukov
39147698d9
Themes: Display a message in Details & Preview modal on Add Themes screen if a theme requires a higher version of PHP or WordPress.
...
Props afragen, desrosj, SergeyBiryukov.
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48637
git-svn-id: http://core.svn.wordpress.org/trunk@48399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 14:26:07 +00:00
Sergey Biryukov
1f89186a3d
Themes: Display a message in Theme Details modal if a theme requires a higher version of PHP or WordPress.
...
Props afragen, desrosj, SergeyBiryukov.
See #48491 .
Built from https://develop.svn.wordpress.org/trunk@48636
git-svn-id: http://core.svn.wordpress.org/trunk@48398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 13:12:04 +00:00
Sergey Biryukov
d0be6f61f9
Posts, Post Types: Pass correct variable to the `get_lastpostdate` filter.
...
Follow-up to [48634].
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48635
git-svn-id: http://core.svn.wordpress.org/trunk@48397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 11:38:04 +00:00
Sergey Biryukov
710da7e441
Docs: Synchronize documentation for `get_lastpostdate()` and `get_lastpostmodified()`.
...
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48634
git-svn-id: http://core.svn.wordpress.org/trunk@48396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 11:18:12 +00:00
Sergey Biryukov
39be515e7d
Tests: Add more fixtures to `get_lastpostdate()` and `get_lastpostmodified()` tests.
...
Follow-up to [48631].
Props munyagu.
See #47777 .
Built from https://develop.svn.wordpress.org/trunk@48633
git-svn-id: http://core.svn.wordpress.org/trunk@48395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 11:17:08 +00:00
Mike Schroder
9ec7f2febd
Docs: Correct `wp_opcache_invalidate_file` filter docs.
...
Changes incorrectly named `$filename` variable to `$filepath` and adjusts wording to align with PHP docs.
See #36455 .
Built from https://develop.svn.wordpress.org/trunk@48632
git-svn-id: http://core.svn.wordpress.org/trunk@48394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 09:08:05 +00:00
Sergey Biryukov
4c0a764adc
Posts, Post Types: Pass the post type to `get_lastpostdate()` in `get_lastpostmodified()`.
...
This ensures that the correct values are being compared when retrieving the result for custom post types.
Additionally, pass the `$post_type` parameter to `get_lastpostdate` and `get_lastpostmodified` filters.
Props mikaumoto, munyagu, donmhico, johnbillion, SergeyBiryukov.
Fixes #47777 .
Built from https://develop.svn.wordpress.org/trunk@48631
git-svn-id: http://core.svn.wordpress.org/trunk@48393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 02:18:05 +00:00
Sergey Biryukov
f547eb6174
Docs: Improve documentation for `WP_Http::processHeaders()`.
...
Document the `@return` value using hash notation.
Props marekdedic, valchovski, davidbaumwald, deepaklalwani, thimalw, SergeyBiryukov.
Fixes #48350 .
Built from https://develop.svn.wordpress.org/trunk@48630
git-svn-id: http://core.svn.wordpress.org/trunk@48392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 22:45:03 +00:00
Sergey Biryukov
9f841ea7c3
Docs: Add a note that the `$args` parameter of `register_block_type()` accepts any public property of `WP_Block_Type`.
...
Follow-up to [47754].
Props ediamin.
See #48640 .
Built from https://develop.svn.wordpress.org/trunk@48629
git-svn-id: http://core.svn.wordpress.org/trunk@48391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 22:17:01 +00:00
Sergey Biryukov
aa22457754
REST API: Use a consistent description for the `textdomain` schema property between plugins and themes controllers.
...
Follow-up to [48242], [48627].
Props audrasjb.
Fixes #50776 . See #50321 .
Built from https://develop.svn.wordpress.org/trunk@48628
git-svn-id: http://core.svn.wordpress.org/trunk@48390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 21:54:03 +00:00
Sergey Biryukov
e7eaaa97b1
REST API: Use a consistent name for the `textdomain` schema property between plugins, themes, and block directory controllers.
...
Follow-up to [48242].
See #50321 , #50776 .
Built from https://develop.svn.wordpress.org/trunk@48627
git-svn-id: http://core.svn.wordpress.org/trunk@48389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 21:49:03 +00:00
Sergey Biryukov
61b2cb7761
Docs: Correct `@since` version for `WP_REST_Plugins_Controller::get_item_schema()`.
...
Follow-up to [48242].
See #50321 .
Built from https://develop.svn.wordpress.org/trunk@48626
git-svn-id: http://core.svn.wordpress.org/trunk@48388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 21:42:03 +00:00
Sergey Biryukov
df74d8f10d
Revisions: Ensure the global `$post` remains the same after revision is restored.
...
Because `wp_insert_post()` and `wp_transition_post_status()` are called during the process, plugins can unexpectedly modify `$post`.
Props markparnell, tofandel, archon810, SergeyBiryukov.
Fixes #46671 .
Built from https://develop.svn.wordpress.org/trunk@48625
git-svn-id: http://core.svn.wordpress.org/trunk@48387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 21:25:02 +00:00
Sergey Biryukov
a6cf8df9d1
Docs: Synchronize some comments in `wp-admin/revision.php`.
...
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48624
git-svn-id: http://core.svn.wordpress.org/trunk@48386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 20:43:02 +00:00
Sergey Biryukov
33b3ea7bfe
Docs: Improve documentation for various category functions.
...
Props atachibana.
Fixes #48394 .
Built from https://develop.svn.wordpress.org/trunk@48623
git-svn-id: http://core.svn.wordpress.org/trunk@48385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 17:18:04 +00:00
Sergey Biryukov
93429bb561
Coding Standards: Rename the `$id` parameter in various category functions for clarity.
...
See #49542 .
Built from https://develop.svn.wordpress.org/trunk@48622
git-svn-id: http://core.svn.wordpress.org/trunk@48384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 16:07:06 +00:00
Sergey Biryukov
6731940272
Pings/Trackbacks: Avoid a PHP notice in `do_enclose()` when encountering a URL without a path in post content.
...
Props jbouganim, mukesh27, Otto42, SergeyBiryukov.
Fixes #49872 .
Built from https://develop.svn.wordpress.org/trunk@48621
git-svn-id: http://core.svn.wordpress.org/trunk@48383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 14:08:05 +00:00
Sergey Biryukov
d8c62b5647
Posts, Post Types: Move `get_post_states()` back to the admin for now, require the file in `WP_Customize_Nav_Menus::customize_register()` instead.
...
This provides a minor performance improvement by only running the function in contexts where it's needed.
Follow-up to [47211], [47213], [47763], [48619].
See #46829 , #49374 .
Built from https://develop.svn.wordpress.org/trunk@48620
git-svn-id: http://core.svn.wordpress.org/trunk@48382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 10:51:06 +00:00
Sergey Biryukov
aab535a576
Posts, Post Types: Make `get_post_states()` available on frontend.
...
This allows special pages to be denoted as such when editing a menu in the Customizer.
This applies to the Front Page, Posts Page, and Privacy Policy Page.
Follow-up to [47211], [47213], [47763].
Props dlh, whyisjake, SergeyBiryukov.
Fixes #46829 . See #49374 .
Built from https://develop.svn.wordpress.org/trunk@48619
git-svn-id: http://core.svn.wordpress.org/trunk@48381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-26 01:14:06 +00:00
Sergey Biryukov
609acd89ed
I18N: Merge duplicate "List view" and "Grid view" strings.
...
Props ramiy.
Fixes #50757 .
Built from https://develop.svn.wordpress.org/trunk@48618
git-svn-id: http://core.svn.wordpress.org/trunk@48380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 21:32:05 +00:00
Sergey Biryukov
c88c8db417
Docs: Add a reference to `WP_Customize_Partial::__construct()` for information on accepted arguments in `WP_Customize_Selective_Refresh::add_partial()`.
...
Synchronize the documentation between two places, use `WP_Customize_Partial::__construct()` as the canonical source.
Props marekdedic.
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48617
git-svn-id: http://core.svn.wordpress.org/trunk@48379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 19:40:05 +00:00
Sergey Biryukov
c40a645510
Docs: Correct `@see` references for privacy hooks:
...
* `wp_privacy_personal_data_export_page`
* `wp_privacy_personal_data_erasure_page`
Hooks should be single-quoted when referenced.
Props pbiron, coffee2code.
See #49572 , #meta5318.
Built from https://develop.svn.wordpress.org/trunk@48616
git-svn-id: http://core.svn.wordpress.org/trunk@48378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 19:14:03 +00:00
Sergey Biryukov
7d305c8ff9
Docs: Correct `@since` tags for some `WP_List_Table` hooks:
...
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
Follow-up to [15491], [15578], [26401].
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48615
git-svn-id: http://core.svn.wordpress.org/trunk@48377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 18:55:03 +00:00
Sergey Biryukov
0ef0a1905b
Docs: Remove outdated statement in `bulk_actions-{$this->screen->id}` filter description.
...
As of WordPress 4.7, developers can register their own bulk actions on list table screens.
Follow-up to [17297], [38647].
Props joyously, pbiron.
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48614
git-svn-id: http://core.svn.wordpress.org/trunk@48376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 18:13:02 +00:00
Sergey Biryukov
ebfe7ca39a
I18N: Remove `<code>` tags in an error message in `WP_REST_Posts_Controller::get_item_schema()` for consistency with other strings.
...
Follow-up to [48610].
See #50759 .
Built from https://develop.svn.wordpress.org/trunk@48613
git-svn-id: http://core.svn.wordpress.org/trunk@48375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:41:02 +00:00
Sergey Biryukov
92f66488a3
I18N: Remove `<code>` tags in `invalid_rest_prepare_callback` error message in `register_theme_feature()` for consistency with other strings.
...
Follow-up to [48611].
See #50758 .
Built from https://develop.svn.wordpress.org/trunk@48612
git-svn-id: http://core.svn.wordpress.org/trunk@48374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:39:05 +00:00
Sergey Biryukov
ac0b77f33c
I18N: Move code out of a translatable string in `register_theme_feature()`.
...
Props ramiy.
Fixes #50758 .
Built from https://develop.svn.wordpress.org/trunk@48611
git-svn-id: http://core.svn.wordpress.org/trunk@48373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:31:05 +00:00
Sergey Biryukov
29b0a259df
I18N: Move code out of a translatable string in `WP_REST_Posts_Controller::get_item_schema()`.
...
Props ramiy.
Fixes #50759 .
Built from https://develop.svn.wordpress.org/trunk@48610
git-svn-id: http://core.svn.wordpress.org/trunk@48372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:28:04 +00:00
Sergey Biryukov
08271f4192
I18N: Move code out of a translatable string in `WP_Customize_Manager::customize_preview_init()`.
...
Props ramiy.
Fixes #50760 .
Built from https://develop.svn.wordpress.org/trunk@48609
git-svn-id: http://core.svn.wordpress.org/trunk@48371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 16:01:07 +00:00
Sergey Biryukov
ef382e6aaf
Site Health: Escape the displayed result of the request in REST API availability test.
...
Props siliconforks, gisselfeldt.
Fixes #50588 .
Built from https://develop.svn.wordpress.org/trunk@48608
git-svn-id: http://core.svn.wordpress.org/trunk@48370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 15:38:06 +00:00
Sergey Biryukov
ed9d53ec1f
I18N: Respect the passed `text_direction` argument in `wp_die()`.
...
Previously, the passed value was only used as a fallback if `get_language_attributes()` is not yet available.
Props apedog.
Fixes #49060 .
Built from https://develop.svn.wordpress.org/trunk@48607
git-svn-id: http://core.svn.wordpress.org/trunk@48369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 15:26:05 +00:00
Sergey Biryukov
d07fc084af
Docs: Improve description for `wp_unique_filename()`.
...
Props stevenlinx.
Fixes #50762 .
Built from https://develop.svn.wordpress.org/trunk@48606
git-svn-id: http://core.svn.wordpress.org/trunk@48368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-25 12:31:05 +00:00
Sergey Biryukov
b82cee898b
Bundled Themes: Rebuild Twenty Nineteen’s RTL stylesheet.
...
This adds the changes from [48073] to the `style-rtl.css` file.
Previously committed in [48514], accidentally reverted in [48602].
See #45912 , #49843 .
Built from https://develop.svn.wordpress.org/trunk@48605
git-svn-id: http://core.svn.wordpress.org/trunk@48367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 18:32:03 +00:00
Sergey Biryukov
11f57087c5
Tests: Update `wp_unique_filename()` unit tests to account for `sanitize_file_name()` removing accents.
...
Follow-up to [48603].
See #22363 .
Built from https://develop.svn.wordpress.org/trunk@48604
git-svn-id: http://core.svn.wordpress.org/trunk@48366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 18:19:03 +00:00
Sergey Biryukov
101d00601e
Media: Remove accents in `sanitize_file_name()`.
...
This brings some consistency with `sanitize_title()` and `sanitize_user()`.
Props tar.gz, NumidWasNotAvailable, juliobox, p_enrique, cristovaov, zodiac1978, mikeschroder, markoheijnen, chriscct7, swissspidy, DrProtocols, pento, gitlost, joemcgill, dustinbolton, programmin, Vayu, MaximeCulea, lucasbustamante, nilovelez, RavanH, audrasjb, SergeyBiryukov.
See #22363 .
Built from https://develop.svn.wordpress.org/trunk@48603
git-svn-id: http://core.svn.wordpress.org/trunk@48365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 18:03:02 +00:00
whyisjake
f06efa4e29
Bundled Theme: Ensure parity between the block editor and the front-end in twentynineteen.
...
Alignments and blocks were not always appearing as they should in the admin.
- Wide alignments sometimes appear only as wide as the text column.
- Full and wide appear centered on the text column
- Full-width blocks sometimes do not take up the full width of the page, and other times they cause a horizontal scroll.
- Wide and full group block children take up the full width of the block by default.
Fixes #49843 .
Props kjellr, Joen, poena.
Built from https://develop.svn.wordpress.org/trunk@48602
git-svn-id: http://core.svn.wordpress.org/trunk@48364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 17:48:04 +00:00
whyisjake
d7453598b3
Mail: Ensure that a server hostname can be set by using `network_home_url()`.
...
Due to the varying server setups, `$_SERVER['SERVER_NAME'];` can't reliably ensure that there will be a relevant host that could be used as the hostname in an email. Since the `network_home_url()` is set at this point, and is filterable, this should better enable emails to be sent from the server.
Fixes #25239 .
Props layotte, SergeyBiryukov, nacin, sreedoap, szepe.viktor, jesin, kitchin, mensmaximus, mt8.biz, Grzegorz.Janoszka, cbutlerjr, dd32, BjornW, neodjandre, BjornW, Ipstenu, ocean90, danielbachhuber, desmith, joemcgill, jdgrimes, riasat, derekakelly, swissspidy, lilmike, tsimmons, robert.peake, DavidAnderson, cloudstek, pigdog234, BjornW, rawrly, pessoft, RedSand, seayou, dvershinin, bastho, chesio, Starbuck, afragen, ocean90, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48601
git-svn-id: http://core.svn.wordpress.org/trunk@48363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 17:40:06 +00:00
Sergey Biryukov
b31a5f7569
Docs: Correct documentation for `wp_insert_term()`.
...
The function is used for adding a new term, not updating an existing one.
Props audrasjb, bmartinent.
Fixes #50753 .
Built from https://develop.svn.wordpress.org/trunk@48600
git-svn-id: http://core.svn.wordpress.org/trunk@48362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 12:19:05 +00:00
Sergey Biryukov
faf85323a6
Docs: Correct some documentation for `wp_update_term()`.
...
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48599
git-svn-id: http://core.svn.wordpress.org/trunk@48361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 12:04:08 +00:00
Sergey Biryukov
4fcbb1ee5d
Docs: Add a mention of `core-block-patterns` as a possible value for `add_theme_support()`.
...
Follow-up to [48492].
See #50669 .
Built from https://develop.svn.wordpress.org/trunk@48598
git-svn-id: http://core.svn.wordpress.org/trunk@48360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 01:21:01 +00:00
Sergey Biryukov
7913a1c7db
Docs: Improve documentation for `wp_list_comments()`.
...
Note that passing `div` to the `style` parameter will result in no additional list markup.
Props liuhaibin, jeremyfelt, functionalrhyme.
Fixes #49181 .
Built from https://develop.svn.wordpress.org/trunk@48597
git-svn-id: http://core.svn.wordpress.org/trunk@48359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 01:11:02 +00:00
Sergey Biryukov
544fbefffa
Media: Filter out a few more special characters in `sanitize_file_name()`.
...
Props audrasjb.
Fixes #50231 .
Built from https://develop.svn.wordpress.org/trunk@48596
git-svn-id: http://core.svn.wordpress.org/trunk@48358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 00:59:07 +00:00
Sergey Biryukov
b6f52721ed
Administration: Use sentence case for "Mark as spam" bulk action links for sites and users, for consistency with comments.
...
Follow-up to [48352].
See #40244 .
Built from https://develop.svn.wordpress.org/trunk@48595
git-svn-id: http://core.svn.wordpress.org/trunk@48357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 00:27:03 +00:00
Sergey Biryukov
703a978a77
Administration: Capitalize `Trash` consistently in various messages.
...
When used as a noun referring to the "virtual" place, `Trash` should be capitalized.
Follow-up to [47233], [48352].
See #45317 , #40244 .
Built from https://develop.svn.wordpress.org/trunk@48594
git-svn-id: http://core.svn.wordpress.org/trunk@48356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 00:21:03 +00:00
Sergey Biryukov
e1830a8182
Formatting: Filter out the bullet character in `sanitize_title_with_dashes()`.
...
Props roytanck, deepaklalwani, veromary.
Fixes #49791 .
Built from https://develop.svn.wordpress.org/trunk@48593
git-svn-id: http://core.svn.wordpress.org/trunk@48355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-24 00:03:05 +00:00
Sergey Biryukov
1f3c2fba20
Build/Test Tools: Check if all the required constants are defined before running the test suite.
...
Follow-up to [47904].
Props azaozz, TimothyBlynJacobs, SergeyBiryukov.
Fixes #50251 .
Built from https://develop.svn.wordpress.org/trunk@48592
git-svn-id: http://core.svn.wordpress.org/trunk@48354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 23:28:03 +00:00
Sergey Biryukov
d936f2c959
Docs: Miscellaneous DocBlock corrections.
...
See #49572 .
Built from https://develop.svn.wordpress.org/trunk@48591
git-svn-id: http://core.svn.wordpress.org/trunk@48353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 21:55:04 +00:00
John Blackbourn
9bc7d0a776
Docs: Another pass at some inline docs fixes mostly made by PHPCBF.
...
See #49572 , #50744
Built from https://develop.svn.wordpress.org/trunk@48590
git-svn-id: http://core.svn.wordpress.org/trunk@48352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 21:11:05 +00:00
Sergey Biryukov
3f04e3bf5c
I18N: Further adjust some update/install strings for consistency.
...
Follow-up to [48568], [48569].
See #50708 , #50714 .
Built from https://develop.svn.wordpress.org/trunk@48589
git-svn-id: http://core.svn.wordpress.org/trunk@48351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 21:08:01 +00:00
Sergey Biryukov
5950e15042
I18N: Merge two "Return to top" strings.
...
Props ramiy, carike, whyisjake.
Fixes #50743 .
Built from https://develop.svn.wordpress.org/trunk@48588
git-svn-id: http://core.svn.wordpress.org/trunk@48350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 20:21:07 +00:00
Sergey Biryukov
161821d155
Site Health: Correct the quotes for the `tested` value of mock plugin data in auto-updates test.
...
Follow-up to [48584].
See #50662 .
Built from https://develop.svn.wordpress.org/trunk@48587
git-svn-id: http://core.svn.wordpress.org/trunk@48349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 20:13:05 +00:00
John Blackbourn
57a3f803ae
Docs: First pass at some inline docs fixes mostly made by PHPCBF.
...
See #49572 , #50744
Built from https://develop.svn.wordpress.org/trunk@48586
git-svn-id: http://core.svn.wordpress.org/trunk@48348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 20:01:04 +00:00
John Blackbourn
7f898dd9c4
Docs: Use more appropriate variable names in the inline docs for action and filter parameters.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48585
git-svn-id: http://core.svn.wordpress.org/trunk@48347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 19:06:03 +00:00
desrosj
231d21ebcd
Site Health: Pass all expected parameters to `auto_update_{$type}`.
...
This prevents fatal errors when other hooked functions are expecting both parameters.
Props dd32, desrosj, audrasjb, pbiron.
Fixes #50662 .
Built from https://develop.svn.wordpress.org/trunk@48584
git-svn-id: http://core.svn.wordpress.org/trunk@48346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 19:03:04 +00:00
Sergey Biryukov
0eb1b2a447
I18N: Update "Default Template" string to match the sentence case used in the block editor.
...
Props ramiy.
Fixes #50742 .
Built from https://develop.svn.wordpress.org/trunk@48583
git-svn-id: http://core.svn.wordpress.org/trunk@48345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 18:55:01 +00:00
desrosj
2c2508f98c
General: Ensure the database upgrades from [48575] are run.
...
This corrects the database version to match the commit number the upgrade changes were made.
See #50413 .
Built from https://develop.svn.wordpress.org/trunk@48582
git-svn-id: http://core.svn.wordpress.org/trunk@48344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 18:43:04 +00:00
Sergey Biryukov
49cfbe6ba7
Tests: Update the `es_ES` string used in `wp_send_user_request()` tests to match the current translation.
...
Props a2hosting.
Fixes #50741 .
Built from https://develop.svn.wordpress.org/trunk@48581
git-svn-id: http://core.svn.wordpress.org/trunk@48343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 18:23:04 +00:00
Sergey Biryukov
91bcefd456
Docs: Add missing description for `wp_convert_widget_settings()` parameters.
...
Props stevenlinx.
Fixes #50738 .
Built from https://develop.svn.wordpress.org/trunk@48580
git-svn-id: http://core.svn.wordpress.org/trunk@48342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 13:50:02 +00:00
Sergey Biryukov
12747ac7b7
Coding Standards: Use a consistent naming pattern for variables in `wp-includes/comment-template.php`.
...
See #49542 .
Built from https://develop.svn.wordpress.org/trunk@48579
git-svn-id: http://core.svn.wordpress.org/trunk@48341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 13:34:07 +00:00
Sergey Biryukov
b8871c0323
I18N: Add context to privacy request status strings.
...
These strings already have a context in `create_initial_post_types()`, and should use the same context in `_wp_privacy_statuses()`.
Props ramiy, audrasjb.
Fixes #50740 .
Built from https://develop.svn.wordpress.org/trunk@48578
git-svn-id: http://core.svn.wordpress.org/trunk@48340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 13:13:03 +00:00
Sergey Biryukov
d1b980492f
Docs: Improve description for `comment_id_fields()`.
...
Rename the `$id` parameter to `$post_id` for clarity.
Props stevenlinx.
Fixes #50737 .
Built from https://develop.svn.wordpress.org/trunk@48577
git-svn-id: http://core.svn.wordpress.org/trunk@48339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 13:11:04 +00:00
John Blackbourn
124972f2c6
Docs: Further corrections and improvements to various inline docblocks.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48576
git-svn-id: http://core.svn.wordpress.org/trunk@48338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 07:39:02 +00:00
Aaron Jorbin
6cab8cce22
General: Update code for readability and inclusion
...
There are two pieces in here:
1) The update to change blacklist to blocklist is moved to disallowed_list. "Block" has a meaning in our code, and there could be ambiguity between this code and code related to blocks.
2) This improves backwards compatibility for code that was accessing the now deprecated code.
Previously: [48477], [48405], [48400], [48121], [48122], [48124], [48142], [48566]
Props: desrosj, SergeyBiryukov, johnjamesjacoby
Fixes : #50413
Built from https://develop.svn.wordpress.org/trunk@48575
git-svn-id: http://core.svn.wordpress.org/trunk@48337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 03:14:06 +00:00
John Blackbourn
0bf9b04c53
Docs: Various formatting improvements to inline docblocks.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48574
git-svn-id: http://core.svn.wordpress.org/trunk@48336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:52:05 +00:00
John Blackbourn
1fbcdb2213
Docs: Various corrections to inline docblocks.
...
See #49572
Built from https://develop.svn.wordpress.org/trunk@48573
git-svn-id: http://core.svn.wordpress.org/trunk@48335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:48:06 +00:00
whyisjake
daace832e3
Media: Add "loading" as an allowed kses image attribute
...
With loading="lazy" being added to all images in [47554], let's ensure that it passes kses attributes too.
Fixes #50731 .
Props TimothyBlynJacobs, peterwilsoncc, azaozz.
Built from https://develop.svn.wordpress.org/trunk@48572
git-svn-id: http://core.svn.wordpress.org/trunk@48334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-23 00:44:04 +00:00
TimothyBlynJacobs
51154cd1df
REST API: Remove textdomain from doing it wrong message.
...
See #50075 .
Props dlh.
Built from https://develop.svn.wordpress.org/trunk@48571
git-svn-id: http://core.svn.wordpress.org/trunk@48333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 22:31:04 +00:00
whyisjake
413fae70e8
i18n: Merge similar translation strings in wp-admin/options.php
...
WARNING! is now Warning:
You have been warned.
Fixes #50715 .
Props: ramiy, audrasjb, ocean90.
Built from https://develop.svn.wordpress.org/trunk@48570
git-svn-id: http://core.svn.wordpress.org/trunk@48332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 22:21:03 +00:00
whyisjake
dd642e7b00
i18n: Merge similar translation strings to "Update failed".
...
Fixes #50714 .
Props ramiy, ocean90.
Built from https://develop.svn.wordpress.org/trunk@48569
git-svn-id: http://core.svn.wordpress.org/trunk@48331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 22:10:02 +00:00
whyisjake
921ddab889
I18N: Merge similar "Installation failed" strings
...
Fixes #50708 .
Props ramiy, ocean90, audrasjb.
Built from https://develop.svn.wordpress.org/trunk@48568
git-svn-id: http://core.svn.wordpress.org/trunk@48330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 21:59:05 +00:00
whyisjake
d1517a1ad4
I18N: Update some strings to have periods.
...
Fixes #50707 .
Props ramiy, afercia, audrasjb.
Built from https://develop.svn.wordpress.org/trunk@48567
git-svn-id: http://core.svn.wordpress.org/trunk@48329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 21:55:06 +00:00
desrosj
2cebcb6144
General: Rename `remove_option_allowed_list()` to `remove_allowed_options()`.
...
This was missed in [48142] which renamed `add_option_allowed_list()` to `add_allowed_options()` for better readability. The two functions should have consistent names.
See #50413 .
Built from https://develop.svn.wordpress.org/trunk@48566
git-svn-id: http://core.svn.wordpress.org/trunk@48328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 18:52:02 +00:00
Sergey Biryukov
3db2c3afd4
Upgrade/Install: Don't trigger database upgrade on Ajax requests via `wp-admin/async-upload.php`.
...
Props schlessera, jgrodel, elrae, davidbaumwald, hareesh-pillai, adamsilverstein, SergeyBiryukov.
Fixes #39459 .
Built from https://develop.svn.wordpress.org/trunk@48565
git-svn-id: http://core.svn.wordpress.org/trunk@48327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 12:56:04 +00:00
Sergey Biryukov
6f0b8e2b2b
Accessibility: Themes: Consistently use an underline for "Enable auto-updates" link and theme author link in theme overlay.
...
Props chetan200891, sabernhardt, afercia.
Fixes #50697 .
Built from https://develop.svn.wordpress.org/trunk@48564
git-svn-id: http://core.svn.wordpress.org/trunk@48326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 12:19:05 +00:00
Sergey Biryukov
da43de528f
Docs: Correct type and improve description for the `$fields` parameter of `WP_Query::parse_query()`.
...
Props ocean90, palmiak, johannadevos, noisysocks.
Fixes #44305 .
Built from https://develop.svn.wordpress.org/trunk@48563
git-svn-id: http://core.svn.wordpress.org/trunk@48325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 11:37:02 +00:00
Sergey Biryukov
ca4a76d1f5
Docs: Improve formatting of the `$fields` parameter description in `WP_Term_Query::__construct()`.
...
See #44305 , #49572 .
Built from https://develop.svn.wordpress.org/trunk@48562
git-svn-id: http://core.svn.wordpress.org/trunk@48324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 11:35:07 +00:00
Sergey Biryukov
1373b2056d
Docs: Correct type for the `$theme` parameter of `theme_auto_update_debug_string` filter.
...
Follow-up to [48546], [48549], [48552].
See #50663 .
Built from https://develop.svn.wordpress.org/trunk@48561
git-svn-id: http://core.svn.wordpress.org/trunk@48323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 00:29:03 +00:00
Sergey Biryukov
88e046f1e8
Site Health: Fix some typos in the test for plugin and theme auto-updates.
...
Follow-up to [48548], [48558], [48559].
See #50662 .
Built from https://develop.svn.wordpress.org/trunk@48560
git-svn-id: http://core.svn.wordpress.org/trunk@48322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 00:17:04 +00:00
Sergey Biryukov
c6034be779
Site Health: Correct inverted logic for themes in the test for plugin and theme auto-updates.
...
Follow-up to [48548], [48558].
See #50662 .
Built from https://develop.svn.wordpress.org/trunk@48559
git-svn-id: http://core.svn.wordpress.org/trunk@48321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 00:15:02 +00:00
Sergey Biryukov
93bf0c3b83
Site Health: Add the test for plugin and theme auto-updates to `WP_Site_Health::get_tests()`.
...
This ensures that the test actually runs.
Follow-up to [48548].
See #50662 .
Built from https://develop.svn.wordpress.org/trunk@48558
git-svn-id: http://core.svn.wordpress.org/trunk@48320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 00:07:02 +00:00
Sergey Biryukov
19779e6302
Widgets: Make sure image widgets with custom image size render captions.
...
Props kasparsd, JavierCasares, audrasjb.
Fixes #50160 .
Built from https://develop.svn.wordpress.org/trunk@48557
git-svn-id: http://core.svn.wordpress.org/trunk@48319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 23:14:06 +00:00
Sergey Biryukov
5323fa05e5
REST API: Use consistent error messages when managing network plugins.
...
Props ramiy.
Fixes #50729 .
Built from https://develop.svn.wordpress.org/trunk@48556
git-svn-id: http://core.svn.wordpress.org/trunk@48318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 22:01:03 +00:00
TimothyBlynJacobs
16784a5ea7
REST API: Optimize rest_filter_response_by_context performance.
...
In [47758] a new function `rest_filter_response_by_context` was introduced to expand the JSON schema features supported by the context filtering mechanism.
This commit improves the performance of that function by eliminating repetitive comparisons and loops. Additionally, it improves multi-type support for object + array types.
Fixes #50700 .
Props dlh.
Built from https://develop.svn.wordpress.org/trunk@48555
git-svn-id: http://core.svn.wordpress.org/trunk@48317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 21:22:03 +00:00
Sergey Biryukov
a68d462439
Site Health: Use a consistent label for theme auto-updates in debug data.
...
Props audrasjb.
Fixes #50728 .
Built from https://develop.svn.wordpress.org/trunk@48554
git-svn-id: http://core.svn.wordpress.org/trunk@48316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 21:06:02 +00:00
Sergey Biryukov
00861d91dc
Sitemaps: Rename `wp_register_sitemap()` to `wp_register_sitemap_provider()`.
...
Follow-up to [48536], [48540], [48541].
Props pbiron.
Fixes #50724 .
Built from https://develop.svn.wordpress.org/trunk@48553
git-svn-id: http://core.svn.wordpress.org/trunk@48315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 20:15:02 +00:00
Sergey Biryukov
94d4561906
Site Health: Simplify the logic for displaying whether auto-updates are enabled for plugins and themes.
...
Remove some extra variables.
Follow-up to [48546], [48549].
See #50663 .
Built from https://develop.svn.wordpress.org/trunk@48552
git-svn-id: http://core.svn.wordpress.org/trunk@48314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 18:44:04 +00:00
whyisjake
a5620dfdf6
WordPress 5.5 Beta 3 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@48551
git-svn-id: http://core.svn.wordpress.org/trunk@48313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:56:05 +00:00
whyisjake
222721cd97
WordPress 5.5 Beta 3.
...
Built from https://develop.svn.wordpress.org/trunk@48550
git-svn-id: http://core.svn.wordpress.org/trunk@48312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:32:04 +00:00
Sergey Biryukov
8a58ab36cc
Site Health: Rename the filters added in [48546] for clarity.
...
See #50663 .
Built from https://develop.svn.wordpress.org/trunk@48549
git-svn-id: http://core.svn.wordpress.org/trunk@48311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:09:03 +00:00
whyisjake
9d2b92be26
Site Health: Add tests to check for potential issues with plugin and theme auto-updates.
...
Fixes #50662 .
Props desrosj, audrasjb.
Built from https://develop.svn.wordpress.org/trunk@48548
git-svn-id: http://core.svn.wordpress.org/trunk@48310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:07:05 +00:00
Sergey Biryukov
3061a680a9
Media: Pass the attachment ID to the `wp_image_file_matches_image_meta` filter.
...
Props spacedmonkey.
Fixes #50722 .
Built from https://develop.svn.wordpress.org/trunk@48547
git-svn-id: http://core.svn.wordpress.org/trunk@48309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:55:08 +00:00
whyisjake
32f791da49
Site Health: Add auto-update information to for plugins and themes.
...
New filters:
* `plugin_auto_update_debug_str`
* `theme_auto_update_debug_str`
Fixes #50663 .
Props pbiron, audrasjb, davidbaumwald.
Built from https://develop.svn.wordpress.org/trunk@48546
git-svn-id: http://core.svn.wordpress.org/trunk@48308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:54:02 +00:00
Sergey Biryukov
548df4e3e6
I18N: Add context to some theme strings for consistency.
...
Props ramiy, ocean90.
Fixes #50709 .
Built from https://develop.svn.wordpress.org/trunk@48545
git-svn-id: http://core.svn.wordpress.org/trunk@48307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:33:05 +00:00
Sergey Biryukov
48841f9ab3
Site Health: Rename `upload_max` array key in file upload checks to `max_effective_size` for clarity.
...
Follow-up to [48535].
See #50038 .
Built from https://develop.svn.wordpress.org/trunk@48544
git-svn-id: http://core.svn.wordpress.org/trunk@48306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:20:03 +00:00
Pascal Birchler
1f153b0d12
Sitemaps: Replace `wp_sitemaps_register_providers` filter with more suitable `wp_sitemaps_add_provider` filter.
...
The previous filter failed the goal of allowing developers to filter all providers before they are registered, since it only filtered the built-in ones.
The more specific `wp_sitemaps_add_provider` filter enables exactly that, as it filters every sitemap provider right before it is added to the sitemaps registry.
Props pbiron, pfefferle, Chouby, swissspidy.
Fixes #50660 .
Built from https://develop.svn.wordpress.org/trunk@48543
git-svn-id: http://core.svn.wordpress.org/trunk@48305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:14:07 +00:00
desrosj
b6b2f2ac3f
Administration: Ensure SVG icons in admin menus are correctly colored.
...
Props ryelle.
Fixes #50555 .
Built from https://develop.svn.wordpress.org/trunk@48542
git-svn-id: http://core.svn.wordpress.org/trunk@48304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:10:06 +00:00
Sergey Biryukov
830f0b6563
Sitemaps: Rename `wp_get_sitemaps_providers()` to `wp_get_sitemap_providers()`.
...
Follow-up to [48536], [48540].
Props pbiron, swissspidy, SergeyBiryukov.
See #50724 .
Built from https://develop.svn.wordpress.org/trunk@48541
git-svn-id: http://core.svn.wordpress.org/trunk@48303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:06:04 +00:00
Pascal Birchler
694b407297
Sitemaps: Rename `wp_get_sitemaps()` to `wp_get_sitemaps_providers()`
...
Following [48536], rename the function to match the rest of the sitemaps logic.
Also eliminates some dead code after [48523].
Props pbiron.
See #50724 . See #50643 .
Built from https://develop.svn.wordpress.org/trunk@48540
git-svn-id: http://core.svn.wordpress.org/trunk@48302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:57:04 +00:00
Sergey Biryukov
1c52ad8d3f
Site Health: Move `post_max_size` and `upload_max_filesize` out of a translatable string in file upload checks.
...
Simplify some other strings, use a consistent format for translator comments.
Follow-up to [48535].
See #50038 .
Built from https://develop.svn.wordpress.org/trunk@48539
git-svn-id: http://core.svn.wordpress.org/trunk@48301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:53:04 +00:00
Sergey Biryukov
bec9fa5010
Site Health: Remove `parse_ini_size()`, use the existing `wp_convert_hr_to_bytes()` function instead.
...
Follow-up to [48535].
See #50038 .
Built from https://develop.svn.wordpress.org/trunk@48538
git-svn-id: http://core.svn.wordpress.org/trunk@48300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:40:03 +00:00
desrosj
3dda74c337
Editor: Ensure the required assets for the block directory are enqueued.
...
This fixes an issue where the block directory appears unstyled due to the stylesheets not being enqueued.
Props ryelle, timothyblynjacobs, earnjam.
Fixes #50661 .
Built from https://develop.svn.wordpress.org/trunk@48537
git-svn-id: http://core.svn.wordpress.org/trunk@48299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:38:03 +00:00
Sergey Biryukov
12daeec1f7
Sitemaps: Rename 'sitemap' to 'provider' in `WP_Sitemaps_Registry` class.
...
This class is for registering sitemap providers, not individual sitemaps.
Props swissspidy.
Fixes #50724 .
Built from https://develop.svn.wordpress.org/trunk@48536
git-svn-id: http://core.svn.wordpress.org/trunk@48298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:29:02 +00:00
whyisjake
73a8fb4cc3
Site Health: Include new tests to check for the ability to upload files.
...
Several new checks:
* `max_file_uploads`
* `file_uploads`
* `post_max_size`
* `upload_max_filesize`
* `upload_max`
* `max_file_uploads`
In addition, new function `parse_ini_size()` that converts shorthand byte strings to bytes. Useful for size comparisons.
Fixes #50038 .
Props dd32, donmhico, JavierCasares, SergeyBiryukov, ayeshrajans, Clorith, ipstenu, sabernhardt, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48535
git-svn-id: http://core.svn.wordpress.org/trunk@48297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:21:02 +00:00