Commit Graph

40877 Commits

Author SHA1 Message Date
Sergey Biryukov ae2ebb8b18 Coding Standards: Consistently use `do_action_deprecated()` and `apply_filters_deprecated()` for deprecated hooks.
Props jrf.
See #48255.

git-svn-id: https://develop.svn.wordpress.org/trunk@46684 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-09 12:57:27 +00:00
Sergey Biryukov 243d1a2e38 Test: Don't skip the tests intended for single site when running on Multisite, add them to the `ms-excluded` group instead.
See #39776, #45747.

git-svn-id: https://develop.svn.wordpress.org/trunk@46683 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-09 03:44:51 +00:00
Sergey Biryukov fcf86b80b6 Tests: Skip `test_readme()` if the HTTP request to `secure.php.net` or `dev.mysql.com` failed on timeout.
Move `skipTestOnTimeout()` to `WP_UnitTestCase_Base` to avoid duplication.

See #44613.

git-svn-id: https://develop.svn.wordpress.org/trunk@46682 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-09 03:36:19 +00:00
Sergey Biryukov 9b1fc27c3f Docs: Correct some inconsistencies in comments with Dashicon class references in `wp-admin/css/customize-widgets.css`.
Prepend all class name references with `dashicons-` for clarity.

Props 1naveengiri, marcio-zebedeu, hareesh-pillai, SergeyBiryukov.
Fixes #48417.

git-svn-id: https://develop.svn.wordpress.org/trunk@46681 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-09 00:01:40 +00:00
Sergey Biryukov 4a73b562a3 Docs: Correct description for `$recursive` parameter of `::chmod()` and `::delete()` methods in `WP_Filesystem` implementations.
Props skithund.
Fixes #48422.

git-svn-id: https://develop.svn.wordpress.org/trunk@46679 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-08 22:54:33 +00:00
John Blackbourn a216b6d838 Toolbar: Un-deprecate the `WP_Admin_Bar::add_menu()` method.
This is only a wrapper for the `add_node()` method, but it's in widespread use both in core until [46642] and in thousands of plugins and themes. Deprecating it would have made sense when #19647 was originally opened but that's no longer the case.

Props whyisjake

Fixes #19647 


git-svn-id: https://develop.svn.wordpress.org/trunk@46678 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-08 13:17:35 +00:00
Andrew Ozz 698aa0e564 Upload: When an image was scaled because it is larger than the big image threshold, use the originally uploaded image's dimensions in `wp_get_missing_image_subsizes()`. Fixes an edge case/inconsistent behaviour when a registered image sub-size is also larger than the big image threshold.
Props desrosj, azaozz.
Fixes #48518 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@46677 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-07 18:49:17 +00:00
Jonathan Desrosiers 3dca77e628 Bundled Themes: Standardize the Required PHP and Tested Up To headers.
This change makes several changes to ensure consistency and accuracy for default theme headers:

- Removes `WordPress` from `Requires at least` headers.
- Ensures the `Requires at least` and `Requires PHP` headers are present in every default theme’s `style.css` file.
- Ensures `Tested up to` is present in every `readme.txt` file.
- Removes any headers not processed in both the `style.css` and `readme.txt` files for each theme.

Props Otto42, afragen.
Fixes #48517.

git-svn-id: https://develop.svn.wordpress.org/trunk@46676 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-07 15:17:02 +00:00
Sergey Biryukov 4185cf789a Docs: Make `@param` tags in `mce_buttons` and related filters consistent with the variable names.
Props upadalavipul, isabel_brison.
Fixes #41456.

git-svn-id: https://develop.svn.wordpress.org/trunk@46675 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-07 07:10:38 +00:00
Sergey Biryukov 75f82d8bc2 Tests: Properly mark `test_submenu_helpers_priority()` as skipped for multisite, so it's not categorized as "risky".
See #39776.

git-svn-id: https://develop.svn.wordpress.org/trunk@46674 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-06 01:15:11 +00:00
Sergey Biryukov 9c3319de66 Coding Standards: Fix WPCS issues in [46670].
See #48145.

git-svn-id: https://develop.svn.wordpress.org/trunk@46671 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 23:17:01 +00:00
John Blackbourn bd2130f367 REST API: Use explicit dates in a post ordering test to avoid indeterminate ordering.
See #48145


git-svn-id: https://develop.svn.wordpress.org/trunk@46670 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 22:39:37 +00:00
Jonathan Desrosiers 560b682e3c Bundled Themes: Update Twenty Twenty.
This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC3, see dea9290...c267289.

Props williampatton, poena, andersnoren.
See #48110, #48386, #48450, #48293.
Fixes #48505.

git-svn-id: https://develop.svn.wordpress.org/trunk@46668 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 22:20:52 +00:00
Jonathan Desrosiers 1842040204 Emoji: Upgrade Twemoji to 12.1.3.
This point release does not add any images and only slightly modifies a few images without changing their meanings. Because of this, the same CDN location can be used and has been updated.

Props matstars, desrosj, Otto42, pento.
Fixes #48293.

git-svn-id: https://develop.svn.wordpress.org/trunk@46665 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 22:02:03 +00:00
John Blackbourn ed4b67b17e Block Editor: Revert [46663] which was itself an erroneous revert.
See #48502


git-svn-id: https://develop.svn.wordpress.org/trunk@46664 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:57:47 +00:00
John Blackbourn afecdb29c5 Block Editor: Bug fixes targeted for WordPress 5.3 RC4.
Merges [46656] to the 5.3 branch.
Fixes #48502


git-svn-id: https://develop.svn.wordpress.org/trunk@46663 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:51:30 +00:00
John Blackbourn 46581088d5 Docs: Docs on docs. Further improve documentation of known return types, plus other docs fixes.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46662 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:28:51 +00:00
John Blackbourn 3cdee7a705 Docs: Further improve documentation of known return types, plus other docs fixes.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46661 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:25:53 +00:00
John Blackbourn db4f746b4a Docs: Improve documentation of known return types, plus other docs fixes.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46660 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 21:21:46 +00:00
Andrew Ozz 63d4dcd10a Media: Remove the variable number (from the big image threshold value) when generating file names for scaled images. This makes it easier to "calculate" the full size file name from the name of an intermediate size image.
Props ianmjones, azaozz.
Fixes #48453 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@46658 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 20:51:12 +00:00
Sergey Biryukov 4a729f0498 REST API: Speed up pagination unit tests by creating less fixtures and reusing them where possible.
Includes minor documentation and code layout fixes for better readability.

See #30017, #48145.

git-svn-id: https://develop.svn.wordpress.org/trunk@46657 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 20:41:12 +00:00
Jorge Costa 4cee80b682 Block Editor: Bug fixes targeted for WordPress 5.3 RC4.
The list of included fixes is:

https://github.com/WordPress/gutenberg/pull/18183
https://github.com/WordPress/gutenberg/pull/18194
https://github.com/WordPress/gutenberg/pull/18230
https://github.com/WordPress/gutenberg/pull/18275
https://github.com/WordPress/gutenberg/pull/18287

Updated packages:
 - @wordpress/block-editor@3.2.4
 - @wordpress/block-library@2.9.5
 - @wordpress/edit-post@3.8.5
 - @wordpress/editor@9.7.5
 - @wordpress/format-library@1.9.4

Props @aduth, @mcsf, @youknowriad, @johnbillion.
Fixes #48502.

git-svn-id: https://develop.svn.wordpress.org/trunk@46656 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 19:34:07 +00:00
Jake Spurlock 969285d54b REST API: Fix for Yoda condition.
Little coding standards fix for the REST API.

Props mukesh27, spenserhale.

Fixes #48337.


git-svn-id: https://develop.svn.wordpress.org/trunk@46654 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-05 17:36:31 +00:00
John Blackbourn f6cb28a6a2 Docs: Correct and improve the readability of some parameters of `WP_Term_Query`.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46652 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 17:48:55 +00:00
Andrew Ozz 9ed5e8c9f7 Upload: Ensure the new image meta is always saved before starting post-processing of an uploaded image, even if there was an error while scaling or rotating it.
See #48472.

git-svn-id: https://develop.svn.wordpress.org/trunk@46651 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 17:05:53 +00:00
Sergey Biryukov 20165c2ffb Login and Registration: Simplify the test for `wp_signon()` added in [46640].
Make sure it actually tests the change in behavior, previously it passed both before and after the patch.

Add `wp_unslash()` to the last remaining instance of `$_POST['user_login']` that didn't have it.

See #38744.

git-svn-id: https://develop.svn.wordpress.org/trunk@46650 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 15:04:41 +00:00
Sergey Biryukov c231bb4869 Build/Test Tools: Adjust the test for `wp_redirect()` status codes added in [46641] per the documentation and coding standards.
Move the test to a more appropriate place for consistency with `wp_sanitize_redirect()` and `wp_validate_redirect()` tests.

See #44317.

git-svn-id: https://develop.svn.wordpress.org/trunk@46649 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 12:57:17 +00:00
Sergey Biryukov c04078ac9d REST API: Set `orderby` parameter in tax relation unit tests added in [46646].
The default value of `date` caused a race condition resulting in random test failures.

See #44326.

git-svn-id: https://develop.svn.wordpress.org/trunk@46648 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 12:34:35 +00:00
Sergey Biryukov ec5f1035fe Docs: Correct some array hash notations added in [46644].
See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46647 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-04 09:35:59 +00:00
Timothy Jacobs a104c82526 REST API: Add tax relation parameter to posts collection.
The REST API supports filtering by terms across multiple taxonomies using an AND relation. This adds support for an OR relation by adding "tax_relation=OR" as a query parameter.

Props earnjam.
Fixes #44326.


git-svn-id: https://develop.svn.wordpress.org/trunk@46646 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 23:12:44 +00:00
Aaron Jorbin 20d984f4c9 Remove Failing Tests added in r46641
The tests for good redirects send headers that we can't handle in the test suite, so let's just remove them.

Unprops Jorbin.
Fixes #44317.



git-svn-id: https://develop.svn.wordpress.org/trunk@46645 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 22:47:52 +00:00
John Blackbourn 27b67d5624 Docs: Fix some incorrect return tags in docblocks.
See #48303


git-svn-id: https://develop.svn.wordpress.org/trunk@46644 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 22:21:20 +00:00
Jake Spurlock 83366144b3 Coding Standards: Clean up the tests around `test_that_you_can_login_with_an_email_that_has_apostrophe`.
Let's use the proper coding standards for the comments.

Fixes #38744.
Props cafenoirdesign.


git-svn-id: https://develop.svn.wordpress.org/trunk@46643 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 22:16:27 +00:00
Jake Spurlock 922721c360 Toolbar: Use `add_node()` instead of `add_menu()` in core.
This patch replaces all references to the add_menu() method with the add_node() one. (Also some code structure modifications for wp_admin_bar_appearance_menu().)

Fixes: #19647
Props: linuxologos, paulschreiber, morganestes, akibjorklund, nacin, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@46642 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 22:12:32 +00:00
Aaron Jorbin 40946e984a General: wp_safe_redirect() and wp_redirect() shouldn't allow non-3xx status codes
Redirects should use redirect status codes and if you attempt to call wp_safe_redirect or wp_redirect with a non redirect status it can lead to undesired behavior and head scratching.

Fixes #44317.
Props spenserhale, johnbillion, mjnewman for initial patch.



git-svn-id: https://develop.svn.wordpress.org/trunk@46641 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 22:08:56 +00:00
Jake Spurlock 84c794ba41 Login and Registration: Allow email logins to be more flexible.
Allows a login to have an apostorphe. Which would normally be created as a mistake, but this allows the login to happen.

Fixes #38744
Props wpkuf, desrosj, socalchristina, bibliofille, santilinwp, nsubugak, sncoker, cafenoirdesign, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@46640 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 20:10:23 +00:00
Jonathan Desrosiers 9d88dbac58 External Libraries: Revert [46634-46635].
On further investigation, Plupload changed it’s license to a non-GPL compatible license. The newest, GPL compatible version is being used already in Core.

Unprops desrosj.
See #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46638 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 17:07:42 +00:00
Jonathan Desrosiers 6d413590b7 Customize: Formally deprecate unused Customizer classes.
The `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` PHP classes and `wp.customize.Menus.NewMenuControl` JS class were deprecated in 4.9 through [42034] with the intention of removing them in 5.0. Since more time has passed than originally intended, this change leaves `WP_Customize_New_Menu_Control` and `WP_Customize_New_Menu_Section` to prevent any potential backwards compatibility issues, and formally deprecates them. The `wp.customize.Menus.NewMenuControl` JS class is removed.

Props weston.ruter, matthias-reuter, jrf.
Fixes #42364.

git-svn-id: https://develop.svn.wordpress.org/trunk@46637 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 16:46:55 +00:00
Jonathan Desrosiers ab361359f6 Add `svn:auto-props` for `eol-style` and `mime-type` to `trunk`.
`svn:eol-style` and `svn:mime-type` property default values are now provided for all file types currently in `trunk`.

This also reverts the `eol-style` change to `wp-config-sample.php` made in [46586].

Fixes #42594.

git-svn-id: https://develop.svn.wordpress.org/trunk@46636 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 16:19:15 +00:00
Jonathan Desrosiers 0a9437d987 Remove unintended change to `svn:ignore` in [46634].
git-svn-id: https://develop.svn.wordpress.org/trunk@46635 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 15:32:04 +00:00
Jonathan Desrosiers 669e701a5b External Libraries: Update Plupload from 2.1.9 to 2.3.6.
This change also updates the MoxieJS dependency from 1.3.5 to 1.5.7, converts Plupload to a dependency in NPM, and integrates all relevant parts into the build process.

For a full list of upstream changes, see https://github.com/moxiecode/plupload/compare/v2.1.9...v2.3.6.

Props desrosj, hareesh-pillai.
Fixes #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46634 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 15:29:46 +00:00
Sergey Biryukov b0cdad744b General: Wrap the error message in `_deprecated_constructor()` in `<code>` tags instead of `<pre>`.
Props aftabmuni.
Fixes #48483.

git-svn-id: https://develop.svn.wordpress.org/trunk@46633 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 10:54:39 +00:00
Sergey Biryukov 358364e1ca Code Modernization: Call PHP 5 constructors in methods extending `POMO_Reader`.
Follow-up to [46629].

See #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46632 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:47:44 +00:00
Sergey Biryukov 74795ca384 Docs: Correct version number in `@deprecated` tags for PHP 4 constructors in `pomo/entry.php` and `pomo/streams.php`.
Follow-up to [46629].

Props jrf.
See #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46631 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:28:31 +00:00
Sergey Biryukov d3f486ed3f Docs: Correct `@see` references for PHP 4 constructors in `wp-includes/class-json.php`.
See #48252, #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46630 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:11:20 +00:00
Sergey Biryukov 168bb48084 Docs: Add missing `@deprecated` tags to PHP 4 constructors in `pomo/entry.php` and `pomo/streams.php`.
Props jrf.
Fixes #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46629 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:09:35 +00:00
Sergey Biryukov 095ef4a2a2 Twenty Eleven: Add missing `@deprecated` tag to PHP 4 constructor in `Twenty_Eleven_Ephemera_Widget`.
Props jrf.
See #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46628 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:06:55 +00:00
Sergey Biryukov dcced77dbb Docs: Add missing `@deprecated` tags to PHP 4 constructors in `WP_Widget` and `WP_Widget_Factory()`.
Correct version number in `_deprecated_constructor()` call in `WP_Widget_Factory()`, see [32990].

Props jrf.
See #48252.

git-svn-id: https://develop.svn.wordpress.org/trunk@46627 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-02 20:04:27 +00:00
Sergey Biryukov 00384f94db Docs: Update URLs in some `@link` tags and switch them to HTTPS.
Props tsuyoring.
Fixes #48479.

git-svn-id: https://develop.svn.wordpress.org/trunk@46626 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-01 14:55:51 +00:00
Sergey Biryukov 89621877f8 Code Modernization: Pass an appropriate error level to `trigger_error()` in `_doing_it_wrong()` and related functions:
* `_deprecated_function()`
* `_deprecated_argument()`
* `_deprecated_constructor()`
* `_deprecated_file()`

The error level passed is `E_USER_DEPRECATED` for the deprecated function group and `E_USER_NOTICE` for `_doing_it_wrong()`.

Props jrf.
Fixes #36561.

git-svn-id: https://develop.svn.wordpress.org/trunk@46625 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-01 00:39:04 +00:00