Commit Graph

15430 Commits

Author SHA1 Message Date
ianbelanger
9524b335c7 Bundled Themes: Twenty Twenty and Twenty Nineteen version bump.
We are releasing new versions of Twenty Twenty & Twenty Nineteen today thus we need to bump the version.

Props ianbelanger.
Fixes #50359.
Built from https://develop.svn.wordpress.org/trunk@47952


git-svn-id: http://core.svn.wordpress.org/trunk@47724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:32:06 +00:00
whyisjake
dda0ccdd18 Administration: Add a new filter to extend set-screen-option.
Props: xknown, SergeyBiryukov.

Built from https://develop.svn.wordpress.org/trunk@47951


git-svn-id: http://core.svn.wordpress.org/trunk@47723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:24:51 +00:00
whyisjake
ffc4869c9c Themes: Ensure a broken theme name is returned properly.
Props: sstoqnov.

Built from https://develop.svn.wordpress.org/trunk@47950


git-svn-id: http://core.svn.wordpress.org/trunk@47722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:23:36 +00:00
whyisjake
10e2a50c52 Formatting: Ensure that wp_validate_redirect() sanitizes a wider variety of characters.
Props: xknow, vortfu.


Built from https://develop.svn.wordpress.org/trunk@47949


git-svn-id: http://core.svn.wordpress.org/trunk@47721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:22:28 +00:00
whyisjake
7e9267567f Editor: Prevent HTML decoding on by setting the proper editor context.
Props: sstoqnov.

Built from https://develop.svn.wordpress.org/trunk@47948


git-svn-id: http://core.svn.wordpress.org/trunk@47720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:21:20 +00:00
whyisjake
2ae3b3b801 Embeds: Ensure that the title attribute is set correctly on embeds.
Props xknown.

Built from https://develop.svn.wordpress.org/trunk@47947


git-svn-id: http://core.svn.wordpress.org/trunk@47719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 17:20:10 +00:00
Sergey Biryukov
1d95eb63a7 Docs: Add missing documentation for the $group parameter of WP_Object_Cache::get_multiple().
Synchronize documentation between `wp_cache_get_multiple()`, its compat version, and the class method.

See #20875.
Built from https://develop.svn.wordpress.org/trunk@47944


git-svn-id: http://core.svn.wordpress.org/trunk@47717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 09:57:09 +00:00
TimothyBlynJacobs
941a31318c REST API: Fix updating "multiple" meta keys with non-string values.
Previously, the REST API would end up deleting each row of metadata and recreating it unnecessarily. This was caused by a type mismatch where the metadata API would always return a string value, and the REST API operated on a typed value.

The REST API now applies the same sanitization and type casting for "multiple" meta keys and "single" meta keys.

Fixes #49339.
Props renathoc.

Built from https://develop.svn.wordpress.org/trunk@47943


git-svn-id: http://core.svn.wordpress.org/trunk@47716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-10 02:22:13 +00:00
desrosj
38352d2c7a Coding Standards: Cleans up some PHPCS issues introduced in [47938].
See #20875.
Built from https://develop.svn.wordpress.org/trunk@47942


git-svn-id: http://core.svn.wordpress.org/trunk@47715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 22:42:12 +00:00
ianbelanger
4e61c5fb0f Bundled Themes: Twenty Twenty number of replies not translatable.
Fixes the issue by removing the single quote from around the `1` in the elseif conditional of the comments template.

Props Parvand, SergeyBiryukov, desrosj, juliobox, Mista-Flo, benjamingosset, audrasjb, opurockey.
Fixes #49058.
Built from https://develop.svn.wordpress.org/trunk@47941


git-svn-id: http://core.svn.wordpress.org/trunk@47714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 20:02:08 +00:00
ianbelanger
32116649cf Bundled Themes: Twenty Twenty HTML in featured image caption is being escaped.
Fixes the issue by replacing `esc_html` with `wp_kses_post` in the caption in featured images.

Props pierlo, JavierCasares, audrasjb.
Fixes #49833.
Built from https://develop.svn.wordpress.org/trunk@47940


git-svn-id: http://core.svn.wordpress.org/trunk@47713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 19:52:07 +00:00
whyisjake
ae76b79f85 Cache API: Include the cache-compat file.
This was missed during the prior commit.

See [47938].


Built from https://develop.svn.wordpress.org/trunk@47939


git-svn-id: http://core.svn.wordpress.org/trunk@47712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 19:50:09 +00:00
whyisjake
3e2b649351 Cache API: Introduce wp_cache_get_multi().
Many caching backend have support for multiple gets in a single request. This brings that support to core, with a compatability fallback that will loop over requests if needed.

Fixes: #20875.
Props: nacin, tollmanz, wonderboymusic, ryan, jeremyfelt, spacedmonkey, boonebgorges, dd32, rmccue, ocean90, jipmoors, johnjamesjacoby, tillkruess, donmhico, davidbaumwald, SergeyBiryukov, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@47938


git-svn-id: http://core.svn.wordpress.org/trunk@47711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 19:47:13 +00:00
whyisjake
c65334d820 Canonical: Ensure a redirect for posts missing postname in a query with an ID.
If a site is using `/%post_id%/%postname%/` as permalink structure, and is missing the `postname`, the site  won't redirect to the appropriate URL. This change ensure that the redirect happens.

Fixes: #12456.
Props: Frank.Prendergast, dd32, Otto42, hlanggo, wonderboymusic, atimmer, seth17, calvin_ngan, Niresh12495, anbumz, SergeyBiryukov, donmhico.



Built from https://develop.svn.wordpress.org/trunk@47937


git-svn-id: http://core.svn.wordpress.org/trunk@47710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 19:26:12 +00:00
Sergey Biryukov
f5d5b76f6e Docs: Fix typo in WP_Widget::__construct() and ::WP_Widget() DocBlocks.
Props SUM1.
Fixes #50348.
Built from https://develop.svn.wordpress.org/trunk@47936


git-svn-id: http://core.svn.wordpress.org/trunk@47709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 15:37:10 +00:00
Sergey Biryukov
c227ed2322 Docs: Improve documentation for is_active_sidebar().
The function determines whether the sidebar contains widgets, not that it is loaded on the page.

Props SUM1.
Fixes #50347.
Built from https://develop.svn.wordpress.org/trunk@47935


git-svn-id: http://core.svn.wordpress.org/trunk@47708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 15:31:09 +00:00
ianbelanger
c681e37da7 Bundled Themes: Twenty Fifteen bulleted list block appears too far to the left in the editor.
Fixes the issue by removing unnecessary margin rules for bulleted lists in the editor.

Props kjellr.
Fixes #50029.
Built from https://develop.svn.wordpress.org/trunk@47934


git-svn-id: http://core.svn.wordpress.org/trunk@47707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 14:10:09 +00:00
ianbelanger
644fb1b931 Bundled Themes: Twenty Twenty uses overly specific selector for button background.
Fixes the issue by removing `:not(.toogle)` from the `button` selector, as it is not needed.

Props flixos90.
Fixes #50271.
Built from https://develop.svn.wordpress.org/trunk@47933


git-svn-id: http://core.svn.wordpress.org/trunk@47706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 13:52:08 +00:00
Sergey Biryukov
bbdfffdaa1 Networks and Sites: Ensure the site ID in wp_insert_site() is still correct after calling clean_blog_cache().
By saving `$wpdb->insert_id` to a variable, we make sure the ID does not change if another database insert is performed on the `clean_site_cache` action.

Props trepmal.
Fixes #50324.
Built from https://develop.svn.wordpress.org/trunk@47932


git-svn-id: http://core.svn.wordpress.org/trunk@47705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 12:41:09 +00:00
Sergey Biryukov
40584118d9 Docs: Document that get_tags() returns a WP_Error object if any of the specified taxonomies do not exist.
Props coffee2code.
Fixes #50344.
Built from https://develop.svn.wordpress.org/trunk@47930


git-svn-id: http://core.svn.wordpress.org/trunk@47703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-09 11:14:12 +00:00
desrosj
784908ae5f Coding Standards: PHP short ternary operator syntax is not allowed.
WPCS 2.2.0 added a sniff for detecting short ternary operator syntax, which is not allowed per the Core handbook.

Follow up of [47927].
Fixes #50258.
Built from https://develop.svn.wordpress.org/trunk@47929


git-svn-id: http://core.svn.wordpress.org/trunk@47702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-08 21:27:10 +00:00
desrosj
d1015f46b5 Build/Test Tools: Update the wp-coding-standards/wpcs package.
This updates the version from 2.1.1 to 2.3.0, the latest version at this time.

Fixes #50258.
Built from https://develop.svn.wordpress.org/trunk@47927


git-svn-id: http://core.svn.wordpress.org/trunk@47701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-08 20:11:10 +00:00
desrosj
c591d94cc5 General: Remove or add inline comments to $HTTP_RAW_POST_DATA occurrences.
The `$HTTP_RAW_POST_DATA` global was deprecated in PHP 5.6 and removed completely in PHP 7.0. In general, `php://input` should be used instead of `$HTTP_RAW_POST_DATA`.

Because WordPress Core still supports PHP 5.6, some plugins or sites may still rely on this variable being present and populated with the expected data. For that reason, occurrences of the variable will remain with updated inline documentation until support for PHP 5.6 is officially dropped in WordPress.

Props skoskie, jrf, desrosj, TimothyBlynJacobs.
See #49922.
Fixes #49810.
Built from https://develop.svn.wordpress.org/trunk@47926


git-svn-id: http://core.svn.wordpress.org/trunk@47700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-08 19:55:10 +00:00
desrosj
9e9be350e2 Bundled Themes: Update several package versions in Twenty Twenty and Twenty Nineteen.
The following packages received version bumps:

Twenty Twenty
- `concurrently`
- `postcss-cli`
- `rtlcss`
- `stylelint-a11y`

Twenty Nineteen
- `node-sass`
- `postcss-cli`
- `rtlcss`

See #49768.
Built from https://develop.svn.wordpress.org/trunk@47925


git-svn-id: http://core.svn.wordpress.org/trunk@47699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-08 18:47:08 +00:00
Sergey Biryukov
4adfd75159 Themes: Show a disabled "Activated" button instead of "Activate" for the active theme on Add Themes screen.
Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen.

Props afercia, SergeyBiryukov.
Fixes #50334.
Built from https://develop.svn.wordpress.org/trunk@47924


git-svn-id: http://core.svn.wordpress.org/trunk@47698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-08 18:16:10 +00:00
TimothyBlynJacobs
5efaf888a5 REST API: Support the (min|max)Items JSON Schema keywords.
A future commit will add support for the uniqueItems keyword.

Props sorenbronsted.
See #48821.

Built from https://develop.svn.wordpress.org/trunk@47923


git-svn-id: http://core.svn.wordpress.org/trunk@47697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-07 22:42:13 +00:00
Sergey Biryukov
18a9359c06 Posts, Post Types: Display a more specific error message when an attachment could not be inserted into the database.
Props shital-patel, Presskopp, ocean90.
Fixes #50325.
Built from https://develop.svn.wordpress.org/trunk@47922


git-svn-id: http://core.svn.wordpress.org/trunk@47696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-07 09:24:11 +00:00
TimothyBlynJacobs
171356a890 REST API: Add additional fields to the themes controller.
When the themes controller was introduced it only returned a theme's supported features. This adds the majority of a theme's header information to the response.

Props ockham, spacedmonkey.
Fixes #49906.

Built from https://develop.svn.wordpress.org/trunk@47921


git-svn-id: http://core.svn.wordpress.org/trunk@47695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-07 06:46:10 +00:00
Peter Wilson
6459c0f2ee Block Editor: Update wp-includes/assets/script-loader-packages.php.
Follow-up to [47765], [47766].
See #50094.

Built from https://develop.svn.wordpress.org/trunk@47920


git-svn-id: http://core.svn.wordpress.org/trunk@47694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-07 01:29:12 +00:00
Sergey Biryukov
b19c1627e5 Bootstrap/Load: Introduce wp_get_environment_type() to retrieve the current environment type.
The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable, a constant of the same name, or the `wp_get_environment_type` filter.

Possible values include `development`, `stage`, `production'. If not set, the type defaults to `production`.

Props Clorith, krogsgard, joostdevalk, frank-klein, Maelacuna, nathanrice, grierson, jchristopher, davidvee, jackfungi, johnbillion, tabrisrp, knutsp, ev3rywh3re, Rastaban, danielbachhuber, pfefferle, audrasjb, SergeyBiryukov.
Fixes #33161.
Built from https://develop.svn.wordpress.org/trunk@47919


git-svn-id: http://core.svn.wordpress.org/trunk@47693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-06 11:07:12 +00:00
Adam Silverstein
0b9a800512 Media: remove any attachment-filter query param when switching views.
Fix an issue where the media attachment filter no longer worked after switching to list view, filtering by a media type then switching back to the grid view.

Props itzmekhokan, netsurfer2705, zodiac1978.
Fixes #43656.


Built from https://develop.svn.wordpress.org/trunk@47915


git-svn-id: http://core.svn.wordpress.org/trunk@47689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-05 21:13:10 +00:00
Sergey Biryukov
f546fe5aa5 Networks and Sites: Update the link text for "Debugging a WordPress Network" support article in ms_not_installed().
Props Presskopp.
Fixes #50326.
Built from https://develop.svn.wordpress.org/trunk@47914


git-svn-id: http://core.svn.wordpress.org/trunk@47688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-05 09:13:08 +00:00
Sergey Biryukov
4bbb7fb852 Docs: Update the DocBlock for the wp_media_attach_action hook per the documentation standards.
Rename the `$att_id` variable to `$attachment_id` for clarity.

Follow-up to [47909].

See #49614.
Built from https://develop.svn.wordpress.org/trunk@47913


git-svn-id: http://core.svn.wordpress.org/trunk@47687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-05 08:30:10 +00:00
desrosj
07a3972bc3 Docs: Fix a typo in the Docker compose file.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47912


git-svn-id: http://core.svn.wordpress.org/trunk@47686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 16:53:09 +00:00
whyisjake
00df557404 REST API: Ensure that all properties of get_endpoint_args_for_item_schema are listed.
* Add new var $valid_schema_properties to match rest_validate_value_from_schema()
* Unit test to ensure all valid properties exists, and non-valid properties are ignored

Fixes: #50301.
Props: pentatonicfunk, TimothyBlynJacobs.


Built from https://develop.svn.wordpress.org/trunk@47911


git-svn-id: http://core.svn.wordpress.org/trunk@47685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 16:43:08 +00:00
desrosj
b013a15d43 Accessibility: Add the aria-hidden attribute to the auto-update related icons.
`<span>` elements used for displaying icons should use the `aria-hidden` attribute as they are purely decorative.

Props audrasjb, ryokuhi.
Fixes #50293.
Built from https://develop.svn.wordpress.org/trunk@47910


git-svn-id: http://core.svn.wordpress.org/trunk@47684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 15:47:09 +00:00
whyisjake
00d3696923 Media: Add an action for wp_media_attach_action.
This action fires when media is attached/detached from a post.

Fixes: #49614.
Props: jonoaldersonwp, antpb, rebasaurus, donmhico. 


Built from https://develop.svn.wordpress.org/trunk@47909


git-svn-id: http://core.svn.wordpress.org/trunk@47683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 15:00:09 +00:00
Sergey Biryukov
0eaae8ebbf Docs: Update type for WP_Block_Type::$style property.
Follow-up to [47907].

See #48529.
Built from https://develop.svn.wordpress.org/trunk@47908


git-svn-id: http://core.svn.wordpress.org/trunk@47682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 10:44:10 +00:00
gziolo
eec4c743fa Blocks: Update default value for some fields in WP_Block_Type
Related to the issue with default values for the blocks registered on the server. By using null for some fields we can treat them as undefined on the client.

See: WordPress/gutenberg#22849.
Props aduth.
Fixes #48529. 


Built from https://develop.svn.wordpress.org/trunk@47907


git-svn-id: http://core.svn.wordpress.org/trunk@47681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-04 06:07:13 +00:00
Sergey Biryukov
b50e87d52b Docs: Add missing @global reference for the $post_id global in wp_admin_bar_edit_menu().
Follow-up to [47903].

Props davidbaumwald.
See #50312.
Built from https://develop.svn.wordpress.org/trunk@47906


git-svn-id: http://core.svn.wordpress.org/trunk@47680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 21:27:09 +00:00
desrosj
2ef561db67 Build/Test Tools: Revert [47901].
This is not matching branches as desired.

Unrops desrosj, jorbin, ocean90, TimothyBlynJacobs.
Fixes #50307.
Built from https://develop.svn.wordpress.org/trunk@47905


git-svn-id: http://core.svn.wordpress.org/trunk@47679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 21:14:09 +00:00
Aaron Jorbin
df343d59f2 Build/Test: Die with an error if populate_network fails
If you are missing WP_TESTS_EMAIL, populate_network will fail and it can be hard to debug. As populate_network can return a wp_error object, we can detect that and display the error to a user.

See: https://github.com/WordPress/gutenberg/pull/22613
Fixes: #50251
Props: TimothyBlynJacobs

Built from https://develop.svn.wordpress.org/trunk@47904


git-svn-id: http://core.svn.wordpress.org/trunk@47678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 21:04:10 +00:00
Sergey Biryukov
524f188982 Toolbar: Display a "View Post" link when viewing comments for a single post on Comments screen.
Props Otto42, matt, SergeyBiryukov.
Fixes #50312.
Built from https://develop.svn.wordpress.org/trunk@47903


git-svn-id: http://core.svn.wordpress.org/trunk@47677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 19:57:10 +00:00
desrosj
27485fd7aa General: Continuing to work towards a passing PHP Compatibility scan.
This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding `phpcs:ignore` comments.

With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).

Props desrosj, johnbillion, jrf.
See #49922.
Built from https://develop.svn.wordpress.org/trunk@47902


git-svn-id: http://core.svn.wordpress.org/trunk@47676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 17:40:12 +00:00
desrosj
e2790b4e63 Build/Test Tools: Disable Travis CI build Slack notifications for non-official branches.
When branches are unintentionally pushed to the GitHub `wordpress-develop` mirror by committers, a build is triggered in Travis and the result is reported in Slack if the criteria defined is met.

Though this is not the desired workflow (any modifications made to the mirror are erased when the repository is synced from SVN), this can cause a lot of noise if several pushes are made and raise false alarms.

This change limits builds only to the `master` branch, and branches meeting the `X.X` pattern to match each branched version.

Props desrosj, jorbin, ocean90, TimothyBlynJacobs.
Fixes #50307.
Built from https://develop.svn.wordpress.org/trunk@47901


git-svn-id: http://core.svn.wordpress.org/trunk@47675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 17:03:12 +00:00
Sergey Biryukov
353def14e2 Docs: Document the term_order value for the orderby parameter of WP_Term_Query::__construct().
Props pbiron.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47898


git-svn-id: http://core.svn.wordpress.org/trunk@47672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 14:41:06 +00:00
Sergey Biryukov
5636fb886b Docs: Reformat the orderby section of WP_Term_Query::__construct() for better readability.
This makes it more consistent with the `fields` section.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@47897


git-svn-id: http://core.svn.wordpress.org/trunk@47671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 14:37:09 +00:00
Sergey Biryukov
f22e113e95 File Editor: Don't verify SSL certificate when doing loopback requests for checking for fatal errors.
Previously, verification was disabled for the loopback request to the admin URL, but not to the home URL.

Follow-up to [46230].

Props munyagu.
Fixes #50309. See #47957.
Built from https://develop.svn.wordpress.org/trunk@47896


git-svn-id: http://core.svn.wordpress.org/trunk@47670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 11:43:15 +00:00
Sergey Biryukov
683507fe14 External Libraries: Update clipboard.js to 2.0.6.
This change includes some bug fixes and removal of the PhantomJS dependency.

Changelog: https://github.com/zenorocha/clipboard.js/compare/v2.0.4...v2.0.6

Props hareesh-pillai.
Fixes #50306.
Built from https://develop.svn.wordpress.org/trunk@47895


git-svn-id: http://core.svn.wordpress.org/trunk@47669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 11:12:33 +00:00
Sergey Biryukov
cf597dcf7c Plugins: Make the message displayed when no plugins are installed more concise.
Props johnjamesjacoby, Presskopp.
Fixes #42336.
Built from https://develop.svn.wordpress.org/trunk@47894


git-svn-id: http://core.svn.wordpress.org/trunk@47668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 10:51:13 +00:00
Sergey Biryukov
b247cafd91 Docs: Correct @since version for available_permalink_structure_tags filter.
Follow-up to [41182].

Props tiagohillebrandt, sabernhardt.
Fixes #42624.
Built from https://develop.svn.wordpress.org/trunk@47893


git-svn-id: http://core.svn.wordpress.org/trunk@47667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 10:38:09 +00:00
Sergey Biryukov
72b5018aa3 Docs: Miscellaneous DocBlock corrections.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47892


git-svn-id: http://core.svn.wordpress.org/trunk@47666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-03 10:02:13 +00:00
Adam Silverstein
86b50870ec Formatting: add a new 'safe_style_disallowed_chars' filter.
Enable developers to change the regex used in `safecss_filter_attr` to limit characters in the parsed CSS.

Props paulschreiber, swissspidy, rmccue, bartekcholewa, miinasikk.
Fixes #37134.


Built from https://develop.svn.wordpress.org/trunk@47891


git-svn-id: http://core.svn.wordpress.org/trunk@47665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-02 23:46:11 +00:00
Sergey Biryukov
569c006248 Comments: Rename Walker_Comment::comment_text() to ::filter_comment_text() for clarity.
Ensure the comment object is not null before checking its status.

Follow-up to [47887].

See #49956.
Built from https://develop.svn.wordpress.org/trunk@47889


git-svn-id: http://core.svn.wordpress.org/trunk@47663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-02 21:45:10 +00:00
whyisjake
9f86174e08 Comments: Ensure that unmoderated comments won't be search indexed.
After a comment is submitted, only allow a brief window where the comment is live on the site. 

Fixes #49956.
Props: jonkolbert, ayeshrajans, Asif2BD, peterwilsoncc, imath, audrasjb, jonoaldersonwp, whyisjake.

Built from https://develop.svn.wordpress.org/trunk@47887


git-svn-id: http://core.svn.wordpress.org/trunk@47661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-02 20:12:07 +00:00
Sergey Biryukov
30b61fc9e8 Bundled Themes: Consistently check for WP_Error before outputting get_the_tag_list().
Some themes already had these checks in place as a result of [41756], but not others.

Props sixhours, davidakennedy, SergeyBiryukov.
Fixes #39860.
Built from https://develop.svn.wordpress.org/trunk@47886


git-svn-id: http://core.svn.wordpress.org/trunk@47660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-02 17:05:13 +00:00
Sergey Biryukov
3fd1fe298a Docs: Correct @param type for pre_redirect_guess_404_permalink filter.
Improve filter documentation for consistency with other similar short-circuit filters in core.

Follow-up to [47878].

See #16557.
Built from https://develop.svn.wordpress.org/trunk@47885


git-svn-id: http://core.svn.wordpress.org/trunk@47659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-02 16:23:11 +00:00
Dominik Schilling
ba92ed7615 I18N: Use wp.i18n for translatable strings in wp-admin/js/updates.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50235.
Built from https://develop.svn.wordpress.org/trunk@47884


git-svn-id: http://core.svn.wordpress.org/trunk@47658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 21:41:09 +00:00
Andrew Ozz
0318a92948 Plugins and Themes Auto-Updates: update the state of the auto-update link on the themes screen after successfully saving the setting.
Props desrosj, pbiron, azaozz.
Fixes #50291.
Built from https://develop.svn.wordpress.org/trunk@47883


git-svn-id: http://core.svn.wordpress.org/trunk@47657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 20:53:15 +00:00
Dominik Schilling
94be20e612 Build/Test Tools: Avoid an empty "title" heading if no title is set in _wp_die_handler_exit() and _wp_die_handler_txt().
Fixes #50297.
Built from https://develop.svn.wordpress.org/trunk@47882


git-svn-id: http://core.svn.wordpress.org/trunk@47656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 20:50:08 +00:00
Dominik Schilling
c5ac08ba45 Build/Test Tools: Add PHPUnit to Composer dev dependencies.
This helps setting up the correct version of PHPUnit to run WordPress core tests locally and for using it as source for code autocompletion in tests. Also introduces a new Composer script `test` to run the PHPUnit tests.

Props welcher, ayeshrajans, vinkla, johnbillion, Rarst, netweb, ocean90.
Fixes #46815.
Built from https://develop.svn.wordpress.org/trunk@47881


git-svn-id: http://core.svn.wordpress.org/trunk@47655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 20:31:07 +00:00
Dominik Schilling
c7aab4121f Build/Test Tools: Let WP_UnitTestCase_Base extend the namespaced version of PHPUnit's test case class.
With the minimum PHP version requirement set to 5.6 we're now able to use namespaces by default. This replaces `PHPUnit_Framework_TestCase` with `PHPUnit\Framework\TestCase` for `WP_UnitTestCase_Base` to solve autocompletion issues with code editors when using more recent PHPUnit versions. `PHPUnit\Framework\TestCase` is available since PHPUnit 5.4 and now the minimum required PHPUnit version.

Fixes #50236.
Built from https://develop.svn.wordpress.org/trunk@47880


git-svn-id: http://core.svn.wordpress.org/trunk@47654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 19:43:13 +00:00
whyisjake
69a866a1a9 Administration: Unify the date structure in list view and excerpt view.
Both views now show a full date string. Something like `Published 2020/05/27 at 10:25 pm`.

Fixes: #35391.
Props: afercia, ocean90, TimothyBlynJacobs, audrasjb, SergeyBiryukov, joedolson.


Built from https://develop.svn.wordpress.org/trunk@47879


git-svn-id: http://core.svn.wordpress.org/trunk@47653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 19:15:08 +00:00
whyisjake
f201c1b217 Canonical: Add the ability to disable redirect_guess_404_permalink().
This also adds a few more filters to make adding redirects easier. Notably:

1. `do_redirect_guess_404_permalink`
2. `pre_redirect_guess_404_permalink`
3. `strict_redirect_guess_404_permalink`

Fixes: #16557.
Props: msafi, nacin, simonwheatley, westi, mboynes, joostdevalk, Lex_Robinson, MikeSchinkel, haukep, paulschreiber, DrewAPicture, ravenswd, esemlabel, stevegibson12, martychc23, DrLightman, jivanpal, neonkowy, laternastudio, apedog, audrasjb, davidbaumwald, Confridin, donmhico, ryotsun. 


Built from https://develop.svn.wordpress.org/trunk@47878


git-svn-id: http://core.svn.wordpress.org/trunk@47652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 18:49:10 +00:00
Dominik Schilling
b65cf7f992 Build/Test Tools: Improve Travis config to pass config validation.
* Add missing `os` and `dist` with the current default values.
* Replace the alias `matrix` with `jobs`.
* Remove unsupported `on_start` for `notifications.slack`.

Fixes #50296.
Built from https://develop.svn.wordpress.org/trunk@47877


git-svn-id: http://core.svn.wordpress.org/trunk@47651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 16:39:08 +00:00
Dominik Schilling
7152c73f6a Editor: Fix code style for constructor arguments added in [47875].
Also revert unintended changes to `WP_Block_Type::__construct()` DocBlock.

See #48529.
Built from https://develop.svn.wordpress.org/trunk@47876


git-svn-id: http://core.svn.wordpress.org/trunk@47650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 16:27:15 +00:00
gziolo
c704057e0d Add fields to WP_Block_Type
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them.

Props spacedmonkey, aduth.

Fixes #48529.


Built from https://develop.svn.wordpress.org/trunk@47875


git-svn-id: http://core.svn.wordpress.org/trunk@47649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 12:27:08 +00:00
Sergey Biryukov
1c176ffb1e Docs: Correct and clarify an inline comment about the upload_url_path and upload_path options in wp-admin/options-media.php.
Synchronize it with a similar comment in `wp-admin/options.php`.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@47874


git-svn-id: http://core.svn.wordpress.org/trunk@47648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-01 11:22:13 +00:00
Sergey Biryukov
cda84f2409 Build/Test Tools: Bump node-sass and webpack-dev-server versions as a result of npm audit.
Props whyisjake.
See #49768.
Built from https://develop.svn.wordpress.org/trunk@47873


git-svn-id: http://core.svn.wordpress.org/trunk@47647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-31 20:24:46 +00:00
Sergey Biryukov
f7da44c8d2 Upgrade/Install: Rename wp_in_maintenance_mode() to wp_is_maintenance_mode(), for consistency with wp_is_recovery_mode().
While the former name might be a bit more accurate, the latter matches the existing naming pattern.

Follow-up to [47623].

Fixes #49959.
Built from https://develop.svn.wordpress.org/trunk@47871


git-svn-id: http://core.svn.wordpress.org/trunk@47646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-31 19:54:24 +00:00
Sergey Biryukov
5f47ca5b8b Docs: Adjust the documentation for the new ID alias in get_term_by() for consistency with get_user_by().
Follow-up to [47865].

See #45163.
Built from https://develop.svn.wordpress.org/trunk@47870


git-svn-id: http://core.svn.wordpress.org/trunk@47645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-31 19:53:04 +00:00
whyisjake
9859bf6204 Build/Test Tools: Revert some devDependency changes for 5.5.
After bumping some major updates, tests on Travis are failing. 

See: https://travis-ci.com/WordPress/wordpress-develop/builds/168839259 ##49768.
Unprops: whyisjake.


Built from https://develop.svn.wordpress.org/trunk@47869


git-svn-id: http://core.svn.wordpress.org/trunk@47644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-31 19:51:42 +00:00
whyisjake
ef135efa6d Build/Test Tools: Bump devDependencies for WordPress 5.5
There are several other changes that need to be made for the security audit, this is just the first pass.

Fixes #49768.
Props SergeyBiryukov, whyisjake.

Built from https://develop.svn.wordpress.org/trunk@47867


git-svn-id: http://core.svn.wordpress.org/trunk@47643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-30 04:56:34 +00:00
whyisjake
e8fa5d6fc2 Code Standards: Clean up whitespace on the end of a file.
See: #45163.
Props: whyisjake.


Built from https://develop.svn.wordpress.org/trunk@47866


git-svn-id: http://core.svn.wordpress.org/trunk@47642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-29 23:35:11 +00:00
whyisjake
7798f64340 Taxonomy: Extend get_term_by to accept ID as a term parameter.
Similar to `get_user_by`, both `ID` and `id` should be able to accepted.

Fixes #45163.
Props emrikol, esoj.
 

Built from https://develop.svn.wordpress.org/trunk@47865


git-svn-id: http://core.svn.wordpress.org/trunk@47641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-29 22:43:09 +00:00
Sergey Biryukov
2277a9df24 Docs: Improve documentation for functions in wp-includes/category.php per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47864


git-svn-id: http://core.svn.wordpress.org/trunk@47640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-29 10:07:10 +00:00
Sergey Biryukov
bc18c233d6 Docs: Document that get_category_by_slug() returns false if the category doesn't exist.
Props stevenlinx.
Fixes #50277.
Built from https://develop.svn.wordpress.org/trunk@47863


git-svn-id: http://core.svn.wordpress.org/trunk@47639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-29 10:02:13 +00:00
Sergey Biryukov
8924832842 Coding Standards: Use strict comparison in wp-admin/_index.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47862


git-svn-id: http://core.svn.wordpress.org/trunk@47638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-28 10:02:12 +00:00
Sergey Biryukov
8713fac0d7 Docs: Remove unused @global declarations from _WP_Editors::print_tinymce_scripts().
Follow-up to [47860].

See #45398.
Built from https://develop.svn.wordpress.org/trunk@47861


git-svn-id: http://core.svn.wordpress.org/trunk@47637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 19:48:11 +00:00
whyisjake
552883574b Editor: Remove TinyMCE global version.
The global variable is not being used in the `editor_settings` method. 

Fixes #45398.
Props ishitaka, noisysocks, mista-flo.


Built from https://develop.svn.wordpress.org/trunk@47860


git-svn-id: http://core.svn.wordpress.org/trunk@47636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 19:28:12 +00:00
Andrea Fercia
38b7495af7 Administration and Site Health: Make information on Search engine visibility more prominent.
- makes the "Search engines discouraged" message on the Dashboard more prominent
- adds "Search engine visibility" information under Site Health > Info > WordPress 
- removes title case in favor of sentence case in all the related strings 

Props audrasjb, swissspidy, emanuel_blagonic, Presskopp, karmatosed, valentinbora, melchoyce.
Fixes #35288.

Built from https://develop.svn.wordpress.org/trunk@47859


git-svn-id: http://core.svn.wordpress.org/trunk@47635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 14:33:11 +00:00
Sergey Biryukov
95d53b9a66 Docs: Correct @return value for WP_REST_Meta_Fields::get_value().
Props chrisvanpatten.
Fixes #50259.
Built from https://develop.svn.wordpress.org/trunk@47858


git-svn-id: http://core.svn.wordpress.org/trunk@47634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-27 09:44:11 +00:00
whyisjake
57fb3c6cf0 Coding Standards: Change auto-update filters to be more consistent.
* send_theme_auto_update_email 👉 auto_theme_update_send_email
* wp_plugins_auto_update_enabled 👉 plugins_auto_update_enabled
* wp_themes_auto_update_enabled 👉 themes_auto_update_enabled

Want to make sure that @ronalfy gets props for his work in #50052 too.

See #50052.
Props: ronalfy, pbiron, azaozz, audrasjb, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@47857


git-svn-id: http://core.svn.wordpress.org/trunk@47633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-26 18:03:08 +00:00
Dominik Schilling
a01835679a Posts, Post Types: Pass the post object to the delete_attachment action.
Also add the missing `$post` parameter to the `delete_post` and `deleted_post` actions in `wp_delete_attachment()`.

See #30940.
Built from https://develop.svn.wordpress.org/trunk@47856


git-svn-id: http://core.svn.wordpress.org/trunk@47632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-26 14:49:06 +00:00
Sergey Biryukov
7b192d406a Coding Standards: Fix instances of Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47855


git-svn-id: http://core.svn.wordpress.org/trunk@47631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-26 09:37:10 +00:00
Sergey Biryukov
235bd98f3c Docs: Improve documentation for add_existing_user_to_blog().
Props stevenlinx.
Fixes #50243.
Built from https://develop.svn.wordpress.org/trunk@47854


git-svn-id: http://core.svn.wordpress.org/trunk@47630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-25 14:23:13 +00:00
Sergey Biryukov
786ac48c84 Coding Standards: Use strict comparison in wp-admin/network where static strings are involved.
Includes minor code layout fixes for better readability.

Follow-up to [47808].

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47853


git-svn-id: http://core.svn.wordpress.org/trunk@47629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-24 09:17:09 +00:00
Sergey Biryukov
5899bf0f32 Coding Standards: Use strict comparison for $wp_db_version check in wp-admin/network/upgrade.php.
Follow-up to [47787], [47788].

See #50155, #49542.
Built from https://develop.svn.wordpress.org/trunk@47852


git-svn-id: http://core.svn.wordpress.org/trunk@47628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-24 09:15:07 +00:00
Sergey Biryukov
5b4174e409 Coding Standards: Use strict comparison for more count() calls.
Follow-up to [47848].

Props mukesh27.
Fixes #50232. See #49542.
Built from https://develop.svn.wordpress.org/trunk@47851


git-svn-id: http://core.svn.wordpress.org/trunk@47627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 16:22:07 +00:00
Dominik Schilling
ed71319421 Role/Capability: Use meta caps edit_post, read_post, and delete_post directly.
Rather than consulting the post type object, let `map_meta_cap()` handle that for us.

Props peterwilsoncc, ocean90.
Fixes #50128.
See #23226.
Built from https://develop.svn.wordpress.org/trunk@47850


git-svn-id: http://core.svn.wordpress.org/trunk@47626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 15:24:07 +00:00
Dominik Schilling
aaeab2f3f5 Rest API: Ensure rest_ensure_response() upgrades WP_HTTP_Response to WP_REST_Response.
An instance of `WP_HTTP_Response` doesn't ensure that the required methods used in `WP_REST_Server::dispatch()` exist, currently causing a fatal error.

Props ali11007, TimothyBlynJacobs, ocean90.
Fixes #49495.
Built from https://develop.svn.wordpress.org/trunk@47849


git-svn-id: http://core.svn.wordpress.org/trunk@47625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 14:36:09 +00:00
Sergey Biryukov
b9751d4efe Coding Standards: Use strict comparison for count() calls.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47848


git-svn-id: http://core.svn.wordpress.org/trunk@47624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 11:38:08 +00:00
whyisjake
e9282e7389 Bundled Themes: Add missing RTL styles for to fix inconsistent margins on .alignwide and .alignfull items.
Fixes the inconsistent margins for alignwide and alignfull classes used on Cover Block when it is the first block on a page.

Props kthmd, utz119, nikhilbhansi, and sabernhardt.
Fixes #49435.

Built from https://develop.svn.wordpress.org/trunk@47846


git-svn-id: http://core.svn.wordpress.org/trunk@47622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 06:23:06 +00:00
Sergey Biryukov
f1114d4507 Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php and wp-admin/theme-editor.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47845


git-svn-id: http://core.svn.wordpress.org/trunk@47621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 00:01:10 +00:00
Sergey Biryukov
c0bec847d1 Theme Editor: Remove unused $has_templates boolean.
The variable is a remnant from when the Theme Editor still had the "Templates" heading and is unused in the current logic.

The condition it was a part of would always evaluate to true for a child theme, regardless of the `$has_templates` value.

Props dboy1988.
Fixes #50199.
Built from https://develop.svn.wordpress.org/trunk@47844


git-svn-id: http://core.svn.wordpress.org/trunk@47620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-22 23:20:08 +00:00
whyisjake
e7150ae5c7 REST API: Ensure proper namespacing when registering routes.
The PR will corerce routes that have a leading slash and throwing a `_doing_it_wrong` notice while ensuring a proper namespace.

Fixes #49749.
Props TimothyBlynJacobs, skarabeq, afercia.


Built from https://develop.svn.wordpress.org/trunk@47842


git-svn-id: http://core.svn.wordpress.org/trunk@47618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-22 20:48:08 +00:00
Sergey Biryukov
5850f5f6ef Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-site-health-auto-updates.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47841


git-svn-id: http://core.svn.wordpress.org/trunk@47617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-22 17:56:08 +00:00
Sergey Biryukov
64ed8a7355 Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-debug-data.php.
Follow-up to [47550], [47557], [47835].

See #50052.
Built from https://develop.svn.wordpress.org/trunk@47840


git-svn-id: http://core.svn.wordpress.org/trunk@47616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-22 17:26:07 +00:00
Sergey Biryukov
443dd105d4 Customize: Move the WordPress logo with a white background to the wp-includes directory.
This ensures that the image used as a default site icon looks good on a dark background.

The image was previously changed in the `wp-admin` directory, but the site icon is now loaded from `wp-includes`.

Follow-up to [36635], [47018], [47564], [47832].

Props ocean90.
Fixes #49798.
Built from https://develop.svn.wordpress.org/trunk@47838


git-svn-id: http://core.svn.wordpress.org/trunk@47614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-21 09:10:12 +00:00
Peter Wilson
39babb4dfb KSES: Support the video element's playsinline attribute.
Allow users without the `unfiltered_html` capability to use the `playsinline` attribute when embedding videos.

Additionally this adds unit tests for passing the video element through kses.

Fixes #50167. See #29826.

Built from https://develop.svn.wordpress.org/trunk@47837


git-svn-id: http://core.svn.wordpress.org/trunk@47613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-21 04:54:11 +00:00
Sergey Biryukov
ba03c426db Docs: Add missing @since tag for auto_plugin_theme_update_email filter.
See #50052.
Built from https://develop.svn.wordpress.org/trunk@47836


git-svn-id: http://core.svn.wordpress.org/trunk@47612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-20 19:33:10 +00:00
whyisjake
661b929e1e Security: Add user interface to auto-update themes and plugins.
Building on core update mechanisms, this adds the ability to enable automatic updates for themes and plugins to the WordPress admin. 

Fixes: #50052.
Props: afercia, afragen, audrasjb, azaozz, bookdude13, davidperonne, desrosj, gmays, gmays, javiercasares, karmatosed, knutsp, mapk, mukesh27, netweb, nicolaskulka, nielsdeblaauw, paaljoachim, passoniate, pbiron, pedromendonca, whodunitagency, whyisjake, wpamitkumar, and xkon.

Built from https://develop.svn.wordpress.org/trunk@47835


git-svn-id: http://core.svn.wordpress.org/trunk@47611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-20 18:49:09 +00:00
Andrea Fercia
2a86d8d534 Accessibility: Media: Hide the invisible "file input" on media views from assistive technologies.
The file input button is visually hidden, but was announced by screen readers in workflows unrelated to file uploads.
It is now hidden from assistive technologies by the means of an `aria-hidden` attribute, as its CSS display property must not be changed to make sure it still works on old browsers.

See #49753.
Fixes #47611.

Built from https://develop.svn.wordpress.org/trunk@47834


git-svn-id: http://core.svn.wordpress.org/trunk@47610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-20 13:33:07 +00:00
Sergey Biryukov
23c4fbeaa0 Customize: Load the default site icon from the wp-includes directory.
Files inside the `wp-admin` directory may not be publicly available.

Follow-up to [36635], [47018].

Props whyisjake, finomeno, ocean90.
Fixes #50131.
Built from https://develop.svn.wordpress.org/trunk@47832


git-svn-id: http://core.svn.wordpress.org/trunk@47608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-20 10:36:09 +00:00
Sergey Biryukov
434bee9fc9 Coding Standards: Fix WPCS issues in wp-includes/class-wp-customize-manager.php.
Follow-up to [47819].

Props sorenbronsted.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47821


git-svn-id: http://core.svn.wordpress.org/trunk@47597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-19 08:41:12 +00:00
ianbelanger
bc0e05d6c8 Bundled Themes: Twenty Twenty inconsistent top and bottom margins for .alignwide and .alignfull on Chrome vs Safari.
Fixes the inconsistent margins for `alignwide` and `alignfull` classes used on Cover Block when it is the first block on a page.

Props kthmd, utz119, nikhilbhansi.
Fixes #49435.
Built from https://develop.svn.wordpress.org/trunk@47820


git-svn-id: http://core.svn.wordpress.org/trunk@47596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 19:52:07 +00:00
Sergey Biryukov
307725883a Themes: Prevent installation of themes that require a higher version of PHP or WordPress.
Props afragen.
Fixes #49653. See #48491.
Built from https://develop.svn.wordpress.org/trunk@47819


git-svn-id: http://core.svn.wordpress.org/trunk@47595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 16:03:09 +00:00
Sergey Biryukov
54cdfaef59 Themes: Remove extra whitespace from wp-admin/includes/ajax-actions.php and wp-admin/includes/theme.php.
Follow-up to [47816].

See #48491.
Built from https://develop.svn.wordpress.org/trunk@47818


git-svn-id: http://core.svn.wordpress.org/trunk@47594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 12:55:06 +00:00
Sergey Biryukov
e445642243 Themes: Remove debug call from wp-admin/theme-install.php.
Follow-up to [47816].

See #48491.
Built from https://develop.svn.wordpress.org/trunk@47817


git-svn-id: http://core.svn.wordpress.org/trunk@47593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 12:49:08 +00:00
Sergey Biryukov
b73bbd8139 Themes: Prevent activation and live preview of themes that require a higher version of PHP or WordPress.
Props afragen, jorbin, TimothyBlynJacobs, SergeyBiryukov.
See #48491.
Built from https://develop.svn.wordpress.org/trunk@47816


git-svn-id: http://core.svn.wordpress.org/trunk@47592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 12:32:10 +00:00
Sergey Biryukov
d528d7a044 Site Health: Use WP_Theme::parent() in the inactive themes test as a more reliable check that the parent theme exists.
This is also more consistent with the other instances of directly referencing `WP_Theme::parent()` properties or methods in core.

Props mukesh27, juanlopez4691, davidbaumwald, afragen, SergeyBiryukov.
Fixes #49934.
Built from https://develop.svn.wordpress.org/trunk@47815


git-svn-id: http://core.svn.wordpress.org/trunk@47591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 04:38:10 +00:00
Sergey Biryukov
91936df3d1 Coding Standards: Fix WPCS issues in plugin and theme upgrader classes.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47814


git-svn-id: http://core.svn.wordpress.org/trunk@47590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-17 09:39:11 +00:00
Sergey Biryukov
f9b60d3334 Accessibility: Login and Registration: Respect the prefers-reduced-motion media query for "shake" CSS animation on login failure.
This shake should not occur when the user has opted to reduce motion, for example by selecting the "Reduce motion" option in macOS' preferences or unselecting "Show animations in Windows" in Windows' preferences.

Follow-up to [47226].

Props eddystile, johnbillion, sabernhardt, afercia, audrasjb.
Fixes #49723.
Built from https://develop.svn.wordpress.org/trunk@47813


git-svn-id: http://core.svn.wordpress.org/trunk@47589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 20:25:19 +00:00
TimothyBlynJacobs
cf0bfa3856 Coding Standards: Correct docblock indentation.
Fixes PHPCS failure introduced in r47811.

Built from https://develop.svn.wordpress.org/trunk@47812


git-svn-id: http://core.svn.wordpress.org/trunk@47588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 19:56:09 +00:00
TimothyBlynJacobs
1e524e7322 REST API: Add @since entries for rest_validate_value_from_schema().
See #49572, #48818, #44949, #50053, #48820, #49720, #42961, #44975, #43392, #38583.

Built from https://develop.svn.wordpress.org/trunk@47811


git-svn-id: http://core.svn.wordpress.org/trunk@47587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 19:33:09 +00:00
TimothyBlynJacobs
fe00d7f7bf REST API: Support the JSON Schema pattern keyword.
Props jason_the_adams, birgire, sorenbronsted.
Fixes #44949.

Built from https://develop.svn.wordpress.org/trunk@47810


git-svn-id: http://core.svn.wordpress.org/trunk@47586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 19:03:08 +00:00
TimothyBlynJacobs
26bda18a23 REST API: Check required properties are provided when validating an object.
Previously, the WP_REST_Request object validated that top-level properties were defined, but this did not extend to those object's required properties. This adds validation to rest_validate_value_from_schema() directly.

Both the v3 and v4 JSON Schema syntax for required properties is supported.

Props sorenbronsted.
Fixes #48818.

Built from https://develop.svn.wordpress.org/trunk@47809


git-svn-id: http://core.svn.wordpress.org/trunk@47585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:44:09 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
45f7e68d54 Media: Expose media grid frame via wp-media-grid-ready trigger for easier customization.
Props soulseekah.
Fixes #50185.
Built from https://develop.svn.wordpress.org/trunk@47807


git-svn-id: http://core.svn.wordpress.org/trunk@47583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 17:25:11 +00:00
Sergey Biryukov
16a8128765 Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-screen.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47802


git-svn-id: http://core.svn.wordpress.org/trunk@47578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-15 18:13:09 +00:00
ianbelanger
e54d8406eb Bundled Themes: Twenty Eleven & Twenty Twelve dropdown category widget exceeds parent div when strings are long enough.
Fixes the width of the category dropdown by limiting the width of `select` items in widgets using `max-width: 100%`.

Props gma992, karmatosed.
Fixes #37926.
Built from https://develop.svn.wordpress.org/trunk@47801


git-svn-id: http://core.svn.wordpress.org/trunk@47577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-15 16:31:11 +00:00
ianbelanger
b10bd5134c Bundled Themes: Twenty Twenty version bump.
We are releasing a new version of Twenty Twenty today thus we need to bump the version.

Props ianbelanger.
Fixes #50174.
Built from https://develop.svn.wordpress.org/trunk@47800


git-svn-id: http://core.svn.wordpress.org/trunk@47576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 18:12:07 +00:00
ianbelanger
86b20d5655 Bundled Themes: Twenty Twenty custom post types that don't support authors, shows author box.
This fixes the issue where custom post types will show an author box, even if they don't support authors.

Props joyously, donmhico.
Fixes #48803.
Built from https://develop.svn.wordpress.org/trunk@47799


git-svn-id: http://core.svn.wordpress.org/trunk@47575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 17:17:07 +00:00
Sergey Biryukov
618329a750 Docs: Update Michael Heilemann's URL in a comment in wp-includes/theme-compat/footer.php.
Props ritterml, mukesh27.
Fixes #50171.
Built from https://develop.svn.wordpress.org/trunk@47798


git-svn-id: http://core.svn.wordpress.org/trunk@47574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 15:33:08 +00:00
Sergey Biryukov
69adb593a2 Themes: Add "Block Editor Patterns" and "Full Site Editing" to the list of WordPress theme features.
Follow-up to [meta9876].

Props dingo_d.
Fixes #50164. See #meta5212.
Built from https://develop.svn.wordpress.org/trunk@47797


git-svn-id: http://core.svn.wordpress.org/trunk@47573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 14:43:08 +00:00
ianbelanger
ceed19f625 Bundled Themes: Twenty Twenty add GPLv2 compatible TikTok icon to the social icon menu.
This adds a GPLv2 compatible TikTok icon to replace the non-compatible TikTok icon and update the readme.txt file. Updates previous commit which used a non-compatible TikTok icon [47589]

Props poena, audrasjb, Emlebrun.
Fixes #49893.
Built from https://develop.svn.wordpress.org/trunk@47796


git-svn-id: http://core.svn.wordpress.org/trunk@47572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 13:48:11 +00:00
ianbelanger
f7539586be Bundled Themes: Twenty Twenty add icon for g.page links.
Adds the option to use a g.page url for the social menu.

Props argentite, mayankmajeji.
Fixes #49088.
Built from https://develop.svn.wordpress.org/trunk@47795


git-svn-id: http://core.svn.wordpress.org/trunk@47571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 13:05:09 +00:00
Sergey Biryukov
fb0e6531ab Docs: Add @since notes for theme features added or removed in get_theme_feature_list() after its introduction in WordPress 3.1.
See #50165.
Built from https://develop.svn.wordpress.org/trunk@47794


git-svn-id: http://core.svn.wordpress.org/trunk@47570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 12:50:08 +00:00
Sergey Biryukov
04e3fd6995 Themes: Add "Block Editor Styles" and "Wide Blocks" to the list of WordPress theme features.
These were added to Theme Directory API in anticipation of being committed to core for WordPress 5.2+, which has not happened until now.

Follow-up to [meta8273].

See #46272.
Built from https://develop.svn.wordpress.org/trunk@47790


git-svn-id: http://core.svn.wordpress.org/trunk@47566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 09:18:08 +00:00
Sergey Biryukov
5e42a6c9e5 Export: Use correct escaping function for term IDs in <wp:term> nodes.
Follow-up to [34333].

Props DrLightman, marcio-zebedeu.
Fixes #50113.
Built from https://develop.svn.wordpress.org/trunk@47789


git-svn-id: http://core.svn.wordpress.org/trunk@47565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 07:55:12 +00:00
Sergey Biryukov
9e343ccb33 Coding Standards: Use strict comparison in wp-admin/upgrade.php.
Props mukesh27.
Fixes #50155.
Built from https://develop.svn.wordpress.org/trunk@47788


git-svn-id: http://core.svn.wordpress.org/trunk@47564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-13 10:10:08 +00:00
Sergey Biryukov
1e813b0275 Coding Standards: Correct db_version check in wp-admin/admin.php.
Follow-up to [47785].

See #49239.
Built from https://develop.svn.wordpress.org/trunk@47787


git-svn-id: http://core.svn.wordpress.org/trunk@47563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 20:59:08 +00:00
Sergey Biryukov
bfba3fc458 Docs: Improve documentation for functions in wp-admin/install-helper.php per the documentation standards.
Synchronize descriptions with the functions' counterparts from `wp-admin/includes/upgrade.php`.

See #49572.
Built from https://develop.svn.wordpress.org/trunk@47786


git-svn-id: http://core.svn.wordpress.org/trunk@47562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 18:40:07 +00:00
Sergey Biryukov
aa69c25d5f Coding Standards: Use strict comparison in some wp-admin files.
Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.
Built from https://develop.svn.wordpress.org/trunk@47785


git-svn-id: http://core.svn.wordpress.org/trunk@47561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 18:32:08 +00:00
ianbelanger
2eef7ee2ac Bundled Themes: Twenty Twenty anchor links don't work in mobile menu.
Modifies the mobile modal menu javascript, so that anchor links will close the modal and scroll to the anchor within the page.

Props Giorgio25b, suzylah, yuhin, samful, bdcstr.
Fixes #48916.
Built from https://develop.svn.wordpress.org/trunk@47784


git-svn-id: http://core.svn.wordpress.org/trunk@47560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 16:45:11 +00:00
Sergey Biryukov
2517abb4bd Docs: Add a note that the $protocols parameter of esc_url_raw() defaults to return value of wp_allowed_protocols().
This complements already existing note in `esc_url()`.

Props audrasjb.
Fixes #50147.
Built from https://develop.svn.wordpress.org/trunk@47783


git-svn-id: http://core.svn.wordpress.org/trunk@47559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-11 20:34:13 +00:00
Sergey Biryukov
3fc1b33d53 Docs: Use 3-digit, x.x.x style semantic versioning for inline comments in populate_options().
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47782


git-svn-id: http://core.svn.wordpress.org/trunk@47558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-11 17:26:08 +00:00
Sergey Biryukov
7f60aee75a Tests: Give canonical test fixtures for paginated content more descriptive names.
Follow-up to [47727].

See #28081, #40773, #45337.
Built from https://develop.svn.wordpress.org/trunk@47781


git-svn-id: http://core.svn.wordpress.org/trunk@47557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-10 20:31:08 +00:00
Sergey Biryukov
ddd3647d7d Coding Standards: Rename some files and classes in phpunit/tests/functions/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47780


git-svn-id: http://core.svn.wordpress.org/trunk@47556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-10 12:09:10 +00:00
Peter Wilson
1c4513e5c3 Tests: Add unit tests for _cleanup_header_comment().
Props pbearne.
Fixes #38101. See #8497.

Built from https://develop.svn.wordpress.org/trunk@47779


git-svn-id: http://core.svn.wordpress.org/trunk@47555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-10 05:23:11 +00:00
Sergey Biryukov
0c3117a80f Coding Standards: Fix WPCS issues in wp-includes/update.php.
Props mukesh27.
Fixes #50130.
Built from https://develop.svn.wordpress.org/trunk@47778


git-svn-id: http://core.svn.wordpress.org/trunk@47554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-09 12:52:10 +00:00
Sergey Biryukov
5511b43e2c Administration: Avoid a PHP 7.4 notice in add_meta_box() when attempting to re-add a previously removed box.
The logic for skipping previously removed meta boxes with the `core` priority should also apply to the `sorted` priority that is used when the boxes were manually reordered.

Add a unit test.

Props coolmann, franzarmas, SergeyBiryukov.
Fixes #50019.
Built from https://develop.svn.wordpress.org/trunk@47777


git-svn-id: http://core.svn.wordpress.org/trunk@47553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-09 12:26:12 +00:00
ianbelanger
928ce10da0 Bundled Themes: Twenty Twenty customizer retina_logo should be hidden when no logo is set.
Modifies the Customize setting `Site Identity > Retina logo` so that the option is hidden if there is no logo is set in `Site Identity > Logo`.

Props truongwp.
Fixes #50109.
Built from https://develop.svn.wordpress.org/trunk@47776


git-svn-id: http://core.svn.wordpress.org/trunk@47552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-08 19:36:10 +00:00
Sergey Biryukov
1cde7d86f9 Coding Standards: Fix WPCS issues in wp-admin/includes/template.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47775


git-svn-id: http://core.svn.wordpress.org/trunk@47551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-08 16:36:18 +00:00
Sergey Biryukov
43a6aff0d4 Coding Standards: Use strict comparison in wp-includes/widgets/class-wp-widget-rss.php.
Props mukesh27.
Fixes #50125.
Built from https://develop.svn.wordpress.org/trunk@47774


git-svn-id: http://core.svn.wordpress.org/trunk@47550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-08 08:36:18 +00:00
Sergey Biryukov
33194d29c2 Site Health: Improve the appearance of administration email verification box.
Add `max-width` on desktop view and some padding on smaller screens.

Props chetan200891, azaozz, Clorith, afragen.
Fixes #48607.
Built from https://develop.svn.wordpress.org/trunk@47772


git-svn-id: http://core.svn.wordpress.org/trunk@47548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-07 21:42:11 +00:00
Dominik Schilling
7ded6c2d2a Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.
Built from https://develop.svn.wordpress.org/trunk@47771


git-svn-id: http://core.svn.wordpress.org/trunk@47547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 20:15:07 +00:00
Sergey Biryukov
a0224a579d Menus: Add a Cancel link to the screen for creating a new menu.
The use case this helps the most is when there's only one menu and you click "create a new menu". In this case the Cancel link allows you to go back to the single existing menu.

Props garrett-eclipse, audrasjb.
Fixes #46367.
Built from https://develop.svn.wordpress.org/trunk@47770


git-svn-id: http://core.svn.wordpress.org/trunk@47546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 19:35:11 +00:00
Sergey Biryukov
bf3296a9a0 Script Loader: Add the $group parameter to WP_Dependencies::do_item().
Previously, the method was called with two parameters in `::do_items()`, while the method signature only included one parameter.

Technically, this was not an issue as `WP_Dependencies::do_item()` is a placeholder meant to be overwritten when extending the class. When handling scripts, `WP_Dependencies` is extended with `WP_Scripts`, and the `$group` parameter was only used in `WP_Scripts::do_item()`, which does expect a second argument.

However, officially adding the parameter to `WP_Dependencies::do_item()` signature prevents code misunderstanding and avoids a warning in PHP code inspection tools.

Props kaggdesign, soulseekah, azaozz, SergeyBiryukov.
Fixes #43627.
Built from https://develop.svn.wordpress.org/trunk@47769


git-svn-id: http://core.svn.wordpress.org/trunk@47545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 16:27:12 +00:00
Sergey Biryukov
86ac5e1432 Site Health: Do not trigger the fatal error handler while updates are being installed.
Triggering the error handler during updates may cause false positives. For example, updates may temporarily "fail" while files are moved around, but work fine once completed. Sending emails about temporary failures would just be confusing to the recipient.

Props Clorith, airamerica.
Fixes #48964.
Built from https://develop.svn.wordpress.org/trunk@47768


git-svn-id: http://core.svn.wordpress.org/trunk@47544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 14:38:17 +00:00
whyisjake
538e9fb308 Block Editor: Update _all_ of the block editor packages following the 5.4.1 release.
This is an extension of [47619] and [47765].

Fixes #50094.
Props aduth, peterwilsoncc, whyisjake, ocean90, and afercia.


Built from https://develop.svn.wordpress.org/trunk@47766


git-svn-id: http://core.svn.wordpress.org/trunk@47542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 23:56:33 +00:00
whyisjake
4a11b9db02 Block Editor: Update WordPress Packages following the 5.4.1 release.
This bumps @wordpress/block-library 2.14.7 ➡️ 2.14.8

Fixes #50094.
Props aduth, peterwilsoncc, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@47765


git-svn-id: http://core.svn.wordpress.org/trunk@47541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 23:39:31 +00:00
whyisjake
62f6909480 Code standards: Drop a newline in the customizer to comply with WordPress Coding Standards
Extends [47763] and #46829.

Built from https://develop.svn.wordpress.org/trunk@47764


git-svn-id: http://core.svn.wordpress.org/trunk@47540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 22:00:09 +00:00
whyisjake
7a48040e13 Menus: Denote the special pages in the Customizer menu editor.
The special pages here are the pages that are used for the Privacy Policy, Home, and the Posts page.

Fixes #46829.
Props garrett-eclipse, audrasjb.

Built from https://develop.svn.wordpress.org/trunk@47763


git-svn-id: http://core.svn.wordpress.org/trunk@47539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 21:17:06 +00:00
Sergey Biryukov
9782eb82ad Site Health: Display the original PHP memory limit on Site Health Info screen.
This ensures that if the limit has been modified for admin screens by `wp_raise_memory_limit()`, the original value is displayed along with the current value.

Props Clorith, espiat, zodiac1978, SergeyBiryukov.
Fixes #49329.
Built from https://develop.svn.wordpress.org/trunk@47762


git-svn-id: http://core.svn.wordpress.org/trunk@47538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 18:58:09 +00:00
Sergey Biryukov
b1a275684a Canonical: Only redirect non-existing page requests to the post permalink if the post is found.
Follow-up to [47760].

See #45337, #40773, #28081, #11694.
Built from https://develop.svn.wordpress.org/trunk@47761


git-svn-id: http://core.svn.wordpress.org/trunk@47537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-04 10:49:07 +00:00
Sergey Biryukov
5b046976cc Canonical: Redirect paged requests for a static page assigned as the "Posts page".
This avoids displaying duplicate content of the home page under different URLs with appended page numbers.

This change only affects the `<!--nextpage-->` pagination (`page` query variable) and not the regular multiple posts pagination (`paged` query variable).

The posts page does not support the `<!--nextpage-->` pagination, so requests for invalid page numbers should be redirected to the page permalink, applying the logic previously implemented for single posts or pages.

Follow-up to [34492], [47727].

Props jeremyfelt, sachit.tandukar, SergeyBiryukov.
Fixes #45337. See #40773, #28081, #11694.
Built from https://develop.svn.wordpress.org/trunk@47760


git-svn-id: http://core.svn.wordpress.org/trunk@47536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-04 10:42:07 +00:00
Sergey Biryukov
37d179de1c Coding Standards: Fix WPCS issues in wp-includes/canonical.php.
Reformat long conditions and dense code blocks for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47759


git-svn-id: http://core.svn.wordpress.org/trunk@47535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-04 09:05:08 +00:00
TimothyBlynJacobs
46854d7322 REST API: Support more JSON Schemas when filtering a response by context.
The array type, multi-types, and the additional properties keyword are now supported. Additionally, the filter recurses to an infinite depth.

Fixes #48819.

Built from https://develop.svn.wordpress.org/trunk@47758


git-svn-id: http://core.svn.wordpress.org/trunk@47534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-04 02:46:05 +00:00
TimothyBlynJacobs
ed4bdbb8f1 Tests: Update wp-api-generated.js.
[47755] and [47756] caused a schema change, so the wp-api-generated.js file needs to be updated.

Built from https://develop.svn.wordpress.org/trunk@47757


git-svn-id: http://core.svn.wordpress.org/trunk@47533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-04 00:28:09 +00:00
TimothyBlynJacobs
7023be21f5 REST API: Accept POST requests in the block renderer endpoint.
Rendering a block is idempotent, so a GET is the most natural request method. However, the maximum length of URLs prevented blocks with large attributes from being rendered.

Props ryankienstra.
Fixes #49680.

Built from https://develop.svn.wordpress.org/trunk@47756


git-svn-id: http://core.svn.wordpress.org/trunk@47532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 22:58:05 +00:00
TimothyBlynJacobs
facb1728b9 REST API: Validate that the oembed url parameter is a string.
This prevents a PHP warning from being issued by esc_url_raw when a non-string value is provided.

Props dd32.
Fixes #49991.

Built from https://develop.svn.wordpress.org/trunk@47755


git-svn-id: http://core.svn.wordpress.org/trunk@47531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 22:42:06 +00:00
John Blackbourn
717f0d0a3e Docs: Misc docblock corrections and improvements.
See #49572
Built from https://develop.svn.wordpress.org/trunk@47754


git-svn-id: http://core.svn.wordpress.org/trunk@47530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 19:38:08 +00:00
TimothyBlynJacobs
ac3c2fe60a REST API: Support the uuid JSON Schema format.
This accepts a uuid of any version. A future commit could add support for restricting uuids to a specific version.

Props johnwatkins0.
Fixes #50053.

Built from https://develop.svn.wordpress.org/trunk@47753


git-svn-id: http://core.svn.wordpress.org/trunk@47529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 19:20:09 +00:00
John Blackbourn
c215a6dc27 Build/Test Tools: Further enhancements to the local development environment readme.
Props desrosj, donmhico

See #50058
Built from https://develop.svn.wordpress.org/trunk@47752


git-svn-id: http://core.svn.wordpress.org/trunk@47528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 14:43:07 +00:00
Andrea Fercia
36524e1e25 File Editor: Remove CSS exceptions for the "Select plugin/theme to edit" and documentation "Look Up" buttons.
Buttons should use the default buttons styles, no exceptions.

Props passoniate, garethgillman.
See #49197.
Fixes #49353.

Built from https://develop.svn.wordpress.org/trunk@47751


git-svn-id: http://core.svn.wordpress.org/trunk@47527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 14:21:08 +00:00
Andrea Fercia
bc3cee1d5b Upload: Improve file input and button alignment in plugin/theme upload form.
Resets flexbox on smaller screens. Improves vertical alignment on large screens.
Follow-up to [47599] and [47271].

Props mukesh27, DarkoG.
See #48859, #49914.
Fixes #49951.

Built from https://develop.svn.wordpress.org/trunk@47750


git-svn-id: http://core.svn.wordpress.org/trunk@47526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 13:36:12 +00:00
Sergey Biryukov
72ef4ae81a Docs: Further update inline documentation for the wpdb class per the documentation standards.
Restore some previous edits from [46696], [47060], [47122], [47230] that were accidentally reverted in [47740].

See #49572.
Built from https://develop.svn.wordpress.org/trunk@47749


git-svn-id: http://core.svn.wordpress.org/trunk@47525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-03 11:45:06 +00:00
John Blackbourn
f89f744fb2 Media: Ensure a consistent structure for the array returned by wp_get_attachment_image_src().
The array returned by this function previously included a fourth element only when an intermediate image size was used. This change ensures a consistent structure in the returned array regardless of the function's internal behaviour.

Props wido, joemcgill, johnbillion

Fixes #46113
Built from https://develop.svn.wordpress.org/trunk@47748


git-svn-id: http://core.svn.wordpress.org/trunk@47524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 22:57:06 +00:00
John Blackbourn
1a27d51b48 Menus: Allow empty taxonomy terms to be surfaced when searching for items.
This brings the behaviour inline with that of browsing terms or using the All Items tab, which correctly shows empty terms.

Props birgire, audrasjb

Fixes #45298
Built from https://develop.svn.wordpress.org/trunk@47747


git-svn-id: http://core.svn.wordpress.org/trunk@47523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 22:36:07 +00:00
John Blackbourn
cc4e27142e Upgrade/Install: Unlink the logo on the installation and config setup screens.
This allows for a natural tab order during installation, without negatively impacting users who use the keyboard for navigation, those who use a screen reader, or those who use neither.

Props lwill, afercia, audrasjb.

Fixes #47759
Built from https://develop.svn.wordpress.org/trunk@47746


git-svn-id: http://core.svn.wordpress.org/trunk@47522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 21:46:08 +00:00
John Blackbourn
5641afd43b Administration: Reduce the chance that a PHP error message that occurs before the admin menu gets output is covered by the admin menu.
Props EmpireOfLight, afercia, Mte90, audrasjb, sunnyratilal

Fixes #35155
Built from https://develop.svn.wordpress.org/trunk@47745


git-svn-id: http://core.svn.wordpress.org/trunk@47521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 21:01:05 +00:00
John Blackbourn
55117c5376 Build/Test Tools: Add information regarding the default credentials for the local development environment to the project readme.
Props bookdude13

Fixes #49273
Built from https://develop.svn.wordpress.org/trunk@47744


git-svn-id: http://core.svn.wordpress.org/trunk@47520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 20:19:08 +00:00
John Blackbourn
7307415f6d Build/Test Tools: Add more comprehensive instructions to the readme for the local development environment.
See #50058
Built from https://develop.svn.wordpress.org/trunk@47743


git-svn-id: http://core.svn.wordpress.org/trunk@47519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 19:16:07 +00:00
John Blackbourn
d29f5c14ac Build/Test Tools: Exclude plugins and themes within src.
Just like the `build` directory, `src` can include plugins and themes which shouldn't be linted by PHPCS.

Fixes #49781
Built from https://develop.svn.wordpress.org/trunk@47742


git-svn-id: http://core.svn.wordpress.org/trunk@47518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 18:17:05 +00:00
John Blackbourn
1c01b6c32e Build/Test Tools: Remove unnecessary formatting before linting on Travis CI.
Fixes #49722
Built from https://develop.svn.wordpress.org/trunk@47741


git-svn-id: http://core.svn.wordpress.org/trunk@47517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 17:46:07 +00:00
John Blackbourn
736874a51e Docs: Update inline documentation for the wpdb class.
Props theMikeD

Fixes #49477
Built from https://develop.svn.wordpress.org/trunk@47740


git-svn-id: http://core.svn.wordpress.org/trunk@47516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 17:25:07 +00:00
Dominik Schilling
a6f3ad2d21 Users: Don't reset user language preference on user update.
Props johnbillion.
Fixes #38665.
Built from https://develop.svn.wordpress.org/trunk@47739


git-svn-id: http://core.svn.wordpress.org/trunk@47515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 16:29:06 +00:00
Sergey Biryukov
4abdb06f72 Query: Simplify the logic in WP::handle_404() to allow for easier modifications.
See #45337.
Built from https://develop.svn.wordpress.org/trunk@47738


git-svn-id: http://core.svn.wordpress.org/trunk@47514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-02 08:48:08 +00:00
desrosj
25c841026d General: More PHP compatibility adjustments.
In this round:
- Removed references to `safe_mode` in `class-php3.php`. This was removed in PHP 5.4.
- Add inline exclude comments for compatibility checks in getID3.

Follow up of [47735-47736].

See #49922.
Built from https://develop.svn.wordpress.org/trunk@47737


git-svn-id: http://core.svn.wordpress.org/trunk@47513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-01 20:12:06 +00:00
desrosj
791e3bdb38 General: Fix typo within phpcs:ignore inline comment.
Follow up of [47735].

See #49922.
Built from https://develop.svn.wordpress.org/trunk@47736


git-svn-id: http://core.svn.wordpress.org/trunk@47512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-01 19:36:06 +00:00
desrosj
89ddd19884 General: Fix various issues flagged by the PHPCompatibilityWP PHPCS ruleset.
As part of the continued effort to improve PHP compatibility, the following improvments are being made:

- Removing deprecated PHP `safe_mode` checks not found in bundled external libraries.
- Change the remaining `while` loops using `each()` to `foreach` loops.
- Prevent false positives from being flagged for the `sodium_compat` library being caused by loading this in a non-standard way.
- Add inline comments to not flag deprecated PHP directives in the getID3 library.

Props desrosj, earnjam, dryanpress.
See #49922.
Built from https://develop.svn.wordpress.org/trunk@47735


git-svn-id: http://core.svn.wordpress.org/trunk@47511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-01 19:07:09 +00:00
Sergey Biryukov
10945d2f3d Taxonomy: Restore (un-deprecate) the tag_row_actions filter.
The filter provides a simple way for plugin authors to add actions generically for all taxonomy list tables without looping through each taxonomy individually.

Props joemcgill, delowardev.
Fixes #49808.
Built from https://develop.svn.wordpress.org/trunk@47734


git-svn-id: http://core.svn.wordpress.org/trunk@47510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-01 16:45:09 +00:00
desrosj
a72e30d847 External Libraries: Update the SimplePie library to the latest version (1.5.5).
This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.
Built from https://develop.svn.wordpress.org/trunk@47733


git-svn-id: http://core.svn.wordpress.org/trunk@47509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-01 14:26:07 +00:00
desrosj
7f5686d40e Build/Test Tools: Introduce a command for restarting the local Docker environment.
This change introduces the `env:restart` command for easier restarting of the local Docker environment.

Props desrosj, ianbelanger.
Fixes #50039.

Built from https://develop.svn.wordpress.org/trunk@47730


git-svn-id: http://core.svn.wordpress.org/trunk@47507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-30 20:22:06 +00:00
desrosj
8959d57ceb Reverting [47728].
Unprops desrosj.
See #50039.
Built from https://develop.svn.wordpress.org/trunk@47729


git-svn-id: http://core.svn.wordpress.org/trunk@47506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-30 20:17:09 +00:00
desrosj
4a6383a2da -username=desrosj
Built from https://develop.svn.wordpress.org/trunk@47728


git-svn-id: http://core.svn.wordpress.org/trunk@47505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-30 19:55:07 +00:00
Sergey Biryukov
eae1462bef Canonical: Redirect paged requests for non-paginated posts to the post permalink.
This avoids displaying duplicate content of the same post under different URLs and ensures the canonical URL is correct.

Previously, requests for invalid page numbers were only redirected to the post permalink if the post was actually paginated using the `<!--nextpage-->` marker.

Follow-up to [34492].

Props jeremyfelt, prografika, sachit.tandukar, subrataemfluence, hronak, ekatherine, henry.wright, chesio, dd32, SergeyBiryukov.
Fixes #40773. See #45337, #28081, #11694.
Built from https://develop.svn.wordpress.org/trunk@47727


git-svn-id: http://core.svn.wordpress.org/trunk@47504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-30 12:05:14 +00:00
Sergey Biryukov
8ca76cabfc Help/About: Revert [47699] from trunk.
Built from https://develop.svn.wordpress.org/trunk@47706


git-svn-id: http://core.svn.wordpress.org/trunk@47483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 18:44:11 +00:00
whyisjake
cf8bd373fe Update the about page for WordPress 5.4.1
Built from https://develop.svn.wordpress.org/trunk@47699


git-svn-id: http://core.svn.wordpress.org/trunk@47476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 18:37:05 +00:00
ianbelanger
b1a318f3bd Bundled Themes: Twenty Twenty image caption is not aligned center when image is, on the front-end.
Fixes the image caption alignment issue by adding `text-align: center;` to `.wp-block-image .aligncenter figcaption`.

Props markusthiel, SergeyBiryukov, garethgillman.
Fixes #49320.
Built from https://develop.svn.wordpress.org/trunk@47689


git-svn-id: http://core.svn.wordpress.org/trunk@47466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 18:19:05 +00:00
Sergey Biryukov
800b71ca31 Coding Standards: Fix WPCS issues in tests/formatting/SanitizeFileName.php.
Follow-up to [47638].
Built from https://develop.svn.wordpress.org/trunk@47664


git-svn-id: http://core.svn.wordpress.org/trunk@47441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 17:26:18 +00:00
Sergey Biryukov
266b52513b Docs: Correct @since versions, remove duplicate comment.
Follow-up to [47633].
Built from https://develop.svn.wordpress.org/trunk@47663


git-svn-id: http://core.svn.wordpress.org/trunk@47440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 17:25:10 +00:00
whyisjake
fd21a9346c Formatting: Expand sanitize_file_name to have better support for utf8 characters.
Props: xknown, peterwilsoncc.

Built from https://develop.svn.wordpress.org/trunk@47638


git-svn-id: http://core.svn.wordpress.org/trunk@47413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:40:07 +00:00
whyisjake
c16fa7c73d Cache API: Ensure proper escaping around the stats method in the cache API.
Props: nickdaugherty, batmoo, whyisjake, westi.

Built from https://develop.svn.wordpress.org/trunk@47637


git-svn-id: http://core.svn.wordpress.org/trunk@47412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:36:06 +00:00
whyisjake
94f5dc0cad Block Editor: Coding standards, properly escape class names.
Props: aduth, noisysocks, pento, talldanwp, jorgefilipecosta, whyisjake, ellatrix, ehti.

Built from https://develop.svn.wordpress.org/trunk@47636


git-svn-id: http://core.svn.wordpress.org/trunk@47411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:34:09 +00:00
whyisjake
3ee9488292 Query: Ensure that only a single post can be returned on date/time based queries.
Props: sstoqnov, peterwilsoncc.

Built from https://develop.svn.wordpress.org/trunk@47635


git-svn-id: http://core.svn.wordpress.org/trunk@47410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:28:04 +00:00
whyisjake
f7b4147bea User: Invalidate user_activation_key on password update.
Props: sstoqnov, sergeybiryukov.


Built from https://develop.svn.wordpress.org/trunk@47634


git-svn-id: http://core.svn.wordpress.org/trunk@47409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:25:07 +00:00
whyisjake
55cd633c37 Customize: Add additional filters to Customizer to prevent JSON corruption.
This solution extends the wp_insert_post_data filter to pass in addition to the slashed/sanitized/processed data, and the slashed/sanitized/unprocessed data, to also pass the initial slashed/unsanitized/unprocessed data which was passed into wp_insert_post(). This then allows plugins to have complete control over how sanitization is performed based on the post type.

Props westonruter, peterwilsoncc, sstoqnov, whyisjake, xknown.
 

Built from https://develop.svn.wordpress.org/trunk@47633


git-svn-id: http://core.svn.wordpress.org/trunk@47408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 15:14:10 +00:00
Sergey Biryukov
3dc1e33fb5 Networks and Sites: Link to Nginx documentation on Network Setup screen when Nginx is in use.
Props lipathor, audrasjb, johnbillion, flixos90.
Fixes #41166.
Built from https://develop.svn.wordpress.org/trunk@47632


git-svn-id: http://core.svn.wordpress.org/trunk@47407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 14:43:09 +00:00
Sergey Biryukov
0da2c98ddc Docs: Correct @return type for WP_Theme::get_post_templates().
The method returns an array of strings, not a single string.

Props mayankmajeji, salvatore.formisano.
Fixes #50020.
Built from https://develop.svn.wordpress.org/trunk@47631


git-svn-id: http://core.svn.wordpress.org/trunk@47406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-28 15:02:11 +00:00
Sergey Biryukov
5371e3fd62 Site Health: Avoid a PHP notice in WP_Site_Health::wp_cron_scheduled_check() if async test response does not contain the expected result.
Additionally, avoid a PHP notice in `::get_test_php_version()` if the minimum recommended version of PHP could not be determined.

Props schlessera, oakesjosh.
Fixes #49943.
Built from https://develop.svn.wordpress.org/trunk@47628


git-svn-id: http://core.svn.wordpress.org/trunk@47403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-27 22:01:08 +00:00
TimothyBlynJacobs
352cb55cca REST API: Support the (min|max)Length JSON Schema keywords.
Props sorenbronsted.
Fixes #48820.

Built from https://develop.svn.wordpress.org/trunk@47627


git-svn-id: http://core.svn.wordpress.org/trunk@47402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-27 02:29:07 +00:00
Sergey Biryukov
e55ca10ddc Comments: Ensure that inserting a comment with an empty type results in correct comment type.
Add unit tests for `wp_handle_comment_submission()` and `wp_insert_comment()` receiving an empty type.

Follow-up to [47597].

Props ocean90, imath.
Fixes #49236.
Built from https://develop.svn.wordpress.org/trunk@47626


git-svn-id: http://core.svn.wordpress.org/trunk@47401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-26 13:44:07 +00:00
Sergey Biryukov
6b5087812c Comments: Restore inclusion of an empty comment type when building the WHERE clause in WP_Comment_Query::get_comment_ids().
This ensures that `get_comments( array( 'type' => 'comment' ) )` still includes comments that have not yet migrated to the `comment` type.

Follow-up to [47597].

Props ocean90.
See #49236.
Built from https://develop.svn.wordpress.org/trunk@47625


git-svn-id: http://core.svn.wordpress.org/trunk@47400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-26 13:14:06 +00:00
Sergey Biryukov
77eb929b52 Upgrade/Install: Introduce wp_in_maintenance_mode(), a helper function to check if WordPress is currently in maintenance mode.
Props Clorith.
Fixes #49959.
Built from https://develop.svn.wordpress.org/trunk@47623


git-svn-id: http://core.svn.wordpress.org/trunk@47398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-25 20:19:07 +00:00
Sergey Biryukov
43cfa7ee60 Administration: Remove right padding on form tables on smaller screens so that the spacing is equal on both sides.
Additionally, reduce the right margin on screen meta links (Help and Screen Options) to align with the tables.

Props jainnidhi, garrett-eclipse, ibdz, SergeyBiryukov.
Fixes #43279.
Built from https://develop.svn.wordpress.org/trunk@47622


git-svn-id: http://core.svn.wordpress.org/trunk@47397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-25 12:27:11 +00:00
ianbelanger
72ef7ee315 Bundled Themes: Twenty Twenty remove unnecessary $css_dependencies variable in twentytwenty_block_editor_styles().
Removes the unnecessary `$css_dependencies` variable in `twentytwenty_block_editor_styles()`.

Props ocean90, Dency.
Fixes #49986.
Built from https://develop.svn.wordpress.org/trunk@47618


git-svn-id: http://core.svn.wordpress.org/trunk@47393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-24 14:59:07 +00:00
Sergey Biryukov
ced8fb20a1 Code Modernization: Remove error suppression from parse_url() calls.
Previously, the `@` operator was used to prevent possible warnings emitted by `parse_url()` in PHP < 5.3.3 when URL parsing failed.

Now that the minimum version of PHP required by WordPress is 5.6.20, this is no longer needed.

Props netpassprodsr, Howdy_McGee.
Fixes #49980. See #24780.
Built from https://develop.svn.wordpress.org/trunk@47617


git-svn-id: http://core.svn.wordpress.org/trunk@47392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-24 07:28:10 +00:00
Sergey Biryukov
0dc461c72e Networks and Sites: Don't display an empty Menu Settings section in network admin if there are no items.
This accounts for returning an empty array from the `mu_menu_items` filter.

Props dlh.
Fixes #49977.
Built from https://develop.svn.wordpress.org/trunk@47616


git-svn-id: http://core.svn.wordpress.org/trunk@47391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-23 18:58:05 +00:00
Sergey Biryukov
b6c70b7712 Embeds: Fix incorrect usage of get_home_url() in oEmbed tests.
Switch to `home_url()` for consistency with other tests and to avoid confusion.

Props david.binda.
Fixes #49988.
Built from https://develop.svn.wordpress.org/trunk@47615


git-svn-id: http://core.svn.wordpress.org/trunk@47390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-23 18:41:07 +00:00
ianbelanger
f97ac354c6 Bundled Themes: Twenty Twenty button styles produce inconsistent output and cannot be edited.
Fixes the issue with button styles not working when the Gutenberg plugin is activated while maintaining backwards compatibility.

Props nrqsnchz, poena, kjellr.
Fixes #49896.
Built from https://develop.svn.wordpress.org/trunk@47614


git-svn-id: http://core.svn.wordpress.org/trunk@47389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-23 15:41:09 +00:00
ianbelanger
4632322382 Bundled Themes: Twenty Twenty resized images are centered inside the editor (with no alignment set) since WordPress 5.4.
Fixes the image alignment issue by removing `margin-left: auto;` and `margin-right: auto;` from `.editor-styles-wrapper .wp-block-image.is-resized`.

Props dianeco, JavierCasares.
Fixes #49600.
Built from https://develop.svn.wordpress.org/trunk@47613


git-svn-id: http://core.svn.wordpress.org/trunk@47388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-22 19:25:08 +00:00
desrosj
a753e44d4e Bootstrap/Load: Deprecate wp_unregister_GLOBALS().
The `register_globals` directive in PHP was deprecated in version 5.3 and removed entirely in 5.4.

Now that WordPress only supports PHP 5.6.20 and newer, the `wp_unregister_GLOBALS()` function can be deprecated.

Props ayeshrajans, desrosj, SergeyBiryukov.
Fixes #49938.
Built from https://develop.svn.wordpress.org/trunk@47612


git-svn-id: http://core.svn.wordpress.org/trunk@47387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-22 15:42:09 +00:00
Sergey Biryukov
427405535f Docs: Synchronize parameter documentation for various metadata functions, update per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47611


git-svn-id: http://core.svn.wordpress.org/trunk@47386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-22 10:31:09 +00:00
Sergey Biryukov
9aa0fff80e Docs: Document the default value of $single and $prev_value parameters in various metadata functions.
Props denisco.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47610


git-svn-id: http://core.svn.wordpress.org/trunk@47385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-22 09:40:10 +00:00
ianbelanger
29abe5c726 Bundled Themes: Twenty Twenty submenu items disappear underneath the Cover block.
Fixes the submenu issue by raising the z-index value of the site-header from 1 to 2.

Props kjellr, JavierCasares.
Fixes #49322.
Built from https://develop.svn.wordpress.org/trunk@47609


git-svn-id: http://core.svn.wordpress.org/trunk@47384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-21 20:06:08 +00:00
ianbelanger
116a9b3039 Bundled Themes: Twenty Twenty missed license for images.
Fixes the image license in the readme by removing screenshot.png.

Props h71, poena.
Fixes #49316.
Built from https://develop.svn.wordpress.org/trunk@47608


git-svn-id: http://core.svn.wordpress.org/trunk@47383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-21 19:43:09 +00:00
ianbelanger
c9ea34b6b3 Bundled Themes: Twenty Twenty block editor inserter is missing the +.
Fixes the disappearing `+` in the block editor when using the latest version of the Gutenberg plugin, by adding support for the native Gutenberg editor styles and removing `color: inherit;` from Twenty Twenty's style.css.

Props nrqsnchz, .
Fixes #49610.
Built from https://develop.svn.wordpress.org/trunk@47607


git-svn-id: http://core.svn.wordpress.org/trunk@47382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-21 19:17:08 +00:00
Sergey Biryukov
6c243b4b0a Networks and Sites: Display the Site Address field on Add Site screen in left-to-right text direction.
Props ramiy.
Fixes #49949.
Built from https://develop.svn.wordpress.org/trunk@47606


git-svn-id: http://core.svn.wordpress.org/trunk@47381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-21 11:26:07 +00:00
Sergey Biryukov
b4373fafe9 Menus: Remove unused commented out code in wp-admin/nav-menus.php.
Props garrett-eclipse, audrasjb.
Fixes #49967.
Built from https://develop.svn.wordpress.org/trunk@47605


git-svn-id: http://core.svn.wordpress.org/trunk@47380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-21 09:02:08 +00:00
Sergey Biryukov
589666abc3 External Libraries: Revert [47603].
With the Docker image for PHP 7.4 updated to stable version, this should no longer be necessary.

See https://github.com/WordPress/wpdev-docker-images/pull/26

Props ocean90.
Fixes #49945.
Built from https://develop.svn.wordpress.org/trunk@47604


git-svn-id: http://core.svn.wordpress.org/trunk@47379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-20 15:41:08 +00:00
Sergey Biryukov
e9e5d8e2b2 External Libraries: Comment out magic quote functions in getID3().
For some reason, the `version_compare()` check does not work as expected on Travis.

Follow-up to [46113], [47601].

See #49945.
Built from https://develop.svn.wordpress.org/trunk@47603


git-svn-id: http://core.svn.wordpress.org/trunk@47378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-20 12:12:06 +00:00
Sergey Biryukov
1bac2cbe66 External Libraries: Backport a commit from getID3() trunk to fix a PHP 7.4+ notice.
This addresses a "Trying to access array offset on value of type bool" notice in the `getid3_mp3::MPEGaudioHeaderValid()` method.

Props schlessera.
Fixes #49945.
Built from https://develop.svn.wordpress.org/trunk@47602


git-svn-id: http://core.svn.wordpress.org/trunk@47377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-20 11:34:07 +00:00
Sergey Biryukov
694bec2071 External Libraries: Update getID3() to 1.9.19.
Changelog: https://github.com/JamesHeinrich/getID3/compare/v1.9.18...v1.9.19

Props ayeshrajans, schlessera.
See #49945.
Built from https://develop.svn.wordpress.org/trunk@47601


git-svn-id: http://core.svn.wordpress.org/trunk@47376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-20 11:13:07 +00:00
Sergey Biryukov
71dea21c5f Users: Change "Your Profile" and "My Profile" links in admin menu and toolbar to just "Profile" for consistency.
Props donmhico, bcworkz, seanchayes, mikeschroder, garrett-eclipse, akhileshsabharwal, ScottSmith, nacin, jenmylo, afercia, swissspidy, felix-edelmann, helen, melchoyce, karmatosed.
Fixes #26769.
Built from https://develop.svn.wordpress.org/trunk@47600


git-svn-id: http://core.svn.wordpress.org/trunk@47375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-20 08:39:06 +00:00
Sergey Biryukov
30a35a4806 Upload: Better align file input and buttons in plugin/theme upload form.
Follow-up to [47271].

Props seedsca, piyushmca.
Fixes #49914.
Built from https://develop.svn.wordpress.org/trunk@47599


git-svn-id: http://core.svn.wordpress.org/trunk@47374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-19 09:47:08 +00:00
Sergey Biryukov
ee387b9181 Accessibility: Widgets: Prevent checkboxes in widget control forms from overlapping on smaller screens.
Props jaz_on, milindmore22, passoniate, audrasjb, carriganvb, afercia, SergeyBiryukov.
Fixes #49228.
Built from https://develop.svn.wordpress.org/trunk@47598


git-svn-id: http://core.svn.wordpress.org/trunk@47373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-18 07:03:09 +00:00
Sergey Biryukov
61a2f62ffd Comments: Use comment instead of an empty string for the comment_type DB field value in comments table.
This is the first step to bring support for custom comment types into WordPress.

Add a scheduled upgrade routine to update the type value for existing comments, in batches of 100 at a time.

Props imath, aaroncampbell, jeremyfelt, dshanske.
Fixes #49236.
Built from https://develop.svn.wordpress.org/trunk@47597


git-svn-id: http://core.svn.wordpress.org/trunk@47372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 19:35:06 +00:00
Sergey Biryukov
012b134b23 Coding Standards: Fix WPCS indentation issue in wp-admin/nav-menus.php.
This was causing a `PEAR.Functions.FunctionCallSignature.Indent` error if PHP_CodeSniffer 3.5.3 or newer is installed locally, despite the task passing on Travis.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47596


git-svn-id: http://core.svn.wordpress.org/trunk@47371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 18:55:09 +00:00
Sergey Biryukov
af1a737b48 Coding Standards: Fix WPCS indentation issue in wp-admin/includes/class-wp-links-list-table.php.
This was causing a `Generic.WhiteSpace.ScopeIndent.IncorrectExact` error if PHP_CodeSniffer 3.4.1 or newer is installed locally, despite the task passing on Travis.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47595


git-svn-id: http://core.svn.wordpress.org/trunk@47370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 18:31:07 +00:00
ianbelanger
cf9b35eccd Bundled Themes: Twenty Twenty fix typo in readme.txt.
Fixed TikTok was misspelled as Tik Tok in the readme.txt.

Props Asif2BD.
Fixes #49932.
Built from https://develop.svn.wordpress.org/trunk@47594


git-svn-id: http://core.svn.wordpress.org/trunk@47369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 15:47:08 +00:00
Sergey Biryukov
fc7561ce11 Coding Standards: Format the markup of widget forms in a more consistent manner.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47593


git-svn-id: http://core.svn.wordpress.org/trunk@47368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 09:38:07 +00:00
Sergey Biryukov
900cfc4816 Administration: Remove the smiley from overly happy "No activity yet!" message on Dashboard.
Props francoist, karmatosed, ibdz, estelaris, nrqsnchz, Presskopp.
Fixes #48387.
Built from https://develop.svn.wordpress.org/trunk@47592


git-svn-id: http://core.svn.wordpress.org/trunk@47367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-17 07:57:10 +00:00
ianbelanger
d9c2537d87 Bundled Themes: Twenty Nineteen center and right-aligned heading accents appear broken.
Fixes the center and right aligned heading accents so that they align with the text, instead of just staying left-aligned.

Props kjellr, melchoyce.
Fixes #49699.
Built from https://develop.svn.wordpress.org/trunk@47591


git-svn-id: http://core.svn.wordpress.org/trunk@47366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 19:47:10 +00:00
ianbelanger
c03b6040fe Bundled Themes: Twenty Twenty inline images in list blocks are not positioned correctly.
Fixes the alignment of inline images in list blocks to match the way they look in the editor.

Props poena, mayankmajeji, JavierCasares.
Fixes #49793.
Built from https://develop.svn.wordpress.org/trunk@47590


git-svn-id: http://core.svn.wordpress.org/trunk@47365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 19:38:07 +00:00
ianbelanger
5116ed9ebb Bundled Themes: Twenty Twenty add TikTok to the social icon menu.
This adds TikTok as an option in the social icon menu.

Props mislavjuric, poena, audrasjb.
Fixes #49893.
Built from https://develop.svn.wordpress.org/trunk@47589


git-svn-id: http://core.svn.wordpress.org/trunk@47364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 19:01:09 +00:00
Sergey Biryukov
4fbfbf5f61 Plugins: Add HTML ID attributes to plugin action links for easier targeting in browser-based testing.
Props roytanck, shooper.
Fixes #49916.
Built from https://develop.svn.wordpress.org/trunk@47588


git-svn-id: http://core.svn.wordpress.org/trunk@47363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 17:02:08 +00:00
ianbelanger
b2f072b97e Bundled Themes: Twenty Nineteen editor style interferes with navigation menu block.
Update editor styles to prepare for changes coming to the editor in 5.5. Currently the issue is only present when using the latest version of the Gutenberg plugin.

Props kjellr, Joen.
Fixes #49613.
Built from https://develop.svn.wordpress.org/trunk@47587


git-svn-id: http://core.svn.wordpress.org/trunk@47362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 14:56:16 +00:00
ianbelanger
90f5e0576b Bundled Themes: Twenty Nineteen decrease the font size for widget titles.
Update styles to decrease the font size for widget titles.

Props kjellr, mukesh27.
Fixes #45865.
Built from https://develop.svn.wordpress.org/trunk@47586


git-svn-id: http://core.svn.wordpress.org/trunk@47361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 14:38:10 +00:00
Sergey Biryukov
92538d89ee Site Health: Detect an active PHP session as a possible reason for HTTP requests timing out.
PHP sessions created by a `session_start()` function call may interfere with REST API and loopback requests.

An active session should be closed by `session_write_close()` before making any HTTP requests.

Props matthieumota, netweblogic, Clorith, afragen, vjik, SergeyBiryukov.
Fixes #47320.
Built from https://develop.svn.wordpress.org/trunk@47585


git-svn-id: http://core.svn.wordpress.org/trunk@47360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-16 08:20:09 +00:00
Sergey Biryukov
4e13efaf96 Code Modernization: Remove conditional use of stream_get_contents() PHP function.
The function was introduced in PHP 5.0.0. Now that the minimum version of PHP required by WordPress is 5.6.20, these conditions are no longer needed.

Props jrf.
Fixes #48091.
Built from https://develop.svn.wordpress.org/trunk@47584


git-svn-id: http://core.svn.wordpress.org/trunk@47359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-15 11:54:08 +00:00
Sergey Biryukov
bb2c0198ab Comments: Clarify that "Comment Moderation" and "Comment Blocklist" options in Discussion Settings also apply to browser's user agent string for submitted comments.
Props zodiac1978.
Fixes #49902.
Built from https://develop.svn.wordpress.org/trunk@47583


git-svn-id: http://core.svn.wordpress.org/trunk@47358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-15 06:40:05 +00:00
Dominik Schilling
2d04c2e5c8 Posts, Post Types: Pass the post object to the before_delete_post, delete_post, deleted_post, and after_delete_post actions.
Props jadpm.
Fixes #30940.
Built from https://develop.svn.wordpress.org/trunk@47582


git-svn-id: http://core.svn.wordpress.org/trunk@47357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-14 19:26:07 +00:00
Sergey Biryukov
a4f6f2beae Mail: Make the check for empty post title in wp-mail.php more resilient.
This addresses a regression in [47054], which caused posts sent via email to published with an empty title.

Props whyisjake, Otto42, MarkRH, MattyRob, mukesh27, afragen, pikamander2.
Fixes #49853.
Built from https://develop.svn.wordpress.org/trunk@47580


git-svn-id: http://core.svn.wordpress.org/trunk@47355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-14 11:32:06 +00:00
Sergey Biryukov
a21b8a91c6 Docs: Add a @since note for un-deprecated category_link and tag_link filters.
Follow-up to [47576].

See #49759.
Built from https://develop.svn.wordpress.org/trunk@47578


git-svn-id: http://core.svn.wordpress.org/trunk@47353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-14 08:15:19 +00:00
whyisjake
0a714eb26f Taxonomy: Un-depracate category_link and tag_link filters.
Depracating these filter might have been an accident, so let's restore.

Props SergeyBiryukov, audrasjb, peterwilsoncc.
Fixes #49759. 

Built from https://develop.svn.wordpress.org/trunk@47576


git-svn-id: http://core.svn.wordpress.org/trunk@47351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-14 00:33:09 +00:00
Sergey Biryukov
ae59482c80 Plugins: Simplify the logic of validate_plugin_requirements(), update documentation.
This updates the function for consistency with `validate_theme_requirements()`.

Follow-up to [44978], [45546], [47573].

Fixes #43992.
Built from https://develop.svn.wordpress.org/trunk@47574


git-svn-id: http://core.svn.wordpress.org/trunk@47349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-13 15:31:05 +00:00
Sergey Biryukov
d341f20fb1 Themes: Block theme activation if it requires a higher version of PHP or WordPress.
Introduce `validate_theme_requirements()` for validating a theme's WordPress and PHP version requirements.

Follow-up to [44978] and [45546] for plugins.

Props afragen, audrasjb, SergeyBiryukov.
See #43992.
Built from https://develop.svn.wordpress.org/trunk@47573


git-svn-id: http://core.svn.wordpress.org/trunk@47348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-13 15:28:11 +00:00
Sergey Biryukov
87b3b38242 Privacy: Add an indication when the Copy action in Privacy Policy Guide is complete.
This adds a "Copied!" text near the "Copy this section to clipboard" button to provide direct feedback that the action was completed.

Props garrett-eclipse, nickylimjj, xkon, desrosj, birgire.
Fixes #44588.
Built from https://develop.svn.wordpress.org/trunk@47572


git-svn-id: http://core.svn.wordpress.org/trunk@47347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-12 14:26:11 +00:00