Commit Graph

18186 Commits

Author SHA1 Message Date
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
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
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
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
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 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 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
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
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
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
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 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
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
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
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
John Blackbourn 41ae74f7b4 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
Built from https://develop.svn.wordpress.org/trunk@47516


git-svn-id: http://core.svn.wordpress.org/trunk@47291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-27 21:58:05 +00:00
John Blackbourn 7dbad241cb Themes: Always list broken themes even if the user cannot take a corresponding action within the admin area.
This prevents broken themes being hidden when the `DISALLOW_FILE_MODS` constant is in use.

Props rebasaurus

Fixes #49268
Built from https://develop.svn.wordpress.org/trunk@47510


git-svn-id: http://core.svn.wordpress.org/trunk@47285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-26 17:50:15 +00:00
Sergey Biryukov 2b030a1647 Docs: Add documentation for `WP_Comments_List_Table::floated_admin_avatar()`.
Props akbarhusen, ayeshrajans, Soean, ajayghaghretiya1, netweb, SergeyBiryukov.
Fixes #41491.
Built from https://develop.svn.wordpress.org/trunk@47507


git-svn-id: http://core.svn.wordpress.org/trunk@47282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-25 14:43:11 +00:00
jorgefilipecosta 26cc999d64 Help/About: Fix a typo on the about page and fix a link.
The text "on your" appeared two times. This commit fixes the issue and removes the duplication. It also updates the field guide permalink.

Props garrett-eclipse, ixkaito, karmatosed, SergeyBiryukov.
Built from https://develop.svn.wordpress.org/trunk@47500


git-svn-id: http://core.svn.wordpress.org/trunk@47275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-24 15:03:08 +00:00
Sergey Biryukov 5ce4cc4930 Administration: Add `/` character to `<img>` tag in `WP_Plugin_Install_List_Table::display_rows()`.
While this has no effect on void elements in HTML5, it fixes a minor inconsistency with the rest of core.

Props adnan.limdi, Soean.
Fixes #41904.
Built from https://develop.svn.wordpress.org/trunk@47493


git-svn-id: http://core.svn.wordpress.org/trunk@47268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-23 03:03:07 +00:00
Sergey Biryukov 248a115c2b Upgrade/Install: Return a more appropriate HTTP response status code (`409 Conflict`) if the `wp-config.php` file already exists.
Props linyows, ocean90.
Fixes #42466.
Built from https://develop.svn.wordpress.org/trunk@47478


git-svn-id: http://core.svn.wordpress.org/trunk@47267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-21 15:44:15 +00:00
Sergey Biryukov 77e32cff47 Coding Standards: Fix WPCS issue in [47475].
See #49295.
Built from https://develop.svn.wordpress.org/trunk@47476


git-svn-id: http://core.svn.wordpress.org/trunk@47265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-20 17:33:07 +00:00
Sergey Biryukov 8f31a95982 Help/About: Add design for 5.4 About page.
Props melchoyce, marybaum, marktimemedia, elmastudio, ryelle, karmatosed, audrasjb, afercia, francina, sabernhardt.
See #49295.
Built from https://develop.svn.wordpress.org/trunk@47475


git-svn-id: http://core.svn.wordpress.org/trunk@47264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-20 17:13:10 +00:00
Sergey Biryukov 2fd80efe13 Administration: Escape admin title on output after the `admin_title` filter runs, not before.
Props lalitpendhare, adnan.limdi, subrataemfluence, andraganescu.
Fixes #41921.
Built from https://develop.svn.wordpress.org/trunk@47474


git-svn-id: http://core.svn.wordpress.org/trunk@47261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-20 02:20:08 +00:00
Sergey Biryukov ed01dbb89b Privacy: Correct bottom padding for table of contents on Privacy Policy Guide on smaller screens.
Props jagirbahesh, birgire, garrett-eclipse.
Fixes #49570.
Built from https://develop.svn.wordpress.org/trunk@47473


git-svn-id: http://core.svn.wordpress.org/trunk@47260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-19 20:45:10 +00:00
Sergey Biryukov c6c8862b87 Post Formats: Pass post type to the `disable_formats_dropdown` filter in `WP_Posts_List_Table::formats_dropdown()`.
Props MatheusFD, birgire.
Fixes #47959.
Built from https://develop.svn.wordpress.org/trunk@47472


git-svn-id: http://core.svn.wordpress.org/trunk@47259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-18 19:13:10 +00:00
John Blackbourn 7004afe4f4 Docs: Various docblock corrections and improvements.
See #49572
Built from https://develop.svn.wordpress.org/trunk@47461


git-svn-id: http://core.svn.wordpress.org/trunk@47248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-16 18:40:07 +00:00
Sergey Biryukov 73ef224e64 Administration: When editing a plugin or theme file, close any active PHP session.
This prevents HTTP requests from timing out when attempting to connect back to the site.

Props bruandet, vjik, donmhico, SergeyBiryukov.
Fixes #43358.
Built from https://develop.svn.wordpress.org/trunk@47457


git-svn-id: http://core.svn.wordpress.org/trunk@47244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-15 19:45:07 +00:00
Sergey Biryukov cf75b95197 Site Health: Run the first scheduled site health check a day after the initial site setup.
This reduces the chance of displaying incorrect results due to running the check too early in first time setup scenarios.

Props Clorith, garrett-eclipse, roytanck, joostdevalk.
Fixes #49577.
Built from https://develop.svn.wordpress.org/trunk@47456


git-svn-id: http://core.svn.wordpress.org/trunk@47243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-14 16:36:07 +00:00
Sergey Biryukov 70def7fc4a Help/About: Use consistent vertical whitespace between sections on Freedoms page.
Props chetan200891.
Fixes #49619.
Built from https://develop.svn.wordpress.org/trunk@47443


git-svn-id: http://core.svn.wordpress.org/trunk@47230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-10 20:39:16 +00:00
Sergey Biryukov d8a0b6ef2c Help/About: Update and correct some strings for 5.4 About page.
Props garrett-eclipse, Ipstenu, ocean90, tobifjellner, la-geek.
Reviewed by ocean90, SergeyBiryukov.
See #49295.
Built from https://develop.svn.wordpress.org/trunk@47436


git-svn-id: http://core.svn.wordpress.org/trunk@47223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-09 00:11:04 +00:00
Sergey Biryukov 9448f5c95e Themes: Prevent tags in Theme Details modal from being partially hidden behind action buttons on smaller screens.
Props sagarjadhav, valentinbora.
Fixes #31783.
Built from https://develop.svn.wordpress.org/trunk@47435


git-svn-id: http://core.svn.wordpress.org/trunk@47222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-08 01:52:05 +00:00
Sergey Biryukov cb5308b0ab Administration: Add missing description for "Page title" element of the admin menu array.
Props ajoah, valentinbora, kaitlin414.
Fixes #42911.
Built from https://develop.svn.wordpress.org/trunk@47434


git-svn-id: http://core.svn.wordpress.org/trunk@47221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-08 00:18:05 +00:00
Sergey Biryukov 9fbd842eb2 Customize: Ensure color picker's Clear button is aligned properly.
Props Cybr.
Fixes #49543.
Built from https://develop.svn.wordpress.org/trunk@47433


git-svn-id: http://core.svn.wordpress.org/trunk@47220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-07 01:13:06 +00:00
Sergey Biryukov 293bc81bf6 Help/About: Add strings for 5.4 About page.
Props elmastudio, chanthaboune, francina, marybaum, audrasjb.
See #49295.
Built from https://develop.svn.wordpress.org/trunk@47422


git-svn-id: http://core.svn.wordpress.org/trunk@47209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-03 21:22:07 +00:00
Sergey Biryukov 18e3aa433c Privacy: Prevent unexpected scrolling when clicking the "Copy this section to clipboard" button on Privacy Policy Guide screen.
Props garrett-eclipse, birgire, davidbaumwald, pbiron.
Fixes #49540.
Built from https://develop.svn.wordpress.org/trunk@47420


git-svn-id: http://core.svn.wordpress.org/trunk@47207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-03 17:51:05 +00:00
Sergey Biryukov c30fd0b54d Media: Improve the appearance of image editor on small and medium screens.
This prevents the main area of Edit Media screen from being pushed down too far.

Props sabernhardt, afercia, fierevere, sathyapulse, mikeschroder, johnbillion.
Fixes #48780. See #47136.
Built from https://develop.svn.wordpress.org/trunk@47418


git-svn-id: http://core.svn.wordpress.org/trunk@47205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-03 17:21:05 +00:00