Commit Graph

42318 Commits

Author SHA1 Message Date
Sergey Biryukov
62562f8428 Tests: Update unit tests to account for comment_agent and comment_author_IP values being passed to the preprocess_comment filter.
See #51044.

git-svn-id: https://develop.svn.wordpress.org/trunk@48830 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 16:06:27 +00:00
Jonathan Desrosiers
de70dabf63 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48829 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 13:38:56 +00:00
Sergey Biryukov
ab12557628 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48827 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 12:29:34 +00:00
Sergey Biryukov
de73a6a8e9 Docs: Improve description for WP_Admin_Bar::add_group().
Props stevenlinx.
Fixes #50779.

git-svn-id: https://develop.svn.wordpress.org/trunk@48826 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 02:44:38 +00:00
Sergey Biryukov
c101a86baf Bundled Themes: Correct punctuation in "Your comment is awaiting moderation" string.
Props llizard, mayankmajeji.
Fixes #49867.

git-svn-id: https://develop.svn.wordpress.org/trunk@48825 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 02:25:46 +00:00
Sergey Biryukov
27a2494ebe Comments: Correct punctuation in "Your comment is awaiting moderation" string in Walker_Comment.
Props llizard.
See #49867.

git-svn-id: https://develop.svn.wordpress.org/trunk@48824 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 02:25:13 +00:00
Sergey Biryukov
2b3bf40907 Comments: Revert unintended changes from [48822].
See #51044.

git-svn-id: https://develop.svn.wordpress.org/trunk@48823 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 01:57:29 +00:00
Sergey Biryukov
5f861293e6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48822 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-19 01:55:12 +00:00
Sergey Biryukov
c65973e0f5 Plugins: Avoid a PHP notice if the update-supported key in plugin data is not set.
Props sanzeeb3.
Fixes #51052.

git-svn-id: https://develop.svn.wordpress.org/trunk@48820 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-18 20:36:42 +00:00
Jonathan Desrosiers
5cec68d0c9 Build/Test Tools: Update several NPM dependencies.
These updates were applied by running `npm audit fix`.

See #50769.

git-svn-id: https://develop.svn.wordpress.org/trunk@48818 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-18 15:16:57 +00:00
Sergey Biryukov
76c599ced2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48817 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-18 15:08:19 +00:00
Sergey Biryukov
1911eae4a1 Docs: Correct alignment for some DocBlocks in WP_Query::get_posts().
See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@48816 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-18 12:37:39 +00:00
Sergey Biryukov
89ea6ce552 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48814 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-18 12:03:24 +00:00
Sergey Biryukov
7d0dc26c96 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48812 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-17 14:24:30 +00:00
Sergey Biryukov
09a3a6e7bd Help/About: Fix typo and remove trailing spaces from some strings.
Props mukesh27, casiepa, davidbaumwald.
Fixes #51028.

git-svn-id: https://develop.svn.wordpress.org/trunk@48809 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-17 02:10:55 +00:00
Sergey Biryukov
e6c2f66ab2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48808 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-17 02:01:04 +00:00
Sergey Biryukov
271ab2010a Site Health: Add site environment type to the debug information.
Follow-up to [47919], [48188], [48372].

Props joostdevalk, Clorith.
Fixes #50887.

git-svn-id: https://develop.svn.wordpress.org/trunk@48802 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-16 18:25:50 +00:00
Sergey Biryukov
e499354eee 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48801 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-16 17:52:25 +00:00
Sergey Biryukov
73671e85c5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48800 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-16 17:46:51 +00:00
Sergey Biryukov
a1e05cff28 Docs: Fix typo in the $image parameter description in is_gd_image().
Follow-up to [48798].

See #50833.

git-svn-id: https://develop.svn.wordpress.org/trunk@48799 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-16 14:00:27 +00:00
Sergey Biryukov
cbaa88cb5a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48798 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-16 13:31:57 +00:00
Sergey Biryukov
d41ac05964 Filesystem API: Use correct variable when closing the file handle in WP_Filesystem_FTPext::get_contents().
Props gothick@gothick.org.uk.
Fixes #51029.

git-svn-id: https://develop.svn.wordpress.org/trunk@48797 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-15 20:54:46 +00:00
Timothy Jacobs
dddddc47f4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@48796 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-15 16:09:56 +00:00
Sergey Biryukov
dd071ee278 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48795 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-15 13:44:00 +00:00
Sergey Biryukov
9c220ffaf7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48794 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-15 13:38:52 +00:00
Sergey Biryukov
b9e5fa1077 Docs: Document the parameters of wp_get_associated_nav_menu_items() as optional.
See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@48793 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-15 13:10:15 +00:00
Sergey Biryukov
8c378606ab 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48792 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-14 20:37:42 +00:00
Sergey Biryukov
285d176f08 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48791 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-14 16:33:24 +00:00
Sergey Biryukov
f0733600c9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48790 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-13 12:32:03 +00:00
Sergey Biryukov
ab9aee8af4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48789 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-12 15:23:47 +00:00
Sergey Biryukov
1bf0a780b3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48788 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-12 15:03:50 +00:00
Jonathan Desrosiers
56b096195a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48783 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-11 16:51:22 +00:00
Sergey Biryukov
a84a5029be Docs: Consistently use third-person singular verbs for various filter descriptions, per the documentation standards.
See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@48782 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-11 00:32:22 +00:00
Sergey Biryukov
635ae16e85 Docs: Update documentation for get_{$meta_type}_metadata filter for consistency with default_{$meta_type}_metadata.
Follow-up to [48777].

See #50891.

git-svn-id: https://develop.svn.wordpress.org/trunk@48778 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 15:48:25 +00:00
Jake Spurlock
d434a22552 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@48777 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 15:40:18 +00:00
Jonathan Desrosiers
d8985baaad 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48775 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 15:30:18 +00:00
Jonathan Desrosiers
f05d382e09 Build/Test Tools: Update elliptic in Twenty Twenty.
See #50769.

git-svn-id: https://develop.svn.wordpress.org/trunk@48774 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 15:17:11 +00:00
Ella van Durpe
ab5fb855f3 Editor: update packages
Fixes #50888


git-svn-id: https://develop.svn.wordpress.org/trunk@48772 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 14:16:11 +00:00
Sergey Biryukov
e70870b2c5 I18N: Fix typo in a screen reader text string on the About page.
Follow-up to [48729].

Props pedromendonca.
Fixes #50884.

git-svn-id: https://develop.svn.wordpress.org/trunk@48770 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 13:13:34 +00:00
Sergey Biryukov
82104fac79 I18N: Add a class_exists() check to Plural_Forms class for consistency with other POMO library classes.
Follow-up to [41722].

Fixes #50881.

git-svn-id: https://develop.svn.wordpress.org/trunk@48769 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-10 11:32:01 +00:00
Sergey Biryukov
e0ad73b0a0 I18N: Fix typo in a string in rest_validate_value_from_schema().
Props pedromendonca.
Fixes #50879.

git-svn-id: https://develop.svn.wordpress.org/trunk@48767 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-09 01:58:31 +00:00
Sergey Biryukov
f556437ef4 Coding Standards: Remove a few more extra brackets from some conditions in wp-admin/includes/plugin.php.
Follow-up to [48764].

See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@48766 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-09 01:54:28 +00:00
Sergey Biryukov
f09aab7232 Coding Standards: Use consistent formatting for translator comments in wp-includes/rest-api.php.
See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@48765 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-09 01:44:29 +00:00
Sergey Biryukov
18c0692773 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48764 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-08 21:02:18 +00:00
Sergey Biryukov
9eb6dd69c8 Coding Standards: Simplify some parts of user_can_access_admin_page() for better readability.
Props rnaby, valentinbora, khag7.
Fixes #43848.

git-svn-id: https://develop.svn.wordpress.org/trunk@48762 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-08 20:22:34 +00:00
Sergey Biryukov
fd8169e525 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48761 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-08 14:14:38 +00:00
Sergey Biryukov
5602ba4db7 Docs: Document the return value of get_settings_errors() using hash notation.
Props stevenlinx, webdevmattcrom, atachibana.
Fixes #42786.

git-svn-id: https://develop.svn.wordpress.org/trunk@48760 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-08 12:37:03 +00:00
Jake Spurlock
6ebff324b2 Themes: Update the test_theme_supports_custom_logo to check for the unlink-homepage-logo property.
See #37011, [48757].
Props TimothyBlynJacobs, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@48758 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-07 20:42:04 +00:00
Sergey Biryukov
a5771dc74b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48757 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-07 19:41:16 +00:00
Andrew Ozz
5868743f1f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@48754 602fd350-edb4-49c9-b593-d223f7449a82
2020-08-07 18:28:36 +00:00