Commit Graph

7674 Commits

Author SHA1 Message Date
Sergey Biryukov
93bf0c3b83 Site Health: Add the test for plugin and theme auto-updates to WP_Site_Health::get_tests().
This ensures that the test actually runs.

Follow-up to [48548].

See #50662.
Built from https://develop.svn.wordpress.org/trunk@48558


git-svn-id: http://core.svn.wordpress.org/trunk@48320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-22 00:07:02 +00:00
Sergey Biryukov
a68d462439 Site Health: Use a consistent label for theme auto-updates in debug data.
Props audrasjb.
Fixes #50728.
Built from https://develop.svn.wordpress.org/trunk@48554


git-svn-id: http://core.svn.wordpress.org/trunk@48316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 21:06:02 +00:00
Sergey Biryukov
94d4561906 Site Health: Simplify the logic for displaying whether auto-updates are enabled for plugins and themes.
Remove some extra variables.

Follow-up to [48546], [48549].

See #50663.
Built from https://develop.svn.wordpress.org/trunk@48552


git-svn-id: http://core.svn.wordpress.org/trunk@48314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 18:44:04 +00:00
Sergey Biryukov
8a58ab36cc Site Health: Rename the filters added in [48546] for clarity.
See #50663.
Built from https://develop.svn.wordpress.org/trunk@48549


git-svn-id: http://core.svn.wordpress.org/trunk@48311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:09:03 +00:00
whyisjake
9d2b92be26 Site Health: Add tests to check for potential issues with plugin and theme auto-updates.
Fixes #50662.
Props desrosj, audrasjb.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 17:07:05 +00:00
whyisjake
32f791da49 Site Health: Add auto-update information to for plugins and themes.
New filters:

* `plugin_auto_update_debug_str`
* `theme_auto_update_debug_str`

Fixes #50663.
Props pbiron, audrasjb, davidbaumwald.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:54:02 +00:00
Sergey Biryukov
548df4e3e6 I18N: Add context to some theme strings for consistency.
Props ramiy, ocean90.
Fixes #50709.
Built from https://develop.svn.wordpress.org/trunk@48545


git-svn-id: http://core.svn.wordpress.org/trunk@48307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:33:05 +00:00
Sergey Biryukov
48841f9ab3 Site Health: Rename upload_max array key in file upload checks to max_effective_size for clarity.
Follow-up to [48535].

See #50038.
Built from https://develop.svn.wordpress.org/trunk@48544


git-svn-id: http://core.svn.wordpress.org/trunk@48306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 16:20:03 +00:00
Sergey Biryukov
1c52ad8d3f Site Health: Move post_max_size and upload_max_filesize out of a translatable string in file upload checks.
Simplify some other strings, use a consistent format for translator comments.

Follow-up to [48535].

See #50038.
Built from https://develop.svn.wordpress.org/trunk@48539


git-svn-id: http://core.svn.wordpress.org/trunk@48301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:53:04 +00:00
Sergey Biryukov
bec9fa5010 Site Health: Remove parse_ini_size(), use the existing wp_convert_hr_to_bytes() function instead.
Follow-up to [48535].

See #50038.
Built from https://develop.svn.wordpress.org/trunk@48538


git-svn-id: http://core.svn.wordpress.org/trunk@48300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:40:03 +00:00
whyisjake
73a8fb4cc3 Site Health: Include new tests to check for the ability to upload files.
Several new checks:

* `max_file_uploads`
* `file_uploads`
* `post_max_size`
* `upload_max_filesize`
* `upload_max`
* `max_file_uploads`

In addition, new function `parse_ini_size()` that converts shorthand byte strings to bytes. Useful for size comparisons.

Fixes #50038.
Props dd32, donmhico, JavierCasares, SergeyBiryukov, ayeshrajans, Clorith, ipstenu, sabernhardt, whyisjake.

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


git-svn-id: http://core.svn.wordpress.org/trunk@48297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 15:21:02 +00:00
Sergey Biryukov
d1822e81ba Site Health: Use consistent error messages when switching plugin or theme auto-updates on or off.
Props ramiy.
Fixes #50721.
Built from https://develop.svn.wordpress.org/trunk@48534


git-svn-id: http://core.svn.wordpress.org/trunk@48296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 14:42:05 +00:00
Sergey Biryukov
9ce7bd633b Docs: Improve description for edit_post().
Props stevenlinx.
Fixes #50713.
Built from https://develop.svn.wordpress.org/trunk@48529


git-svn-id: http://core.svn.wordpress.org/trunk@48291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 12:49:03 +00:00
whyisjake
5c836585d1 Comments: Don't show the filter/pagination actions if there are no comments to list.
It doesn't make sense to be able to filter the comments list table when there are are no (trashed/spam) comments available.

Fixes #40188.
Props swissspidy, Jim_Panse, menakas, akbarhusen429, dinhtungdu, birgire, SergeyBiryukov, davidbaumwald, rebasaurus, whyisjake.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-21 00:29:02 +00:00
Sergey Biryukov
e4ce35dd11 I18N: Add context to some plugin and theme strings for consistency.
Props ramiy, audrasjb.
Fixes #50710.
Built from https://develop.svn.wordpress.org/trunk@48520


git-svn-id: http://core.svn.wordpress.org/trunk@48282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 23:14:05 +00:00
Sergey Biryukov
82ce41ff51 I18N: Mark the strings with plugin and theme names in email notifications for translation.
Follow-up to [48517].

See #50350.
Built from https://develop.svn.wordpress.org/trunk@48519


git-svn-id: http://core.svn.wordpress.org/trunk@48281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 21:25:06 +00:00
desrosj
02f200df1d Administration: Include the new plugin and theme versions in email notifications.
This helps administrators keep track of which versions of plugins and themes are running on their site when auto-updates occur.

Props audrasjb, pbiron.
Fixes #50350.
Built from https://develop.svn.wordpress.org/trunk@48517


git-svn-id: http://core.svn.wordpress.org/trunk@48279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 18:28:03 +00:00
Andrew Ozz
efb77b4a65 Upgrade/install: Fix/clarify the "Upload in a zip format" string.
Props greenshady, mariovalney.
See #9757.
Built from https://develop.svn.wordpress.org/trunk@48509


git-svn-id: http://core.svn.wordpress.org/trunk@48271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-19 17:11:02 +00:00
John Blackbourn
c3f787b8ff Docs: Miscellaneous docblock corrections.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48508


git-svn-id: http://core.svn.wordpress.org/trunk@48270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-18 22:11:02 +00:00
whyisjake
da7a54d206 Administration: Fix an index inconsistency in get_admin_page_title() function.
Ensure that `get_admin_page_title()` returns a value from pages registered using `add_menu_page()`.

Fixes #46081.

Props grapestain, valentinbora, SergeyBiryukov, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 22:15:07 +00:00
whyisjake
a53b741359 Coding Standards: Update the docblock to remove superflous since.
The `@deprecated` DocBlock tag should start with the version followed by the description of what to use instead.

Fixes #44959.

Props keesiemeijer, sabernhardt.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 21:12:08 +00:00
Sergey Biryukov
64a4066874 Upgrade/Install: Check if the theme installer skin's overwrite property exists in Theme_Upgrader::install_strings().
This ensures consistency with `Plugin_Upgrader::install_strings()` and resolves an issue caused by the property not existing in other upgrader implementations.

Props schlessera, azaozz.
See #50670.
Built from https://develop.svn.wordpress.org/trunk@48493


git-svn-id: http://core.svn.wordpress.org/trunk@48255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-16 13:19:03 +00:00
desrosj
fdd88e24ed General: Rename the $new_whitelist_options global variable.
This change renames `$new_whitelist_options` to `$new_allowed_options`. This makes the variable’s purpose more clear, and promotes using more inclusive language.

For backwards compatibility, the new variable is passed by reference to the old one.

Follow up to [48121].

Props ayeshrajans, desrosj, jorbin, SergeyBiryukov.
See #50413.
Fixes #50434.
Built from https://develop.svn.wordpress.org/trunk@48477


git-svn-id: http://core.svn.wordpress.org/trunk@48246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-14 12:33:02 +00:00
John Blackbourn
5eb3f0ffcb Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48475


git-svn-id: http://core.svn.wordpress.org/trunk@48244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-14 12:10:05 +00:00
John Blackbourn
4ff1233e75 Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48473


git-svn-id: http://core.svn.wordpress.org/trunk@48242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-14 11:56:04 +00:00
John Blackbourn
6b21db7fb9 Docs: Miscellaneous docblock corrections and improvements.
See #49572
Built from https://develop.svn.wordpress.org/trunk@48462


git-svn-id: http://core.svn.wordpress.org/trunk@48231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-13 22:10:07 +00:00
Sergey Biryukov
7c09c153d5 Upgrade/Install: Simplify compatibility checks for uploaded plugins and themes for better readability.
Use `$new_plugin_data` and `$new_theme_data` as a shorthand for the corresponding `$this->upgrader` properties.

Follow-up to [48390], [48448].

Props afragen.
See #9757.
Built from https://develop.svn.wordpress.org/trunk@48455


git-svn-id: http://core.svn.wordpress.org/trunk@48224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-13 13:35:05 +00:00
Andrew Ozz
63a2cb3060 Upgrade/Install: Use wp_strip_all_tags() for the fields in the compare table on the "Update theme/plugin from uploaded zip" screen. Some may contain HTML.
See #9757.
Built from https://develop.svn.wordpress.org/trunk@48453


git-svn-id: http://core.svn.wordpress.org/trunk@48222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 20:00:03 +00:00
Sergey Biryukov
9848b6b3e9 Plugins: Make delete plugin message less scary.
This adds a check if the plugin actually has an uninstall routine before saying that its data will be deleted too.

Props samful, joostdevalk, joyously, Chouby, SergeyBiryukov.
Fixes #50346.
Built from https://develop.svn.wordpress.org/trunk@48451


git-svn-id: http://core.svn.wordpress.org/trunk@48220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 13:22:04 +00:00
Sergey Biryukov
c4543704e2 Administration: Restore the excerpt key for the Extended view mode for backward compatibility for now.
Props Offereins.
See #49715.
Built from https://develop.svn.wordpress.org/trunk@48450


git-svn-id: http://core.svn.wordpress.org/trunk@48219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 11:36:04 +00:00
Sergey Biryukov
1556ecc000 Docs: Add a @since entry for the $hook_extra parameter added to WP_Upgrader::download_package().
Follow-up to [48399].

See #49686.
Built from https://develop.svn.wordpress.org/trunk@48449


git-svn-id: http://core.svn.wordpress.org/trunk@48218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 11:02:03 +00:00
Sergey Biryukov
707534c2d8 Upgrade/Install: Use is_php_version_compatible() and is_wp_version_compatible() in plugin and theme requirement checks.
Follow-up to [48390].

Props afragen.
See #9757.
Built from https://develop.svn.wordpress.org/trunk@48448


git-svn-id: http://core.svn.wordpress.org/trunk@48217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 10:55:03 +00:00
Sergey Biryukov
f83b8775b3 I18N: Move the "WordPress Backups" support URL to its own translatable string.
Follow-up to [48390].

See #9757.
Built from https://develop.svn.wordpress.org/trunk@48447


git-svn-id: http://core.svn.wordpress.org/trunk@48216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 10:34:05 +00:00
Sergey Biryukov
3f1650122a Docs: Miscellaneous DocBlock corrections for plugin and theme updates.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48446


git-svn-id: http://core.svn.wordpress.org/trunk@48215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 01:19:03 +00:00
Sergey Biryukov
cecf7b9823 Administration: Handle the result of Plugin_Upgrader::bulk_upgrade() for a plugin that is already at the latest version in the same way it is handled for themes.
This corrects a fragile check of the result in `wp_ajax_update_plugin()` that depended on the internal array pointer, and brings some consistency with `wp_ajax_update_theme()`.

Follow-up to [37714], [48401].
See #50448.
Built from https://develop.svn.wordpress.org/trunk@48445


git-svn-id: http://core.svn.wordpress.org/trunk@48214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-12 01:16:05 +00:00
Sergey Biryukov
7b61df725e Revisions: Replace array_shift() with reset() in register_and_do_post_meta_boxes() for better performance.
Follow-up to [31829], [48422].

See #34560.
Built from https://develop.svn.wordpress.org/trunk@48436


git-svn-id: http://core.svn.wordpress.org/trunk@48205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-11 12:30:02 +00:00
Sergey Biryukov
51856d435b Administration: Bring some consistency to handling list table view modes.
* Remove duplicate variables and DocBlocks.
* Add missing description for the `$mode` global.
* Use sentence case for "Compact view" and "Extended view" labels.

Follow-up to [48398], [48423].

Props afercia, Offereins, SergeyBiryukov.
See #49715.
Built from https://develop.svn.wordpress.org/trunk@48424


git-svn-id: http://core.svn.wordpress.org/trunk@48193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 16:04:05 +00:00
Sergey Biryukov
0f92086ca0 Administration: Make some adjustments to WP_Screen::render_view_mode():
* Restore the `$mode` global for backward compatibility.
* Remove redundant check, as `$mode` is already set at this point, and already defaults to `list` via `get_user_setting()`'s second argument.
* Use sentence case for "View mode" and "Extended view" labels.

Follow-up to [48398].

See #49715.
Built from https://develop.svn.wordpress.org/trunk@48423


git-svn-id: http://core.svn.wordpress.org/trunk@48192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 16:02:05 +00:00
Adam Silverstein
7d0162bc2e Revisions: optimize performance when post has large number of revisions.
Improve speed and reduce the memory footprint when loading posts with many revisions.

* Use a direct query in `wp_get_post_autosave` to avoid loading all revisions.
* Query for IDs vs full objects in `register_and_do_post_meta_boxes`.

Props pdfernhout, johnnyb, miqrogroove, ocean90, senatorman, DBrumbaugh10Up, martijn-van-der-kooij, pavelevap, mackensen, mikeyarce, whyisjake.
Fixes #34560.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 15:13:07 +00:00
Sergey Biryukov
b03053eb2a Docs: Correct documentation for customize_controls_head hook and _customizer_mobile_viewport_meta() function.
Follow-up to [48412].

See #47369.
Built from https://develop.svn.wordpress.org/trunk@48420


git-svn-id: http://core.svn.wordpress.org/trunk@48189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 11:36:07 +00:00
whyisjake
28a390c2b2 Upgrade/Install: Use ARIA button class on plugin and theme auto-updates action links
According to the [accesability guidelines](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/#semantics-for-controls), the control should be a link when JavaScript is not available and a button the rest of the time.

In addition, handlers were added for spacebar usage, and some changes to the a11y speak verbiage.

Fixes #50516.
Props ryokuhi, audrasjb, afercia, whyisjake/



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


git-svn-id: http://core.svn.wordpress.org/trunk@48187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:18:04 +00:00
whyisjake
836ad98276 Upgrade/Install: Ensure cleanup after canceled update.
Ensure that the uploaded zip is hidden from the media library, where a task will remove failed installs after two hours.

Fixes #50612.

Props psykro, desrosj, joyously, azaozz, noisysocks, whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@48186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 06:08:06 +00:00
whyisjake
9397ad46ba Coding Standards: Some missed code formatting.
Unprops: whyisjake.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-10 01:01:03 +00:00
whyisjake
1158166d9c Administration: Remove multiple viewport meta tags from mobile pages.
In addition, add the `wp_admin_viewport_meta()` function, paired to the `admin_viewport_meta` filter to control attributes of the meta tag.

Fixes #47369.
Props BettyJJ, mukesh27, SergeyBiryukov, ajayghaghretiya1, msaggiorato, talldanwp, davidbaumwald, donmhico, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-09 23:29:08 +00:00
Sergey Biryukov
6bf6bc451f Docs: Miscellaneous DocBlock corrections.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48408


git-svn-id: http://core.svn.wordpress.org/trunk@48177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 13:15:03 +00:00
Sergey Biryukov
c358ba7112 Upgrade/Install: Prevent the upgrade routine for updating the comment_type field in the comments table from running twice.
Follow-up to [47597], [48400].

See #50413, #49236.
Built from https://develop.svn.wordpress.org/trunk@48405


git-svn-id: http://core.svn.wordpress.org/trunk@48174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-08 10:58:05 +00:00
desrosj
500508884e Administration: Fix failing tests as a result of [48397].
Because of changes to how PHP handles arrays used in `foreach()` loops in PHP >= 7.0, [48397] resulted in a failing test for PHP 5.6.

This calls `reset()` after using the `$results` array in the `foreach()` to ensure the array is treated the same and as expected.

Props azaozz, desrosj, SergeyBiryukov, xknown.
See #50448.
Built from https://develop.svn.wordpress.org/trunk@48401


git-svn-id: http://core.svn.wordpress.org/trunk@48170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 20:38:03 +00:00
desrosj
a8521d48ac Upgrade/Install: Prevent some 5.5.0 upgrade routines from running twice.
This will prevent the options renamed for 5.5.0 from being converted twice. If a new update routine is added before 5.5 is released, the option values would be erased for anyone running `trunk` or nightlies without this change.

Props azaozz, desrosj, SergeyBiryukov, whyisjake.
Fixes #50413.
Built from https://develop.svn.wordpress.org/trunk@48400


git-svn-id: http://core.svn.wordpress.org/trunk@48169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:21:06 +00:00
desrosj
8381fad76e Upgrade/Install: Add hook_extra parameter to the upgrader_pre_download filter.
This provides additional context to code running on this hook, including which plugin or theme update will be downloaded. It also brings consistency to this filter with others throughout the upgrade process.

Props obliviousharmony, desrosj.
Fixes #49686.
Built from https://develop.svn.wordpress.org/trunk@48399


git-svn-id: http://core.svn.wordpress.org/trunk@48168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:15:06 +00:00
whyisjake
dcdabb5bb3 Administration: Introduce extensibility to posts and comments list table views, for accessibility purposes.
At default, expands the excerpt view to become an extended view. Includes a new `table_view_mode` filter to allow further configuration.

Fixes #49715.
Props joedolson, audrasjb, afercia, whyisjake.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 19:12:03 +00:00