Commit Graph

7208 Commits

Author SHA1 Message Date
Sergey Biryukov
e5deae5e78 Administration: In add_settings_error(), add warning and info as possible values for message type.
Account for these new values in `settings_errors()`, resulting in `notice-warning` and `notice-info` CSS classes.

Map legacy `error` and `updated` CSS classes to `notice-error` and `notice-success`.

Props donmhico, toddhalfpenny, flixos90, desrosj, javorszky, SergeyBiryukov.
Fixes #44640, #44941.
Built from https://develop.svn.wordpress.org/trunk@45814


git-svn-id: http://core.svn.wordpress.org/trunk@45625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 23:01:55 +00:00
Gary Pendergast
7169586254 Schema: Add an index to wp_options.autoload.
Most sites will be unaffected by this change, but those with a large number of rows in `wp_options`, only a small number of which have `autoload` set, will see a significant performance improvement.

Sites with a large number of rows in `wp_options`, with many of them having `autoload` set will unfortunately see a performance penalty on top of the already very slow queries they're running, but this should be the minority of cases.

Props DanBUK.
Fixes #24044.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 07:13:55 +00:00
Sergey Biryukov
d85ba82d8e Docs: Add missing @since tag for WP_Site_Health::has_late_cron().
See #47223.
Built from https://develop.svn.wordpress.org/trunk@45803


git-svn-id: http://core.svn.wordpress.org/trunk@45614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:42:55 +00:00
Peter Wilson
a56256d158 Site Health Check: Increase time allowance for cron checks.
Introduces `WP_Site_Health::has_late_cron()` for late wp-cron jobs and extends the time allowance before a job is considered missed.

In a standard configuration using loopback requests, a job is considered late once past due and missed over five minutes past due.

Late and missed time frames are extended if `DISABLE_WP_CRON` is defined as `true` to allow for crontab tasks running less frequently. A job is considered late once it's 15 minutes past due and missed over one hour past due.

A file for site health unit tests has been introduced with tests for cron in critical, late and missed states.

Props rockfire, afragen, peterwilsoncc.
Fixes #47223.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-15 00:35:55 +00:00
Andrew Ozz
400ed5add0 Remove trailing white space in upgrade.php.
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45789


git-svn-id: http://core.svn.wordpress.org/trunk@45600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 19:53:55 +00:00
Andrew Ozz
197b4a829b Admin email verification:
- Add the `admin_email_lifespan` option when installing. Fixes a bug where the verification screen is shown right after installation.
- Reset the same option when upgrading and the user doing the DB upgrade is not an admin. This will ensure the email verification is shown next time an admin logs in.
- Use `site_url()` instead of `network_site_url()` for the form action. The latter seems needed only for password reset.

See #46349.
Built from https://develop.svn.wordpress.org/trunk@45788


git-svn-id: http://core.svn.wordpress.org/trunk@45599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-13 17:40:55 +00:00
Sergey Biryukov
99f4ff2578 Site Health: Add database charset and collation information to debug info.
Props sharaz, Clorith, SergeyBiryukov.
Fixes #47828.
Built from https://develop.svn.wordpress.org/trunk@45782


git-svn-id: http://core.svn.wordpress.org/trunk@45593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-12 01:54:57 +00:00
Andrew Ozz
52c53ae6f8 Remove trailing white space in upgrade.php after [45757].
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45758


git-svn-id: http://core.svn.wordpress.org/trunk@45569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 01:01:57 +00:00
Andrew Ozz
fff56d219f Add admin email verification screen. Shown every six months after an admin has logged in.
Also includes WPCS fixes for wp-login.php.

Props andraganescu, boemedia, lessbloat, azaozz.
See #46349.
Built from https://develop.svn.wordpress.org/trunk@45757


git-svn-id: http://core.svn.wordpress.org/trunk@45568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-07 00:04:56 +00:00
Sergey Biryukov
ad9d8c7d58 Plugins: Use include_once for wp-admin/includes/plugin-install.php in WP_Plugin_Install_List_Table::prepare_items().
This brings consistency with the other instances where the file is included, and allows for reusing its functions in custom code.

Props engelen, desrosj.
Fixes #38874.
Built from https://develop.svn.wordpress.org/trunk@45751


git-svn-id: http://core.svn.wordpress.org/trunk@45562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 11:07:55 +00:00
Sergey Biryukov
c1a252da8e Site Health: Use correct variable when checking PHP requirements for a plugin update in WP_Plugins_List_Table::single_row().
Props diddledan, sharaz, vaishalipanchal.
Fixes #47835.
Built from https://develop.svn.wordpress.org/trunk@45750


git-svn-id: http://core.svn.wordpress.org/trunk@45561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 10:58:56 +00:00
Sergey Biryukov
f7b8423b12 Upgrade/Install: Make sure translate_level_to_role() always returns a value.
Props diddledan.
Fixes #46848.
Built from https://develop.svn.wordpress.org/trunk@45747


git-svn-id: http://core.svn.wordpress.org/trunk@45558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-05 07:48:58 +00:00
Sergey Biryukov
9967a3e030 Docs: Add missing description for $post global.
Props immeet94.
Fixes #46503. See #47110.
Built from https://develop.svn.wordpress.org/trunk@45742


git-svn-id: http://core.svn.wordpress.org/trunk@45553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 12:28:56 +00:00
Sergey Biryukov
6da93732e7 Docs: Add missing description for $current_screen global.
Props mukesh27.
Fixes #45604. See #47110.
Built from https://develop.svn.wordpress.org/trunk@45740


git-svn-id: http://core.svn.wordpress.org/trunk@45551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 02:03:55 +00:00
Sergey Biryukov
7f7480cb2a Docs: Add missing description for $wp_query and $wp_the_query globals.
Props mukesh27.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45739


git-svn-id: http://core.svn.wordpress.org/trunk@45550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:59:56 +00:00
Sergey Biryukov
e0311b76c7 Docs: Add missing description for $wp_locale global.
Props mukesh27.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45737


git-svn-id: http://core.svn.wordpress.org/trunk@45548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:46:55 +00:00
Sergey Biryukov
b1e34ccc1f Docs: Add missing description for $wp_rewrite global.
See #45604, #47110.
Built from https://develop.svn.wordpress.org/trunk@45735


git-svn-id: http://core.svn.wordpress.org/trunk@45546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:19:56 +00:00
Sergey Biryukov
29b072e706 Docs: Add missing description for $wpdb, $wp_db_version, and $wp_current_db_version globals.
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.
Built from https://develop.svn.wordpress.org/trunk@45734


git-svn-id: http://core.svn.wordpress.org/trunk@45545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:12:56 +00:00
Sergey Biryukov
702ee129ad Docs: Fix typo in a comment in WP_Site_Health::get_test_theme_version().
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45733


git-svn-id: http://core.svn.wordpress.org/trunk@45544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:48:56 +00:00
Sergey Biryukov
fd83290995 Site Health: If WP_DEFAULT_THEME doesn't exist, use WP_Theme::get_core_default_theme() as a fallback.
Props ajayghaghretiya1, juliobox, SergeyBiryukov.
Fixes #47299.
Built from https://develop.svn.wordpress.org/trunk@45732


git-svn-id: http://core.svn.wordpress.org/trunk@45543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 00:02:55 +00:00
Aaron Jorbin
c377191858 PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax
PHP used to allow both square brackets and curly braces to be used interchangeably for accessing array elements and string offsets. The curly bracket syntax is only allowed in a limited set of cases and can be confusing for people not used to it.
PHP 7.4 will deprecate the curly brace syntax for accessing array elements and string offsets and it is expected that support will be completely removed in PHP 8.0.
Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

See #47751.
Props jrf.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 20:21:55 +00:00
Andrea Fercia
7b45746001 Menus: Fix the Custom Links text fallback.
When adding a Custom Link and leaving the "Link Text" field empty, WordPress used to set a default fallback text: "Menu Item".

The changes in [36379] broke this behavior making the fallback text: ` (Pending)`, with a leading space.

Pending major refactoring of the Menus page (which is going to use a block-based user interface) this change just restores the original behavior by adding the fallback text to the related AJAX response.

Props christophherr, Fencer04, thakkarhardik, backermann1978, audrasjb.
Fixes #38415.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 12:19:56 +00:00
Sergey Biryukov
c26f1c5d90 Taxonomy: Fix deprecated calls to get_terms().
The taxonomy should be passed as part of `$args`, rather than as its own argument.

Props sgastard, mukesh27, SergeyBiryukov.
Fixes #47819.
Built from https://develop.svn.wordpress.org/trunk@45723


git-svn-id: http://core.svn.wordpress.org/trunk@45534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-03 03:35:56 +00:00
Sergey Biryukov
b32cff72c2 Users: Deprecate update_user_status() in favor of wp_update_user().
Props spacedmonkey, SergeyBiryukov.
Fixes #45747.
Built from https://develop.svn.wordpress.org/trunk@45708


git-svn-id: http://core.svn.wordpress.org/trunk@45519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-01 11:28:54 +00:00
Sergey Biryukov
ee23869c68 Docs: Correct parameter documentation for bulk_edit_custom_box and quick_edit_custom_box actions.
Props abrain.
Fixes #47810.
Built from https://develop.svn.wordpress.org/trunk@45704


git-svn-id: http://core.svn.wordpress.org/trunk@45515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 15:10:58 +00:00
Sergey Biryukov
ec8940edeb Coding Standards: Fix WPCS violations in wp-admin/includes/class-walker-nav-menu-edit.php.
Props sudhiryadav, audrasjb.
Fixes #46902.
Built from https://develop.svn.wordpress.org/trunk@45697


git-svn-id: http://core.svn.wordpress.org/trunk@45508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:53:52 +00:00
Sergey Biryukov
c9942bb3d8 Coding Standards: Fix WPCS violations in [45694].
See #47466.
Built from https://develop.svn.wordpress.org/trunk@45696


git-svn-id: http://core.svn.wordpress.org/trunk@45507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:52:56 +00:00
Sergey Biryukov
e7abdc7040 Docs: Improve the DocBlocks for got_mod_rewrite(), extract_from_markers(), insert_with_markers().
See #47110.
Built from https://develop.svn.wordpress.org/trunk@45695


git-svn-id: http://core.svn.wordpress.org/trunk@45506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:35:56 +00:00
Sergey Biryukov
67e5038470 Rewrite Rules: Add a comment to # BEGIN/END .htaccess markers to clarify that the directives are dynamically generated, and should only be modified via WordPress filters.
Introduce `insert_with_markers_inline_instructions` filter to modify the default instructions text.

Props bradleyt, SergeyBiryukov.
Fixes #47466.
Built from https://develop.svn.wordpress.org/trunk@45694


git-svn-id: http://core.svn.wordpress.org/trunk@45505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 16:31:57 +00:00
Sergey Biryukov
a59301c2ba Site Health: Consistently use wpdb::db_version() for checking the database server version, instead of partically replicating its functionality.
Props Clorith, wpfed.
Fixes #47738.
Built from https://develop.svn.wordpress.org/trunk@45691


git-svn-id: http://core.svn.wordpress.org/trunk@45502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-28 14:55:57 +00:00
Sergey Biryukov
e925997562 Site Health: Show parent theme in its own accordion on Site Health Info screen; rename "Other Themes" to "Inactive Themes".
Props garrett-eclipse, mukesh27, Clorith, xkon, msaggiorato.
Fixes #46925.
Built from https://develop.svn.wordpress.org/trunk@45680


git-svn-id: http://core.svn.wordpress.org/trunk@45491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-26 03:49:55 +00:00
Sergey Biryukov
a186dbcb65 I18N: Update translator comments after [45674].
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45676


git-svn-id: http://core.svn.wordpress.org/trunk@45487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:52:56 +00:00
Sergey Biryukov
8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +00:00
Sergey Biryukov
aee690fd84 Permalinks: Update URLs for "Changing File Permissions" documentation article.
Props patilswapnilv, ianbelanger, SergeyBiryukov.
Fixes #47768.
Built from https://develop.svn.wordpress.org/trunk@45669


git-svn-id: http://core.svn.wordpress.org/trunk@45480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 01:18:55 +00:00
Sergey Biryukov
18bd01985b Coding Standards: Rename $r variable used with wp_parse_args() to $parsed_args for clarity.
Props freewebmentor.
Fixes #45059.
Built from https://develop.svn.wordpress.org/trunk@45667


git-svn-id: http://core.svn.wordpress.org/trunk@45478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 00:48:58 +00:00
Gary Pendergast
971814047f Coding Standards: Move wp-admin/custom-background.php to wp-admin/includes/class-custom-background.php
This renames the file containing the Custom_Background class to conform to the coding standards.

This commit also includes:

- A new custom-background.php that includes the new file, for anyone that may've been including the file directly.
- Replaces a reference to the old filename with the new filename.

See #47632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-19 04:02:55 +00:00
Sergey Biryukov
7149d65934 Editor: Replace external Classic Editor plugin URL with a link to Add Plugins screen with Classic Editor pre-selected.
This applies to messages displayed when JavaScript is disabled in Block Editor, or an incompatible meta box is used.

Props garrett-eclipse, derweili, afercia.
Fixes #47487.
Built from https://develop.svn.wordpress.org/trunk@45657


git-svn-id: http://core.svn.wordpress.org/trunk@45468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-18 01:33:57 +00:00
Gary Pendergast
24d08a9463 Coding Standards: Move wp-admin/custom-header.php to wp-admin/includes/class-custom-image-header.php
This renames the file containing the `Custom_Image_Header` class to conform to the coding standards.

This commit also includes:
- A new `custom-header.php` that includes the new file, for anyone that may've been including the file directly.
- Replaces references to the old filename with the new filename.

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-17 06:17:56 +00:00
Sergey Biryukov
66afb60397 Site Health: Use consistent verbiage for "Learn more" links.
Props ronakganatra, garrett-eclipse.
Fixes #47302.
Built from https://develop.svn.wordpress.org/trunk@45649


git-svn-id: http://core.svn.wordpress.org/trunk@45460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 22:28:57 +00:00
Sergey Biryukov
e5ad773194 I18N: Merge duplicate "Your plugins/themes/translations are all up to date" strings.
Props ramiy.
Fixes #47252.
Built from https://develop.svn.wordpress.org/trunk@45647


git-svn-id: http://core.svn.wordpress.org/trunk@45458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 22:13:58 +00:00
Andrew Ozz
5eba5381e6 Media: Sort the new sizes array by priority when creating image sub-sizes.
See #40439.
Built from https://develop.svn.wordpress.org/trunk@45645


git-svn-id: http://core.svn.wordpress.org/trunk@45456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 21:48:56 +00:00
Sergey Biryukov
83d175cdd0 I18N: Add context for theme filter strings in WP_MS_Themes_List_Table::get_views().
Props audrasjb.
Fixes #47695.
Built from https://develop.svn.wordpress.org/trunk@45634


git-svn-id: http://core.svn.wordpress.org/trunk@45445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-14 14:47:56 +00:00
Gary Pendergast
4c3d541e23 Block Editor: Fix the link to the classic editor when incompatible meta boxen are detected.
Props tmatsuur, mukesh27.
Fixes #45935.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-11 06:01:58 +00:00
Sergey Biryukov
7369ff02f5 Coding Standards: Remove extra whitespace in list tables' column_cb() methods.
See #47632.
Built from https://develop.svn.wordpress.org/trunk@45617


git-svn-id: http://core.svn.wordpress.org/trunk@45428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 21:11:58 +00:00
Sergey Biryukov
9a5f538153 Coding Standards: Remove extra whitespace in wp-admin/includes/image-edit.php.
See #47632.
Built from https://develop.svn.wordpress.org/trunk@45616


git-svn-id: http://core.svn.wordpress.org/trunk@45427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 21:05:57 +00:00
Sergey Biryukov
6a696f6051 I18N: Move code out of translatable string in a _deprecated_argument() message in wp_stream_image(), wp_save_image_file(), and image_edit_apply_changes().
Props ramiy.
Fixes #47406.
Built from https://develop.svn.wordpress.org/trunk@45615


git-svn-id: http://core.svn.wordpress.org/trunk@45426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 20:57:56 +00:00
Sergey Biryukov
bb365054b8 Menus: Remove extra whitespace from URLs in Walker_Nav_Menu_Edit::start_el().
Props alexeyskr, SergeyBiryukov.
Fixes #47666.
Built from https://develop.svn.wordpress.org/trunk@45614


git-svn-id: http://core.svn.wordpress.org/trunk@45425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 20:45:56 +00:00
Sergey Biryukov
29e5155969 Filesystem API: Check correct variable in WP_Filesystem_Direct::dirlist() after [45611].
Props zinigor.
Fixes #47668. See #47632.
Built from https://develop.svn.wordpress.org/trunk@45613


git-svn-id: http://core.svn.wordpress.org/trunk@45424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 15:58:57 +00:00
Gary Pendergast
4be25f3d06 Coding Standards: Fix instances of WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase.
See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 06:29:57 +00:00
Gary Pendergast
abcbee954f Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 05:45:58 +00:00