Commit Graph

42458 Commits

Author SHA1 Message Date
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