Commit Graph

7511 Commits

Author SHA1 Message Date
Sergey Biryukov
307725883a Themes: Prevent installation of themes that require a higher version of PHP or WordPress.
Props afragen.
Fixes #49653. See #48491.
Built from https://develop.svn.wordpress.org/trunk@47819


git-svn-id: http://core.svn.wordpress.org/trunk@47595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 16:03:09 +00:00
Sergey Biryukov
54cdfaef59 Themes: Remove extra whitespace from wp-admin/includes/ajax-actions.php and wp-admin/includes/theme.php.
Follow-up to [47816].

See #48491.
Built from https://develop.svn.wordpress.org/trunk@47818


git-svn-id: http://core.svn.wordpress.org/trunk@47594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 12:55:06 +00:00
Sergey Biryukov
b73bbd8139 Themes: Prevent activation and live preview of themes that require a higher version of PHP or WordPress.
Props afragen, jorbin, TimothyBlynJacobs, SergeyBiryukov.
See #48491.
Built from https://develop.svn.wordpress.org/trunk@47816


git-svn-id: http://core.svn.wordpress.org/trunk@47592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 12:32:10 +00:00
Sergey Biryukov
d528d7a044 Site Health: Use WP_Theme::parent() in the inactive themes test as a more reliable check that the parent theme exists.
This is also more consistent with the other instances of directly referencing `WP_Theme::parent()` properties or methods in core.

Props mukesh27, juanlopez4691, davidbaumwald, afragen, SergeyBiryukov.
Fixes #49934.
Built from https://develop.svn.wordpress.org/trunk@47815


git-svn-id: http://core.svn.wordpress.org/trunk@47591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-18 04:38:10 +00:00
Sergey Biryukov
91936df3d1 Coding Standards: Fix WPCS issues in plugin and theme upgrader classes.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47814


git-svn-id: http://core.svn.wordpress.org/trunk@47590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-17 09:39:11 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
16a8128765 Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-screen.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47802


git-svn-id: http://core.svn.wordpress.org/trunk@47578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-15 18:13:09 +00:00
Sergey Biryukov
69adb593a2 Themes: Add "Block Editor Patterns" and "Full Site Editing" to the list of WordPress theme features.
Follow-up to [meta9876].

Props dingo_d.
Fixes #50164. See #meta5212.
Built from https://develop.svn.wordpress.org/trunk@47797


git-svn-id: http://core.svn.wordpress.org/trunk@47573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 14:43:08 +00:00
Sergey Biryukov
fb0e6531ab Docs: Add @since notes for theme features added or removed in get_theme_feature_list() after its introduction in WordPress 3.1.
See #50165.
Built from https://develop.svn.wordpress.org/trunk@47794


git-svn-id: http://core.svn.wordpress.org/trunk@47570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 12:50:08 +00:00
Sergey Biryukov
04e3fd6995 Themes: Add "Block Editor Styles" and "Wide Blocks" to the list of WordPress theme features.
These were added to Theme Directory API in anticipation of being committed to core for WordPress 5.2+, which has not happened until now.

Follow-up to [meta8273].

See #46272.
Built from https://develop.svn.wordpress.org/trunk@47790


git-svn-id: http://core.svn.wordpress.org/trunk@47566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 09:18:08 +00:00
Sergey Biryukov
5e42a6c9e5 Export: Use correct escaping function for term IDs in <wp:term> nodes.
Follow-up to [34333].

Props DrLightman, marcio-zebedeu.
Fixes #50113.
Built from https://develop.svn.wordpress.org/trunk@47789


git-svn-id: http://core.svn.wordpress.org/trunk@47565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-14 07:55:12 +00:00
Sergey Biryukov
bfba3fc458 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.
Built from https://develop.svn.wordpress.org/trunk@47786


git-svn-id: http://core.svn.wordpress.org/trunk@47562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 18:40:07 +00:00
Sergey Biryukov
aa69c25d5f Coding Standards: Use strict comparison in some wp-admin files.
Props pikamander2, mukesh27, SergeyBiryukov.
Fixes #49239.
Built from https://develop.svn.wordpress.org/trunk@47785


git-svn-id: http://core.svn.wordpress.org/trunk@47561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-12 18:32:08 +00:00
Sergey Biryukov
3fc1b33d53 Docs: Use 3-digit, x.x.x style semantic versioning for inline comments in populate_options().
See #49572.
Built from https://develop.svn.wordpress.org/trunk@47782


git-svn-id: http://core.svn.wordpress.org/trunk@47558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-11 17:26:08 +00:00
Sergey Biryukov
5511b43e2c 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.
Built from https://develop.svn.wordpress.org/trunk@47777


git-svn-id: http://core.svn.wordpress.org/trunk@47553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-09 12:26:12 +00:00
Sergey Biryukov
1cde7d86f9 Coding Standards: Fix WPCS issues in wp-admin/includes/template.php.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47775


git-svn-id: http://core.svn.wordpress.org/trunk@47551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-08 16:36:18 +00:00
Dominik Schilling
7ded6c2d2a 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.
Built from https://develop.svn.wordpress.org/trunk@47771


git-svn-id: http://core.svn.wordpress.org/trunk@47547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-06 20:15:07 +00:00
Sergey Biryukov
9782eb82ad 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.
Built from https://develop.svn.wordpress.org/trunk@47762


git-svn-id: http://core.svn.wordpress.org/trunk@47538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-05 18:58:09 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
62ef2d6719 Site Health: Fix typo in Site Health Status dashboard widget.
Follow-up to [47063], [47413].

Props Clorith, dlh.
See #49562.
Built from https://develop.svn.wordpress.org/trunk@47415


git-svn-id: http://core.svn.wordpress.org/trunk@47202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-03 12:22:07 +00:00
Sergey Biryukov
a9479f31d1 Docs: Correct formatting of some DocBlocks in Plugin_Upgrader and Theme_Upgrader per the documentation standards.
See #49400.
Built from https://develop.svn.wordpress.org/trunk@47414


git-svn-id: http://core.svn.wordpress.org/trunk@47201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-03-03 11:39:08 +00:00