Commit Graph

41551 Commits

Author SHA1 Message Date
Ian Belanger
7b6e7babe4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47586 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-16 14:36:20 +00:00
Sergey Biryukov
cb29ca927c 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.

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

git-svn-id: https://develop.svn.wordpress.org/trunk@47584 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-15 11:52:38 +00:00
Sergey Biryukov
72f54ba785 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47583 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-15 06:38:03 +00:00
Dominik Schilling
165bcc506d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47582 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 19:24:49 +00:00
Sergey Biryukov
7ef97cfb10 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47580 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 11:30:35 +00:00
Sergey Biryukov
4d601e57b6 Docs: Add a @since note for un-deprecated category_link and tag_link filters.
Follow-up to [47576].

See #49759.

git-svn-id: https://develop.svn.wordpress.org/trunk@47578 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 08:13:18 +00:00
Jake Spurlock
7d4a746f27 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. 


git-svn-id: https://develop.svn.wordpress.org/trunk@47576 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-14 00:31:18 +00:00
Sergey Biryukov
d419b1b6d6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47574 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-13 15:29:17 +00:00
Sergey Biryukov
286d672389 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47573 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-13 15:26:37 +00:00
Sergey Biryukov
d5df031e6f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47572 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-12 14:24:38 +00:00
Sergey Biryukov
63ac227863 Rewrite Rules: Use double quotes instead of backticks in .htaccess instructions about # BEGIN/END markers.
Previously, the backticks resulted in extra markup being added when posted on support forums.

Props mayankmajeji, knutsp.
Fixes #49868.

git-svn-id: https://develop.svn.wordpress.org/trunk@47571 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-11 15:07:27 +00:00
Sergey Biryukov
eca3d5a2f3 Docs: Fix typo in WP_Upgrader::__construct() DocBlock.
Props mattrad.
Fixes #49856.

git-svn-id: https://develop.svn.wordpress.org/trunk@47570 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 09:46:21 +00:00
Jake Spurlock
3a2e24bab4 Site Health instantiation prevents use of some hooks by plugins.
As the WP_Site_Health class is instantiated prior to plugins being required and the `plugins_loaded` hook being fired, it prevents plugins from using the following hooks in the functions called by `maybe_create_scheduled_event()`.

Fixes #49824.
Props peterwilsoncc, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47568 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 03:55:08 +00:00
Jake Spurlock
8e016efcad Customize: Give the WordPress logo a white background for dark mode browsers.
The favicon is transparent, which would normally look fine, but on a dark background it washes out.

Props DhrRob, audrasjb.
Fixes 49798.


git-svn-id: https://develop.svn.wordpress.org/trunk@47564 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-10 02:48:51 +00:00
Jake Spurlock
6d586d4287 Privacy: Support additional elements (table, ol, ul) in privacy policy guide new styling
The privacy policy guide supports a lot of HTML, include rules for lists, and ensure proper styling for the rest.

Props garrett-eclipse. 
Fixes #49772.


git-svn-id: https://develop.svn.wordpress.org/trunk@47560 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 22:32:43 +00:00
K. Adam White
3abe80eea1 REST API: Handle parameter types consistently within set_param().
A request has multiple parameter types, including "query" and "json." Updating a parameter could previously modify a key's value in the wrong parameter type, leading to confusing and self-contradictory response objects.

Props mnelson4, TimothyBlynJacobs, vagios, jnylen0.
Fixes #40838.


git-svn-id: https://develop.svn.wordpress.org/trunk@47559 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 19:28:58 +00:00
Andrea Fercia
e4b83cf509 Accessibility: Fix the headings hierarchy on the Freedoms page.
Props ryelle, afercia.
Fixes #49838.


git-svn-id: https://develop.svn.wordpress.org/trunk@47558 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 16:07:19 +00:00
Sergey Biryukov
d8c502e966 Coding Standards: Use strict type check for in_array() and array_search().
This addresses all the remaining `WordPress.PHP.StrictInArray.MissingTrueStrict` issues in core.

Includes minor code layout fixes for better readability.

Follow-up to [47550].

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47557 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 15:41:04 +00:00
Mike Schroder
3df79c3380 Tests: Pass API key to distributed test reporter.
Pass environment variable for test reporter API key to
`docker-compose` so that it can authenticate and submit results
to the hosting distributed tests.

Props SergeyBiryukov, mikeschroder.
Fixes #49846.

git-svn-id: https://develop.svn.wordpress.org/trunk@47556 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-09 06:06:02 +00:00
Sergey Biryukov
adda585fb8 Privacy: Make the deprecated wp_get_user_request_data() function available on front end.
Previously, it was accidentally made available only in admin context.

Follow-up to [44606], [47245].

Props garrett-eclipse, johnjamesjacoby, r-a-y, Dono12.
Fixes #49802.

git-svn-id: https://develop.svn.wordpress.org/trunk@47555 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-08 18:31:21 +00:00
Andrew Ozz
7b5d78f82f Media: Enable lazy-loading of images by automatically adding the new loading="lazy" attribute to image tags on the front-end.
- Introduces `wp_lazy_loading_enabled()`, `wp_filter_content_tags()`, `wp_img_tag_add_loading_attr()`, and `wp_img_tag_add_srcset_and_sizes_attr()` functions.
- Introduces `wp_lazy_loading_enabled`, `wp_img_tag_add_loading_attr`, and `wp_img_tag_add_srcset_and_sizes_attr` filters.

Props flixos90, addyosmani, mor10, swissspidy, pierlo, westonruter, spacedmonkey, mikeschroder, jonoaldersonwp, peterwilsoncc, narwen, jeffpaul, OptimizingMatters, futtta, mukeshpanchal27, azaozz.

Fixes #44427.

git-svn-id: https://develop.svn.wordpress.org/trunk@47554 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-08 00:53:18 +00:00
Sergey Biryukov
4b79e69d89 Users: Pass the ID of the user that was logged out to the wp_logout action.
Props donmhico, figureone, TimothyBlynJacobs, rebasaurus.
Fixes #49533.

git-svn-id: https://develop.svn.wordpress.org/trunk@47553 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-07 16:12:22 +00:00
Sergey Biryukov
b195a159e1 Coding Standards: Whitelist date_default_timezone_set() usage in wp-settings.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47552 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-06 09:04:55 +00:00
SergeyBiryukov
6b28c4d100 Coding Standards: Switch WordPress.PHP.YodaConditions.NotYoda back to error level.
This was marked as a warning in [45665] until all the issues associated with the sniff are addressed, so that linting on Travis could run across the entire codebase.

With all the instances now addressed, this override is no longer needed.

Follow-up to [47054], [47218], [47219].

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47551 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-05 03:19:02 +00:00
Sergey Biryukov
0b4e2c4604 Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47550 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-05 03:00:44 +00:00
Andrew Ozz
2e589142eb Media: Remove display: none; from the (visually hidden) <input type="file"> button used in Plupload to select files for uploading. Fixes selecting files in Edge <= 44 and iOS Safari.
Props treecutter, johnbillion, pbiron, isabel_brison, Ipstenu, azaozz.
Fixes #49753 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@47549 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-04 22:52:30 +00:00
Sergey Biryukov
d8f5ce0ae5 Tests: Remove test_post_thumbnails_types_true().
The test incorrectly describes the behavior of `current_theme_supports( 'post-thumbnails' )` and only passes by accident.

Follow-up to [30148].

Fixes #49801.

git-svn-id: https://develop.svn.wordpress.org/trunk@47548 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-04 00:25:36 +00:00
K. Adam White
b5117e1ad5 REST API: Fix revisions controller get_item permission check.
r45812 incorrectly introduced a delete_post permissions check into the get_item method, breaking some plugins which requested revisions when generating previews.

Props sorenbronsted, yohannp, TimothyBlynJacobs.
Fixes #49645.


git-svn-id: https://develop.svn.wordpress.org/trunk@47547 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-03 19:38:15 +00:00
Sergey Biryukov
178e16e33a Docs: Add documentation for the $parent parameter of get_admin_page_parent().
Props subrataemfluence.
Fixes #45849.

git-svn-id: https://develop.svn.wordpress.org/trunk@47546 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-03 17:21:25 +00:00
Sergey Biryukov
dfa959bbd5 Docs: Use third-person singular verbs for function descriptions in wp-includes/category-template.php, per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47545 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-02 15:49:53 +00:00
Sergey Biryukov
561842636f Build/Test Tools: Remove a starting empty line from svn:ignore property on wp-includes.
Follow-up to [47352].

See #48154.

git-svn-id: https://develop.svn.wordpress.org/trunk@47544 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-01 13:43:51 +00:00
Jonathan Desrosiers
fab1752b16 Bundled Themes: Bump version numbers and update changelogs in default themes for WordPress 5.4.
Props ianbelanger, desrosj, SergeyBiryukov.
Fixes #49743.

git-svn-id: https://develop.svn.wordpress.org/trunk@47539 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-31 19:09:45 +00:00
Sergey Biryukov
212778ab02 Twenty Nineteen: Update style-editor.css after [47327].
Props ianbelanger.
See #48526.

git-svn-id: https://develop.svn.wordpress.org/trunk@47537 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-31 18:55:13 +00:00
Sergey Biryukov
d985b9d903 Twenty Nineteen: Update style-rtl.css after [47339].
Props ianbelanger.
See #49410.

git-svn-id: https://develop.svn.wordpress.org/trunk@47536 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-31 18:53:24 +00:00
Sergey Biryukov
ceba6b656f Administration: Make the height of dashboard widget headings consistent with that of post meta boxes on smaller screens.
This also ensures that the toggle arrow for dashboard widgets is properly aligned.

Props chetan200891.
Fixes #49727.

git-svn-id: https://develop.svn.wordpress.org/trunk@47535 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-31 02:50:52 +00:00
Ian Belanger
628aec5fe2 Bundled Themes: Twenty Twenty Button block forces All Capital letters - revert [47531].
Reverts [47531] to add `text-transform: uppercase;` back to button blocks.

Props joyously.
Fixes #49710.

git-svn-id: https://develop.svn.wordpress.org/trunk@47534 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-30 18:27:08 +00:00
Sergey Biryukov
4634a4ce3f Help/About: Use CDN URLs for 5.4 About page header images.
See #49295.

git-svn-id: https://develop.svn.wordpress.org/trunk@47532 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-30 17:47:34 +00:00
Ian Belanger
ef988903b0 Bundled Themes: Twenty Twenty Button block forces All Capital letters.
Removes `text-transform: uppercase;` from button blocks in order to give the user the option to have a button without All Capital letters.

Props mukesh27.
Fixes #49710.

git-svn-id: https://develop.svn.wordpress.org/trunk@47531 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-30 15:18:40 +00:00
Sergey Biryukov
936b65887c Filesystem API: Correct punctuation in request_filesystem_credentials() error message.
Props mayankmajeji, kharisblank.
Fixes #49724.

git-svn-id: https://develop.svn.wordpress.org/trunk@47530 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-30 01:30:42 +00:00
Sergey Biryukov
2b52250f1a Site Health: Remove paragraph tag from the actions container in issue template.
Most of the tests pass content that is already wrapped in a paragraph or list tags, thus producing nested paragraphs or invalid markup.

Additionally, don't output an empty `<div>` tag if the test does not provide any actions.

Props maxpertici, afercia.
Fixes #48948.

git-svn-id: https://develop.svn.wordpress.org/trunk@47529 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-30 01:23:47 +00:00
Sergey Biryukov
a73eca1021 Site Health: Correct markup in ::get_test_php_extensions() and ::get_test_background_updates() description.
These tests output an unordered list, which doesn't need to be wrapped in a paragraph tag.

Additionally, pass an empty string as an `actions` parameter in `::get_test_php_default_timezone()`, for consistency with other tests.

Props afercia.
See #48948.

git-svn-id: https://develop.svn.wordpress.org/trunk@47528 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-29 03:44:36 +00:00
Sergey Biryukov
96a35dad0b Site Health: Add pretty links support information to debug data.
Props valentinbora, afragen.
Fixes #49422.

git-svn-id: https://develop.svn.wordpress.org/trunk@47527 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-28 21:18:19 +00:00
John Blackbourn
fe18be23fd Comments: Ensure all elements in the array returned by get_comment_count() are integers.
Previously elements would be a mixture of strings and integers depending on their numeric value.

Props progremzion, m.usama.masood

Fixes #48093

git-svn-id: https://develop.svn.wordpress.org/trunk@47526 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-28 20:42:31 +00:00
Sergey Biryukov
4b42334001 Help/About: Improve accessibility of the 5.4 About page:
* Remove vertical text and unnecessary italics.
* Update H1 headings on About, Credits, Freedoms, Privacy pages to be unique to each page.

Props sabernhardt, ryelle, melchoyce, karmatosed, audrasjb, afercia, davidbaumwald, SergeyBiryukov.
See #49295.

git-svn-id: https://develop.svn.wordpress.org/trunk@47521 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 23:39:37 +00:00
Sergey Biryukov
815f0341da Coding Standards: Remove some extra tabs in wp-admin/user-new.php.
Follow-up to [47516], [47519].

See #38665.

git-svn-id: https://develop.svn.wordpress.org/trunk@47520 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 22:29:00 +00:00
Sergey Biryukov
c71cefe4c9 Coding Standards: Fix WPCS issues in [47516].
See #38665.

git-svn-id: https://develop.svn.wordpress.org/trunk@47519 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 22:23:12 +00:00
Jorge Costa
dd1f14ac2f Block Editor: Update WordPress Packages WordPress 5.4 RC 5 Take 2.
The following package versions were changed:
@wordpress/edit-post: 3.13.8 -> 3.13.9
Includes PR https://github.com/WordPress/gutenberg/pull/21220

Props aduth, mapk, ItsJonQ.
Fixes: #49717.

git-svn-id: https://develop.svn.wordpress.org/trunk@47517 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 22:06:42 +00:00
John Blackbourn
9c18a5c6e9 Users: Add a user language preference option to the "Add New User" form.
This uses the same language selection control as the user editing screen and allows new users to be invited to a site in their own language.

Props barryceelen, johnbillion

Fixes #38665

git-svn-id: https://develop.svn.wordpress.org/trunk@47516 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 21:56:24 +00:00
Sergey Biryukov
33056ff892 Site Health: Remove esc_url() used on "Debugging in WordPress" article URL in WP_Fatal_Error_Handler::display_default_error_template().
The function may not be available in some contexts, for example if a fatal error happens in `advanced-cache.php` drop-in.

Props rob006.
Fixes #49709.

git-svn-id: https://develop.svn.wordpress.org/trunk@47515 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-27 18:20:55 +00:00