Commit Graph

41611 Commits

Author SHA1 Message Date
Sergey Biryukov
d0d9c1465c Export: Use correct escaping function for term IDs in <wp:term> nodes.
Follow-up to [34333].

Props DrLightman, marcio-zebedeu.
Fixes #50113.

git-svn-id: https://develop.svn.wordpress.org/trunk@47789 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-14 07:53:57 +00:00
Sergey Biryukov
6e00150660 Coding Standards: Use strict comparison in wp-admin/upgrade.php.
Props mukesh27.
Fixes #50155.

git-svn-id: https://develop.svn.wordpress.org/trunk@47788 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-13 10:08:58 +00:00
Sergey Biryukov
6e8ab8448a Coding Standards: Correct db_version check in wp-admin/admin.php.
Follow-up to [47785].

See #49239.

git-svn-id: https://develop.svn.wordpress.org/trunk@47787 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-12 20:57:48 +00:00
Sergey Biryukov
b42fe1e654 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47786 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-12 18:38:02 +00:00
Sergey Biryukov
94d96bde71 Coding Standards: Use strict comparison in some wp-admin files.
Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.

git-svn-id: https://develop.svn.wordpress.org/trunk@47785 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-12 18:30:03 +00:00
Ian Belanger
afaab88e8e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47784 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-12 16:43:42 +00:00
Sergey Biryukov
eae306d5bf 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47783 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-11 20:32:06 +00:00
Sergey Biryukov
892e013bbf Docs: Use 3-digit, x.x.x style semantic versioning for inline comments in populate_options().
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47782 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-11 17:24:24 +00:00
Sergey Biryukov
06dbf33561 Tests: Give canonical test fixtures for paginated content more descriptive names.
Follow-up to [47727].

See #28081, #40773, #45337.

git-svn-id: https://develop.svn.wordpress.org/trunk@47781 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-10 20:29:18 +00:00
Sergey Biryukov
c395d6fcd9 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47780 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-10 12:07:49 +00:00
Peter Wilson
c860753778 Tests: Add unit tests for _cleanup_header_comment().
Props pbearne.
Fixes #38101. See #8497.


git-svn-id: https://develop.svn.wordpress.org/trunk@47779 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-10 05:21:48 +00:00
Sergey Biryukov
8e3b8c73d5 Coding Standards: Fix WPCS issues in wp-includes/update.php.
Props mukesh27.
Fixes #50130.

git-svn-id: https://develop.svn.wordpress.org/trunk@47778 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-09 12:50:43 +00:00
Sergey Biryukov
efb6e805da 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47777 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-09 12:24:31 +00:00
Ian Belanger
e6547ba815 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47776 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-08 19:34:14 +00:00
Sergey Biryukov
24b71985b8 Coding Standards: Fix WPCS issues in wp-admin/includes/template.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47775 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-08 16:34:50 +00:00
Sergey Biryukov
0d7244226f Coding Standards: Use strict comparison in wp-includes/widgets/class-wp-widget-rss.php.
Props mukesh27.
Fixes #50125.

git-svn-id: https://develop.svn.wordpress.org/trunk@47774 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-08 08:34:21 +00:00
Sergey Biryukov
09bcb48557 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47772 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-07 21:40:19 +00:00
Dominik Schilling
3d31284c5e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47771 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 20:13:38 +00:00
Sergey Biryukov
26439dd788 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47770 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 19:33:45 +00:00
Sergey Biryukov
bb526f5087 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47769 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 16:25:09 +00:00
Sergey Biryukov
97a336a03c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47768 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 14:36:47 +00:00
Jake Spurlock
8e621da4ff 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@47766 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 23:54:26 +00:00
Jake Spurlock
21b05b3677 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@47765 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 23:37:45 +00:00
Jake Spurlock
0a8365be5a Code standards: Drop a newline in the customizer to comply with WordPress Coding Standards
Extends [47763] and #46829.


git-svn-id: https://develop.svn.wordpress.org/trunk@47764 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 21:58:12 +00:00
Jake Spurlock
8338f44306 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47763 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 21:15:49 +00:00
Sergey Biryukov
b19c56b736 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47762 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-05 18:56:44 +00:00
Sergey Biryukov
0206900cff 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47761 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 10:47:05 +00:00
Sergey Biryukov
de14ea86bf 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47760 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 10:40:06 +00:00
Sergey Biryukov
54c8470bd6 Coding Standards: Fix WPCS issues in wp-includes/canonical.php.
Reformat long conditions and dense code blocks for better readability.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47759 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 09:03:11 +00:00
Timothy Jacobs
8153d15f09 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47758 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 02:44:44 +00:00
Timothy Jacobs
9a903f7e73 Tests: Update wp-api-generated.js.
[47755] and [47756] caused a schema change, so the wp-api-generated.js file needs to be updated.


git-svn-id: https://develop.svn.wordpress.org/trunk@47757 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-04 00:26:52 +00:00
Timothy Jacobs
5460e0df1e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47756 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 22:56:01 +00:00
Timothy Jacobs
6ab90a209d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47755 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 22:40:53 +00:00
John Blackbourn
7d24075a26 Docs: Misc docblock corrections and improvements.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@47754 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 19:36:06 +00:00
Timothy Jacobs
ef05acdfaa 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47753 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 19:18:40 +00:00
John Blackbourn
d8371d2134 Build/Test Tools: Further enhancements to the local development environment readme.
Props desrosj, donmhico

See #50058

git-svn-id: https://develop.svn.wordpress.org/trunk@47752 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 14:41:03 +00:00
Andrea Fercia
6e181e8823 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47751 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 14:19:51 +00:00
Andrea Fercia
8f1d4525c2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@47750 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 13:34:26 +00:00
Sergey Biryukov
5dbed96333 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47749 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-03 11:43:14 +00:00
John Blackbourn
84772cc608 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

git-svn-id: https://develop.svn.wordpress.org/trunk@47748 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 22:55:17 +00:00
John Blackbourn
4889e7a8d2 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

git-svn-id: https://develop.svn.wordpress.org/trunk@47747 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 22:34:50 +00:00
John Blackbourn
1510f69d69 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

git-svn-id: https://develop.svn.wordpress.org/trunk@47746 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 21:44:48 +00:00
John Blackbourn
8eab1eb9a9 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

git-svn-id: https://develop.svn.wordpress.org/trunk@47745 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 20:59:31 +00:00
John Blackbourn
d250cbcfee Build/Test Tools: Add information regarding the default credentials for the local development environment to the project readme.
Props bookdude13

Fixes #49273

git-svn-id: https://develop.svn.wordpress.org/trunk@47744 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 20:17:38 +00:00
John Blackbourn
b9f6cf083a Build/Test Tools: Add more comprehensive instructions to the readme for the local development environment.
See #50058

git-svn-id: https://develop.svn.wordpress.org/trunk@47743 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 19:14:24 +00:00
John Blackbourn
578956abf6 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

git-svn-id: https://develop.svn.wordpress.org/trunk@47742 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 18:15:30 +00:00
John Blackbourn
09e61958b3 Build/Test Tools: Remove unnecessary formatting before linting on Travis CI.
Fixes #49722

git-svn-id: https://develop.svn.wordpress.org/trunk@47741 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 17:44:11 +00:00
John Blackbourn
c570d4409f Docs: Update inline documentation for the wpdb class.
Props theMikeD

Fixes #49477

git-svn-id: https://develop.svn.wordpress.org/trunk@47740 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 17:23:28 +00:00
Dominik Schilling
c09e2d21a7 Users: Don't reset user language preference on user update.
Props johnbillion.
Fixes #38665.

git-svn-id: https://develop.svn.wordpress.org/trunk@47739 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 16:27:34 +00:00
Sergey Biryukov
b7a8094d32 Query: Simplify the logic in WP::handle_404() to allow for easier modifications.
See #45337.

git-svn-id: https://develop.svn.wordpress.org/trunk@47738 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-02 08:46:39 +00:00