Commit Graph

39987 Commits

Author SHA1 Message Date
Sergey Biryukov
8df86efc2b Site Health: Use consistent verbiage for "Learn more" links.
Props ronakganatra, garrett-eclipse.
Fixes #47302.

git-svn-id: https://develop.svn.wordpress.org/trunk@45649 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:27:55 +00:00
Sergey Biryukov
94a6e06ab9 Site Health: Replace "harddrive" with "device" on Site Health Info screen.
Props chetan200891, timhavinga, Cybr, Clorith.
Fixes #46965.

git-svn-id: https://develop.svn.wordpress.org/trunk@45648 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:18:58 +00:00
Sergey Biryukov
a65fcde5c0 I18N: Merge duplicate "Your plugins/themes/translations are all up to date" strings.
Props ramiy.
Fixes #47252.

git-svn-id: https://develop.svn.wordpress.org/trunk@45647 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 22:13:01 +00:00
Sergey Biryukov
2ae276c44f Media: Add a unit test for wp_get_mime_types().
Props pbearne.
Fixes #47701.

git-svn-id: https://develop.svn.wordpress.org/trunk@45646 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:51:45 +00:00
Andrew Ozz
9d00289c60 Media: Sort the new sizes array by priority when creating image sub-sizes.
See #40439.

git-svn-id: https://develop.svn.wordpress.org/trunk@45645 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:47:35 +00:00
Sergey Biryukov
98a2971872 Customize: In WP_Customize_Widgets::capture_filter_pre_update_option(), return the filtered value instead of null when bailing early for ignored options.
Props dlh.
Fixes #47715.

git-svn-id: https://develop.svn.wordpress.org/trunk@45644 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 21:32:21 +00:00
Sergey Biryukov
09fc7ba6ae Docs: Move the do_mu_upgrade DocBlock out of the preceding if statement.
Props ChriCo, dkarfa.
Fixes #47710.

git-svn-id: https://develop.svn.wordpress.org/trunk@45643 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 13:14:45 +00:00
Sergey Biryukov
811b92192d Docs: Correct @since tag for do_mu_upgrade hook, for consistency with after_mu_upgrade and wpmu_upgrade_site.
See #47110.

git-svn-id: https://develop.svn.wordpress.org/trunk@45642 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-16 12:41:16 +00:00
Sergey Biryukov
1570f89693 Comments: Fix typo in comment reply observer options.
Props maguiar.
Fixes #47706. See #46260.

git-svn-id: https://develop.svn.wordpress.org/trunk@45641 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 16:45:58 +00:00
Gary Pendergast
9f8a75e154 Code Modernisation: Revert [45624].
Changing the method signatures on `Walker` causes back compat issues.

See #47678.




git-svn-id: https://develop.svn.wordpress.org/trunk@45640 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 07:03:54 +00:00
Gary Pendergast
2da7f9f524 Code Modernisation: Fix known instances of array access on data types that can't be accessed as arrays.
PHP 7.4 addes a warning when trying access a null/bool/int/float/resource (everything but array, string and object) as if it were an array.

This change fixes all of these warnings visible in unit tests.

Props jrf.
See #47704.




git-svn-id: https://develop.svn.wordpress.org/trunk@45639 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 06:24:08 +00:00
Gary Pendergast
e6c750b55c Code Modernisation: Document when the Hash polyfills can be removed.
The Hash extension cannot be disabled as of PHP 7.4. So, while we can't remove these polyfills yet, we can document when we'll be able to.

Props jrf.
Fixes #47698.



git-svn-id: https://develop.svn.wordpress.org/trunk@45638 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 05:13:10 +00:00
Gary Pendergast
593c402dc7 Code Modernisation: Remove the SPL autoloader polyfill.
As of PHP 5.3, the SPL extension cannot be disabled, so we no longer need this polyfill.

The file is kept with a `_deprecated_file()` call, to alert any plugins or themes that may be loading it directly.

Props jrf, ayeshrajans.
See #47698, #46630.



git-svn-id: https://develop.svn.wordpress.org/trunk@45637 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 05:10:36 +00:00
Gary Pendergast
f3b826dd74 Code Modernisation: Remove the array_replace_recursive() polyfill.
This function was added in PHP 5.3.0, so we no longer need the polyfill.

Props jrf.
See #47698.



git-svn-id: https://develop.svn.wordpress.org/trunk@45636 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 05:07:20 +00:00
Gary Pendergast
6b3ccc2c64 WPDB: Allow custom data to be added to logged queries.
This adds a new method, `wpdb::log_query()`, and a new filter, `log_query_custom_data`. The custom data is stored as a new element in each entry of the `wpdb::$queries` array.

Props CrazyJaco, johnbillion, pento.
Fixes 42151.


git-svn-id: https://develop.svn.wordpress.org/trunk@45635 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-15 04:06:24 +00:00
Sergey Biryukov
eb9f88e763 I18N: Add context for theme filter strings in WP_MS_Themes_List_Table::get_views().
Props audrasjb.
Fixes #47695.

git-svn-id: https://develop.svn.wordpress.org/trunk@45634 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-14 14:46:10 +00:00
Sergey Biryukov
60c7970d14 Upgrade/Install: Remove debugging artifacts from wp-admin/upgrade.php added in [1229].
Props rahulvaza.
Fixes #47074.

git-svn-id: https://develop.svn.wordpress.org/trunk@45633 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-14 14:38:43 +00:00
Sergey Biryukov
0492ad749d REST API: Allow rest_get_avatar_urls() to accept full user, post, or comment objects, rather than just an email address, to provide better flexibility for alternative avatar data.
Since the function uses `get_avatar_url()` internally, which already supports it, this should not have any backward compatibility concerns.

Props donmhico, dshanske, pputzer, joehoyle, TimothyBlynJacobs.
Fixes #40030.

git-svn-id: https://develop.svn.wordpress.org/trunk@45632 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-14 14:34:02 +00:00
Andrew Ozz
a7041b951b TinyMCE: fix adding of too many undo levels for wpviews. The HTML changes several times when a wpview is added. We only want one undo level. Also fixes cases when the cursor is next to an embeddable URL in the Text tab and the user switches to the Visual tab.
See #45307.

git-svn-id: https://develop.svn.wordpress.org/trunk@45631 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 03:24:20 +00:00
Gary Pendergast
1f8d74409b Code Modernisation: Introduce the spread operator in wpdb::prepare().
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45630 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:16:34 +00:00
Gary Pendergast
e0c9623ae1 Code Modernisation: Introduce the spread operator in widgets.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45629 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:13:07 +00:00
Gary Pendergast
e6cde1614b Code Modernisation: Introduce the spread operator in theme.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf, pento.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45628 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:09:31 +00:00
Gary Pendergast
6e829a7b26 Code Modernisation: Introduce the spread operator in walk_page_dropdown_tree().
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45627 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:04:57 +00:00
Sergey Biryukov
03b7742ee9 Customize: Fix text direction for color picker in RTL.
Props vjik for the report.
Fixes #47688. See #23740.

git-svn-id: https://develop.svn.wordpress.org/trunk@45626 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:04:41 +00:00
Gary Pendergast
17ba89b662 Code Modernisation: Introduce the spread operator in add_post_type_support().
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf, pento.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45625 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:01:19 +00:00
Gary Pendergast
6c3ba83eb9 Code Modernisation: Introduce the spread operator in Walker.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45624 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:50:37 +00:00
Gary Pendergast
1963a00f83 Code Modernisation: Introduce the spread operator in WP_User.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45623 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:47:56 +00:00
Gary Pendergast
50ec358b41 Code Modernisation: Introduce the spread operator in capabilities.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45622 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:45:22 +00:00
Andrew Ozz
620704320e Editor: Make registered editor stylesheets (editor-style.css) available to the front-end.
Props webmandesign, azaozz.
Fixes #34882.

git-svn-id: https://develop.svn.wordpress.org/trunk@45621 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 18:29:09 +00:00
Andrew Ozz
944595cb9d TinyMCE: fix flickering inline toolbar when showing a tooltip. Take two.
Fixes #44911.

git-svn-id: https://develop.svn.wordpress.org/trunk@45620 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 18:17:46 +00:00
Gary Pendergast
ec2942e03e Block Editor: Avoid a PHP warning when a theme adds an editor style with an empty filename.
Fixes #45739.


git-svn-id: https://develop.svn.wordpress.org/trunk@45619 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 07:20:40 +00:00
Gary Pendergast
756e06cd94 Block Editor: Fix the link to the classic editor when incompatible meta boxen are detected.
Props tmatsuur, mukesh27.
Fixes #45935.


git-svn-id: https://develop.svn.wordpress.org/trunk@45618 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 06:00:39 +00:00
Sergey Biryukov
eba439f0ac Coding Standards: Remove extra whitespace in list tables' column_cb() methods.
See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45617 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 21:10:11 +00:00
Sergey Biryukov
6bee5769cb Coding Standards: Remove extra whitespace in wp-admin/includes/image-edit.php.
See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45616 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 21:04:41 +00:00
Sergey Biryukov
9ed8e4189a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45615 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 20:56:37 +00:00
Sergey Biryukov
89919f6ac4 Menus: Remove extra whitespace from URLs in Walker_Nav_Menu_Edit::start_el().
Props alexeyskr, SergeyBiryukov.
Fixes #47666.

git-svn-id: https://develop.svn.wordpress.org/trunk@45614 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 20:44:03 +00:00
Sergey Biryukov
40d9fdf1f9 Filesystem API: Check correct variable in WP_Filesystem_Direct::dirlist() after [45611].
Props zinigor.
Fixes #47668. See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45613 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 15:57:53 +00:00
Gary Pendergast
acf6cabe24 Coding Standards: Fix instances of WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase.
See #46732.


git-svn-id: https://develop.svn.wordpress.org/trunk@45612 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 06:28:09 +00:00
Gary Pendergast
d36eda33f7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45611 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 05:44:42 +00:00
Andrew Ozz
e56d5d0d4c TinyMCE: fix flickering inline toolbar when hovering over the buttons there and the vertical scrollbar is not shown (the page height is less than the window height). Improves/removes the previous fix for similar flickering but only in RTL, see #42018.
Props joakimsilfverberg, mukesh27, kokers, Howdy_McGee, noisysocks, azaozz.
Fixes #44911.

git-svn-id: https://develop.svn.wordpress.org/trunk@45610 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 01:09:53 +00:00
Gary Pendergast
9a54b94b4a Coding Standards: Add missing translator comments to the default themes.
All default themes now have translator comments for all strings with placeholders!

See #46732.


git-svn-id: https://develop.svn.wordpress.org/trunk@45609 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 01:08:47 +00:00
Gary Pendergast
dd8fa6dc05 Theme Editor: Hide the recommendation to create a child theme when editing a child theme.
Props mukesh27, davidbaumwald.
Fixes #44889.


git-svn-id: https://develop.svn.wordpress.org/trunk@45608 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 03:14:37 +00:00
Gary Pendergast
c6c78490e2 Coding Standards: Fix the remaining issues in /tests.
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 00:55:20 +00:00
laurelfulford
431bc58a48 Twenty Thirteen: Add styles for the new Group block.
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments. 

Props @kjellr.
Fixes #46778.



git-svn-id: https://develop.svn.wordpress.org/trunk@45606 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-07 20:48:03 +00:00
laurelfulford
b55695b189 Twenty Nineteen: Add styles for the new Group block.
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments. 

Props @kjellr, @dianeco.
Fixes #46750.



git-svn-id: https://develop.svn.wordpress.org/trunk@45605 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-07 20:10:55 +00:00
Gary Pendergast
272e5bb4e5 Coding Standards: Add missing translator comments.
Twentys Eleven, Sixteen, and Seventeen now have translator comments for all their strings.

Also, WPCS now doesn't show missing translator comment warnings for test files.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45604 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 08:03:40 +00:00
Gary Pendergast
18ec05e23a Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45603 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:42:57 +00:00
Gary Pendergast
6acb0c6402 Coding Standards: Fix all WordPress.WhiteSpace.PrecisionAlignment issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45602 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:20:52 +00:00
Gary Pendergast
027c9dae90 Coding Standards: Fix all WordPress.CodeAnalysis.AssignmentInCondition issues.
`WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition` can be ignored, as this is allowed in Core.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45601 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 03:13:31 +00:00
Gary Pendergast
e6b7205a8f Coding Standards: Upgrade WPCS to 2.1.1.
Noteable changes:
- WPCS now throws warnings when non-strict comparisons are used. There are quite a few of them in Core. 🙃
- WPCS now detects and warns for assignments in loop conditions.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45600 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 02:49:53 +00:00