Commit Graph

41465 Commits

Author SHA1 Message Date
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
Dominik Schilling
dbc054bec2 Bump Akismet external to 4.1.5.
git-svn-id: http://core.svn.wordpress.org/trunk@47428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-29 16:35:23 +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