Commit Graph

14993 Commits

Author SHA1 Message Date
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
Sergey Biryukov
48225beffb 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.
Built from https://develop.svn.wordpress.org/trunk@47571


git-svn-id: http://core.svn.wordpress.org/trunk@47346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-11 15:09:11 +00:00
Sergey Biryukov
9f379bb930 Docs: Fix typo in WP_Upgrader::__construct() DocBlock.
Props mattrad.
Fixes #49856.
Built from https://develop.svn.wordpress.org/trunk@47570


git-svn-id: http://core.svn.wordpress.org/trunk@47345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-10 09:48:17 +00:00
whyisjake
92636d716a 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@47343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-10 03:57:08 +00:00
whyisjake
e42f45e667 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-10 02:50:07 +00:00
whyisjake
a1bf993892 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 22:34:05 +00:00
K. Adam White
951b1d89db 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 19:30:07 +00:00
Andrea Fercia
f927fdedb4 Accessibility: Fix the headings hierarchy on the Freedoms page.
Props ryelle, afercia.
Fixes #49838.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 16:09:11 +00:00
Sergey Biryukov
856e1a27b8 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.
Built from https://develop.svn.wordpress.org/trunk@47557


git-svn-id: http://core.svn.wordpress.org/trunk@47332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 15:43:10 +00:00
Mike Schroder
7097f6cef0 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.
Built from https://develop.svn.wordpress.org/trunk@47556


git-svn-id: http://core.svn.wordpress.org/trunk@47331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-09 06:08:10 +00:00
Sergey Biryukov
c18e44d6b1 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.
Built from https://develop.svn.wordpress.org/trunk@47555


git-svn-id: http://core.svn.wordpress.org/trunk@47330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-08 18:33:08 +00:00
Andrew Ozz
0e38f8ed26 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.
Built from https://develop.svn.wordpress.org/trunk@47554


git-svn-id: http://core.svn.wordpress.org/trunk@47329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-08 00:55:07 +00:00
Sergey Biryukov
195312ead2 Users: Pass the ID of the user that was logged out to the wp_logout action.
Props donmhico, figureone, TimothyBlynJacobs, rebasaurus.
Fixes #49533.
Built from https://develop.svn.wordpress.org/trunk@47553


git-svn-id: http://core.svn.wordpress.org/trunk@47328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-07 16:14:10 +00:00
Sergey Biryukov
78e62aa3e4 Coding Standards: Whitelist date_default_timezone_set() usage in wp-settings.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47552


git-svn-id: http://core.svn.wordpress.org/trunk@47327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-06 09:06:12 +00:00
Sergey Biryukov
57b7f0bc22 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.
Built from https://develop.svn.wordpress.org/trunk@47551


git-svn-id: http://core.svn.wordpress.org/trunk@47326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:21:06 +00:00
Sergey Biryukov
38676936ba 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.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Andrew Ozz
10e3e44219 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.
Built from https://develop.svn.wordpress.org/trunk@47549


git-svn-id: http://core.svn.wordpress.org/trunk@47324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-04 22:54:09 +00:00
Sergey Biryukov
9f481cdf7a 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.
Built from https://develop.svn.wordpress.org/trunk@47548


git-svn-id: http://core.svn.wordpress.org/trunk@47323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-04 00:27:06 +00:00
K. Adam White
51619c00a4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-03 19:40:08 +00:00
Sergey Biryukov
441001f29f Docs: Add documentation for the $parent parameter of get_admin_page_parent().
Props subrataemfluence.
Fixes #45849.
Built from https://develop.svn.wordpress.org/trunk@47546


git-svn-id: http://core.svn.wordpress.org/trunk@47321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-03 17:23:11 +00:00
Sergey Biryukov
ca8463f4f4 Docs: Use third-person singular verbs for function descriptions in wp-includes/category-template.php, per the documentation standards.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47545


git-svn-id: http://core.svn.wordpress.org/trunk@47320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-02 15:51:08 +00:00
Sergey Biryukov
4ef14fd7af Build/Test Tools: Remove a starting empty line from svn:ignore property on wp-includes.
Follow-up to [47352].

See #48154.
Built from https://develop.svn.wordpress.org/trunk@47544


git-svn-id: http://core.svn.wordpress.org/trunk@47319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-01 13:45:09 +00:00
desrosj
64b3c852bf Bundled Themes: Bump version numbers and update changelogs in default themes for WordPress 5.4.
Props ianbelanger, desrosj, SergeyBiryukov.
Fixes #49743.
Built from https://develop.svn.wordpress.org/trunk@47539


git-svn-id: http://core.svn.wordpress.org/trunk@47314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-31 19:11:07 +00:00
Sergey Biryukov
402193798e Twenty Nineteen: Update style-editor.css after [47327].
Props ianbelanger.
See #48526.
Built from https://develop.svn.wordpress.org/trunk@47537


git-svn-id: http://core.svn.wordpress.org/trunk@47312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-31 18:57:11 +00:00
Sergey Biryukov
116d909f58 Twenty Nineteen: Update style-rtl.css after [47339].
Props ianbelanger.
See #49410.
Built from https://develop.svn.wordpress.org/trunk@47536


git-svn-id: http://core.svn.wordpress.org/trunk@47311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-31 18:55:10 +00:00
Sergey Biryukov
042bf6dbd9 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.
Built from https://develop.svn.wordpress.org/trunk@47535


git-svn-id: http://core.svn.wordpress.org/trunk@47310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-31 02:52:07 +00:00
ianbelanger
2e7235f7ca 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.
Built from https://develop.svn.wordpress.org/trunk@47534


git-svn-id: http://core.svn.wordpress.org/trunk@47309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-30 18:29:08 +00:00
Sergey Biryukov
e38a57db0c Help/About: Use CDN URLs for 5.4 About page header images.
See #49295.
Built from https://develop.svn.wordpress.org/trunk@47532


git-svn-id: http://core.svn.wordpress.org/trunk@47307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-30 17:49:07 +00:00
ianbelanger
340216b5eb 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.
Built from https://develop.svn.wordpress.org/trunk@47531


git-svn-id: http://core.svn.wordpress.org/trunk@47306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-30 15:20:07 +00:00
Sergey Biryukov
49d7b8c51f Filesystem API: Correct punctuation in request_filesystem_credentials() error message.
Props mayankmajeji, kharisblank.
Fixes #49724.
Built from https://develop.svn.wordpress.org/trunk@47530


git-svn-id: http://core.svn.wordpress.org/trunk@47305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-30 01:32:07 +00:00
Sergey Biryukov
c83710ccee 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.
Built from https://develop.svn.wordpress.org/trunk@47529


git-svn-id: http://core.svn.wordpress.org/trunk@47304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-30 01:25:11 +00:00
Sergey Biryukov
764a1761aa 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.
Built from https://develop.svn.wordpress.org/trunk@47528


git-svn-id: http://core.svn.wordpress.org/trunk@47303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-29 03:46:06 +00:00
Sergey Biryukov
d552e475fd Site Health: Add pretty links support information to debug data.
Props valentinbora, afragen.
Fixes #49422.
Built from https://develop.svn.wordpress.org/trunk@47527


git-svn-id: http://core.svn.wordpress.org/trunk@47302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-28 21:20:06 +00:00
John Blackbourn
8f1eddef11 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
Built from https://develop.svn.wordpress.org/trunk@47526


git-svn-id: http://core.svn.wordpress.org/trunk@47301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-28 20:44:09 +00:00
Sergey Biryukov
ce2dea9ef6 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.
Built from https://develop.svn.wordpress.org/trunk@47521


git-svn-id: http://core.svn.wordpress.org/trunk@47296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-27 23:41:06 +00:00
Sergey Biryukov
a546a9c35c Coding Standards: Remove some extra tabs in wp-admin/user-new.php.
Follow-up to [47516], [47519].

See #38665.
Built from https://develop.svn.wordpress.org/trunk@47520


git-svn-id: http://core.svn.wordpress.org/trunk@47295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-27 22:30:09 +00:00
Sergey Biryukov
ee1bf5a911 Coding Standards: Fix WPCS issues in [47516].
See #38665.
Built from https://develop.svn.wordpress.org/trunk@47519


git-svn-id: http://core.svn.wordpress.org/trunk@47294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-27 22:25:08 +00:00
jorgefilipecosta
0a2dad400d 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.
Built from https://develop.svn.wordpress.org/trunk@47517


git-svn-id: http://core.svn.wordpress.org/trunk@47292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-27 22:08:24 +00:00