Commit Graph

47611 Commits

Author SHA1 Message Date
audrasjb
9fe7d42f6a Help/About: Use the new /documentation/ URLs for links about WordPress version.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/*` links with `/documentation/*` to avoid extra redirects.

Follow-up to [55412], [55413], [55414].

Props wildworks.
See #58052, #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 22:38:22 +00:00
audrasjb
3b39b2c99c Coding Standards: Use strict comparison in wp-admin/users.php.
Follow-up to [10990], [11162], [11217], [37059], [55592], [55622].
Props faisalahammad.
Fixes #58040.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 21:12:24 +00:00
audrasjb
69bbd538d5 Coding Standards: Use strict comparison in wp-admin/users.php.
Follow-up to [10990], [11162], [11217], [37059], [55592].
Props moinrrahmed.
Fixes #58056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 21:02:26 +00:00
Sergey Biryukov
24f3ba70f5 Upgrade/Install: Include the removed Windows Live Writer manifest in $_old_files.
This ensures that the file and a few related images are also removed from existing installations on update.

Follow-up to [55620].

Props ocean90.
Fixes #41404.
Built from https://develop.svn.wordpress.org/trunk@55621


git-svn-id: http://core.svn.wordpress.org/trunk@55133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 17:37:25 +00:00
Sergey Biryukov
e3360c89e2 General: Remove Windows Live Writer manifest file.
The XML manifest was originally added in WordPress 2.3.1 to turn on tagging support in Windows Live Writer.

Given that the last major release of the software came out in 2012, and it was completely discontinued in January 2017, including this file in core no longer provides any benefit.

Follow-up to [6192], [49904].

Props joostdevalk, ayeshrajans, flixos90, jhabdas, frank-klein, wtranch, SergeyBiryukov.
Fixes #41404.
Built from https://develop.svn.wordpress.org/trunk@55620


git-svn-id: http://core.svn.wordpress.org/trunk@55132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 14:56:22 +00:00
Bernhard Reiter
fbc006e2b2 HTML API: Add has_self_closing_flag() to Tag Processor.
In this patch we're adding `has_self_closing_flag()` to the HTML Tag Processor.
This exposes whether a currently-matched tag contains the self-closing flag `/`.

This information is critical for the evolution of the HTML API in order
to track and parse HTML structure, specifically, knowing whether an
HTML foreign element is self-closing or not.

Props dmsnell, zieladam.
Fixes #58009.
Built from https://develop.svn.wordpress.org/trunk@55619


git-svn-id: http://core.svn.wordpress.org/trunk@55131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-04 10:06:27 +00:00
Sergey Biryukov
6af7679802 Coding Standards: Correct the closing PHP tag placement in some admin files.
Follow-up to [1596], [1818], [11009], [16183], [16582], [16592].

Props faisalahammad, audrasjb.
Fixes #58053.
Built from https://develop.svn.wordpress.org/trunk@55618


git-svn-id: http://core.svn.wordpress.org/trunk@55130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-03 12:00:27 +00:00
Sergey Biryukov
a415951b8f Docs: Document default values for optional parameters in wp_insert_attachment().
This adds the missing mentions of default value for the `$file` and `$parent_post_id` parameters.

Follow-up to [2921], [3092], [3303], [3851], [6155], [6379], [8669], [15590], [28788], [38408], [49936], [55021].

Props wpfy.
Fixes #58043.
Built from https://develop.svn.wordpress.org/trunk@55617


git-svn-id: http://core.svn.wordpress.org/trunk@55129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-02 13:01:23 +00:00
Sergey Biryukov
df4ed4015a Coding Standards: Escape the whole attributes in wp-admin/includes/nav-menu.php.
It is best to always escape the complete value of an attribute, not a partial value, as otherwise the escaping could be (partially) undone when the values are joined together.

While the hardcoded prefix/suffix values in this case don't necessarily create that risk, those may change to values which could be problematic, so making it a habit to escape the value in one go is best practice.

Includes:
* Moving a few `esc_url()` calls closer to the actual output and escaping the hash parts too.
* Wrapping a few long lines for better readability.

Follow-up to [14248], [23707], [42217], [55615].

Props jrf, SergeyBiryukov.
Fixes #57110.
Built from https://develop.svn.wordpress.org/trunk@55616


git-svn-id: http://core.svn.wordpress.org/trunk@55128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-04-01 08:37:20 +00:00
Sergey Biryukov
6ccbf0e9bc Coding Standards: Escape some variables in wp-admin/includes/nav-menu.php.
This ensures that post type or taxonomy name is consistently escaped in:
* `wp_nav_menu_item_post_type_meta_box()`
* `wp_nav_menu_item_taxonomy_meta_box()`

Follow-up to [14248], [23707].

Props zenaulislam, SergeyBiryukov.
Fixes #57110.
Built from https://develop.svn.wordpress.org/trunk@55615


git-svn-id: http://core.svn.wordpress.org/trunk@55127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-31 16:00:25 +00:00
Sergey Biryukov
7714010f60 Comments: Use correct escaping function in get_cancel_comment_reply_link().
Follow-up to [9112], [9406], [11011], [11380], [11383], [44659].

Props chintan1896, ankitmaru.
Fixes #58025.
Built from https://develop.svn.wordpress.org/trunk@55614


git-svn-id: http://core.svn.wordpress.org/trunk@55126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-30 15:18:17 +00:00
spacedmonkey
5219039dd3 Tests: Fix tests introduced in [55612].
In [55612] a change was added that made two unit tests fail. Fix these test by forcing `get_merged_data` method to run.  

Props spacedmonkey, mukesh27.
See #57814.
Built from https://develop.svn.wordpress.org/trunk@55613


git-svn-id: http://core.svn.wordpress.org/trunk@55125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-30 12:17:21 +00:00
spacedmonkey
dd5f6c7b10 Script Loader: Return early in _wp_theme_json_webfonts_handler if theme.json not present.
Check to see if the theme.json file exists before processing the rest of the code in `_wp_theme_json_webfonts_handler`. This improves performance by not trying to parse the theme.json, early in the bootstrap process. 

Props spacedmonkey, hellofromTonya, flixos90.
Fixes #57814.
Built from https://develop.svn.wordpress.org/trunk@55612


git-svn-id: http://core.svn.wordpress.org/trunk@55124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-30 11:08:21 +00:00
spacedmonkey
2da45425ae Options, Meta APIs: Improve the lazy loading meta API to include current object id.
The existing lazy loading meta api, creates a queue of ids, to be primed, if the `get_comment_meta` or `get_term_meta` functions are called. However, it did not check to see if the requested id was in the queue, before prime all the ids in the queue. Now, it adds the id to the queue, is not already in the queue, saving a cache lookup / database query. 

Props spacedmonkey, peterwilsoncc, mukesh27, flixos90.
Fixes #57901.
Built from https://develop.svn.wordpress.org/trunk@55608


git-svn-id: http://core.svn.wordpress.org/trunk@55120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-29 10:50:18 +00:00
spacedmonkey
90b94aeddc Comments: Use wp_cache_get_multiple in WP_Comment_Query.
In the `fill_descendants` method in `WP_Comment_Query`, there is a loop the calls `wp_cache_get` to get `child comments. Instead of getting one key at a time, use `wp_cache_get_multiple` and get all keys at once.

Props spacedmonkey, tillkruess, mukesh27.
Fixes #57803.
Built from https://develop.svn.wordpress.org/trunk@55607


git-svn-id: http://core.svn.wordpress.org/trunk@55119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-29 10:20:20 +00:00
Sergey Biryukov
f940bc822d Coding Standards: Apply various alignment corrections from composer format.
This fixes a few WPCS warnings along the lines of:
* Array double arrow not aligned correctly
* Equals sign not aligned with surrounding statements
* Usage of ELSE IF is discouraged; use ELSEIF instead

Follow-up to [55099], [55192], [55194], [55271].

Props davidbaumwald, jrf, SergeyBiryukov.
Fixes #57994.
Built from https://develop.svn.wordpress.org/trunk@55606


git-svn-id: http://core.svn.wordpress.org/trunk@55118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-29 07:13:23 +00:00
hellofromTonya
08e9393f23 Help/About: Make Field Guide link translatable.
On the About page, wraps the Field Guide's link in `__()` to provide a localized field guide, when available.

Follow-up to [55600].

Props davidbaumwald, sergeybiryukov, desrosj, javiercasares, oglekler, mukesh27, clorith, eboxnet, costdev, ocean90.
Fixes #57477.
Built from https://develop.svn.wordpress.org/trunk@55601


git-svn-id: http://core.svn.wordpress.org/trunk@55113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 15:36:18 +00:00
hellofromTonya
7237836b1a Help/About: Add Field Guide link.
In the About page, replaces the `#` placeholder with the link to the Field Guide.

Follow-up to [55573], [55449], [55499], [55545].

Props vladytimy, ocean90.
Fixes #57998.
Built from https://develop.svn.wordpress.org/trunk@55600


git-svn-id: http://core.svn.wordpress.org/trunk@55112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 15:14:19 +00:00
hellofromTonya
b1d826fb6e Date/Time: Revert [55054].
This changeset introduced a regression for partial-hour timezones such as +05:30 UTC which is India and Sri Lanka. How? These timezones are in float. The change made in [55054] type casted them to integer which dropped the decimal for the partial-hour, making the time inaccurate. For example, +05:30 UTC (India and Sri Lanka)'s `'gmt_offset'` is `5.5`, but with the changeset, it was changed to `5`.

Reverting the changeset restores the original state of `current_time()` and thus resolves the regression.

Props reputeinfosystems, Rarst, hellofromTonya, desrosj, audrasjb, sergeybiryukov, costdev, priethor, francina, nekojonez, codingchicken, cbringmann.
See #57035.
Fixes #57998.
Built from https://develop.svn.wordpress.org/trunk@55598


git-svn-id: http://core.svn.wordpress.org/trunk@55110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 14:22:21 +00:00
Sergey Biryukov
f0f0173e40 Docs: Use typed array notation for search_columns in WP_Query::parse_query().
Follow-up to [55248].

Props tmatsuur.
Fixes #57996.
Built from https://develop.svn.wordpress.org/trunk@55597


git-svn-id: http://core.svn.wordpress.org/trunk@55109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 10:56:23 +00:00
Dion Hulse
5ce81844a8 Coding Standards: Use the correct variable.
Follow-up to [55593].

See #57318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-28 05:34:21 +00:00
Sergey Biryukov
79d6ac7fd7 Docs: Clarify the ::hide_process_failed() return value in plugin and theme installer.
Follow-up to [48390].

Props sakibmd, jrf, patelmohip, akmelias.
Fixes #57680.
Built from https://develop.svn.wordpress.org/trunk@55595


git-svn-id: http://core.svn.wordpress.org/trunk@55107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-27 15:11:20 +00:00
Sergey Biryukov
b7ef3ffdd3 Docs: Add missing @return tag for WP_Automatic_Updater::is_disabled().
Follow-up to [25421], [25823], [25859].

Props sakibmd, jrf, patelmohip, akmelias.
See #57680.
Built from https://develop.svn.wordpress.org/trunk@55594


git-svn-id: http://core.svn.wordpress.org/trunk@55106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-27 14:13:22 +00:00
Sergey Biryukov
7127052046 Coding Standards: Use strict comparison in wp-admin/includes/nav-menu.php.
Follow-up to [14248], [15008], [37748].

Props jenilk, johnbillion.
Fixes #57318.
Built from https://develop.svn.wordpress.org/trunk@55593


git-svn-id: http://core.svn.wordpress.org/trunk@55105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-26 10:06:18 +00:00
Sergey Biryukov
95a52be05d Coding Standards: Use strict comparison in wp-admin/includes/user.php.
Follow-up to [10990], [11162], [11217], [37059].

Props jenilk.
Fixes #57317.
Built from https://develop.svn.wordpress.org/trunk@55592


git-svn-id: http://core.svn.wordpress.org/trunk@55104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-25 15:25:26 +00:00
Sergey Biryukov
7278aadd72 Tests: Split the tests from post/template.php into individual test classes.
This aims to bring some consistency to the location of post template function tests, as well as to make the tests more discoverable and easier to expand.

Includes:
* Adding `@covers` tags.
* Renaming `get_post_parent()` and `has_post_parent()` tests to match the names of the functions.

Follow-up to [28398], [31522], [34654], [34950], [50127], [50396], [54717], [54726], [55590].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55591


git-svn-id: http://core.svn.wordpress.org/trunk@55103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-24 17:12:21 +00:00
Sergey Biryukov
33346784dc Tests: Move wp_dropdown_pages() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Includes removing a basic test hidden among `get_pages()` tests, as there is already a more comprehensive set of tests available.

Follow-up to [1279/tests], [28399], [31338].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55590


git-svn-id: http://core.svn.wordpress.org/trunk@55102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-24 16:14:22 +00:00
Sergey Biryukov
d32720d67c Tests: Add a @ticket reference for wp_list_pages() CSS classes test.
Follow-up to [55588].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55589


git-svn-id: http://core.svn.wordpress.org/trunk@55101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-24 15:07:21 +00:00
Sergey Biryukov
a9e3cb71bb Tests: Move the wp_list_pages() test for CSS classes to a more appropriate place.
Back when this test was introduced, `wp_list_pages()` did not have its own test class.

It does now, so the test can be moved there, instead of being hidden among `get_pages()` tests.

Includes:
* Updating the test name for clarity.
* Adding an unique message for each assertion.

Follow-up to [27755], [28400].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55588


git-svn-id: http://core.svn.wordpress.org/trunk@55100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-24 15:00:28 +00:00
audrasjb
1764cee3d1 Login and Registration: Revert [55358] and [55360].
This reverts the changes implemented in [55358] and [55360].

Changeset [55358] was committed to prevent login name collision when one user registers with the email address `user@example.com` and a second user tries to register with the username `user@example.com`. However, it also introduced a potential backward compatibility issues for plugins that use `wp_update_user()`. When updating an existing user, it throws an `existing_user_email_as_login` error if the email address is also used for the user login, due to the code introduced in [55358].

This changeset removes the new scenario added in [55358] and [55360], restoring the `wp_insert_user()` function back to its previous state.

Props polevaultweb, audrasjb, costdev, peterwilsoncc, hellofromTonya, SergeyBiryukov, azaozz.
See #57967, #57394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-23 13:54:23 +00:00
Sergey Biryukov
a0fdeb36dd Tests: Improve get_pages() tests organization.
Includes:
* Renaming some tests for clarity.
* Moving some tests to a more appropriate place.
* Moving the `@covers` tag to the top of the class.
* Using consistent formatting for assertion messages.

Follow-up to [27767], [41849], [44587], [55569].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55583


git-svn-id: http://core.svn.wordpress.org/trunk@55095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-23 11:37:23 +00:00
audrasjb
1b393fbb15 Login and Registration: Fix margin for language switcher button on small screens.
This fixes an alignement issue on small screens in the language switcher button displayed on the Login screen.

Follow-up to [52058], [52417].

Props sabernhardt.
Fixes #57617.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-22 12:50:18 +00:00
Sergey Biryukov
93a4991c01 Tests: Consistently sanitize expiration in the test suite's Memcached implementation.
In a previous commit, the `::sanitize_expiration()` call in the `::add()` method was moved closer to where the value is used.

This commit does the same for the other methods:
* `::cas()`
* `::replace()`
* `::set()`
* `::setMulti()`

Follow-up to [40561], [55577].

See #57841, #57963.
Built from https://develop.svn.wordpress.org/trunk@55581


git-svn-id: http://core.svn.wordpress.org/trunk@55093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-22 09:27:23 +00:00
hellofromTonya
f28f9194e2 Code Modernization: Fix dynamic properties in WP_Admin_Bar.
To fix the dynamic properties, the following changes are included:
* Removes `WP_Admin_Bar::__get()`.
* Declares `menu` as a property on the class, deprecates it, and initializes it to an empty array.
* Removes the unused 'proto' dynamic property.

Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

== Why remove the `WP_Admin_Bar::__get()` magic method?

tl;dr
The magic method is no longer needed.

The magic method only handled the `menu` and `proto` dynamic properties. Introducing a full set of magic methods is overkill for this class. Instead of having to maintain magic methods, this changeset instead directly addresses the 2 properties (see below).

== Why declare the `menu` property on the class?

tl;dr
To simplify the code while maintaining backwards compatibility for extenders who are using this deprecated property.

The `menu` property was introduced during the 3.1.0 ''development cycle'' as a declared property [15671]. Its purpose was to ''internally'' hold the menu structure.

During the WP 3.3.0 development cycle, it was replaced by a new `private` property called `nodes` (see [19120]).

But breakage reports from extenders caused it to be restored. [19501] added the `__get()` magic method, i.e. for handling it as a dynamic property, and deprecated it.

>We're not going to maintain compat for $menu. Suggest we make it array() and plugins will have to deal. We can throw a _deprecated_argument() and push them to use the new methods.
~ Source: [https://core.trac.wordpress.org/ticket/19371#comment:17 see #19371 comment 17]

[https://wpdirectory.net/search/01GSTW1X69TBN8FH3SY7V8KPY5 A search of the wp.org plugins and themes repository] shows that a few plugins are still using this deprecated property. To maintain backwards compatibility, `menu` is moved back to the class as a declared property, set to an empty array (as it's been since 3.3.0), and deprecated in the property's description.

== Why remove the `proto` dynamic property?

tl;dr
* It was not intended to be released in 3.1.
* There are no usages of it in Core or in the WP.org's plugin or theme directories.
* It should be safe to remove.

This property was first introduced in the WP 3.1.0 ''development cycle'' to replace the `PROTO` constant (see [16038]) for protocol handling for the admin bar's hyperlinks. [16077] replaced the property's usages with URL functions such as `get_admin_url()` and `admin_url()`. But it missed removing the property, which was no longer needed or used.

It was relocated to the `__get()` magic method as a dynamic property when the `menu` property was restored (see [19501]).

A search of WP.org's plugins and themes repositories shows no usages of the property. Core hasn't used it since the removed in [16038] before 3.1 final release. It should be safe to remove it, but committing very early in the 6.3 alpha cycle to give time for reports of usages, if there are any.

References:
* A [https://www.youtube.com/watch?v=vDZWepDQQVE&t=9362s live open public working session] where these changes were discussed and agreed to.
* [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties].

Follow-up to [19501], [19120], [16308], [16038], [15671].

Props antonvlasenko, hellofromTonya, jrf, markjaquith, desrosj, ironprogrammer, peterwilsoncc, SergeyBiryukov.
See #56876, #56034.
Built from https://develop.svn.wordpress.org/trunk@55580


git-svn-id: http://core.svn.wordpress.org/trunk@55092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 20:00:19 +00:00
spacedmonkey
e30068eb49 Build/Test Tools: Fix issue with add method in object-cache.php.
In the object-cache.php file used for unit tests, the add method did not work as expected. Other object cache plugins and core, have a check to see if the key exists in memory before writing it. Without this check, it used to write unnecessarily to the cache.  

Props spacedmonkey, SergeyBiryukov.
Fixes #57963.
Built from https://develop.svn.wordpress.org/trunk@55577


git-svn-id: http://core.svn.wordpress.org/trunk@55089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 17:02:19 +00:00
ryelle
cee125e1f4 Administration: Update dashboard welcome panel colors, remove broken link
Remove the green background from the "dot" accent, to prevent low contrast for the dismiss button. Use menu colors for the background on alternate color schemes. Remove the "Edit styles" link as there is no longer a direct link to the global styles section of the site editor.

Follow-up to [55451].

Props sabernhardt, ryokuhi, laurlittle, richtabor.
Fixes #57759.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 15:37:21 +00:00
ryelle
1aba63dc46 Help/About: Updates to About page.
Remove link to release video, update split controls image.

Follow-up to [55449], [55499], [55545].

Props laurlittle, richtabor.
Fixes #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 15:27:19 +00:00
hellofromTonya
9f559f452a Tests: Rename test class and improve tests for wp_get_global_stylesheet().
Changes include:
* Renames the test class to be compliant with test coding standards.
* Converts the test class to extend `WP_Theme_UnitTestCase` to reuse test fixtures.
* Implements data providers to encapsulate datasets and reduce code repetition.
* Adds a `@covers` annotation.
* Improves assertion messages to help with diagnosing failed tests.

Follow-up to [55567], [55148], [52682], [53916], [52675-52677].

Props costdev, hellofromTonya.
See #57841, #57958.
Built from https://develop.svn.wordpress.org/trunk@55572


git-svn-id: http://core.svn.wordpress.org/trunk@55084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 13:54:22 +00:00
Sergey Biryukov
94a1aed064 Coding Standards: Remove unused variable in WP_Plugins_List_Table::single_row().
Follow-up to [47835], [48669].

Props azouamauriac.
Fixes #55132.
Built from https://develop.svn.wordpress.org/trunk@55571


git-svn-id: http://core.svn.wordpress.org/trunk@55083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 13:27:21 +00:00
spacedmonkey
7dde8c4440 Posts, Post Types: Use WP_Query internally in get_pages.
Convert `get_pages` to use `WP_Query` internally. Using WP_Query means that a lot of code has been removed however existing parameters supported by get_pages are transformed in to query arguments. The custom caching solution found in the old version of this function is replaced with the caching found in WP_Query (added in [53941]). This change adds consistency to the codebase, as improvements and changes to `WP_Query` will filter down to the `get_pages` function. 

Props mikeschinkel, spacedmonkey, nacin, scribu, filosofo, jane, garyc40, markoheijnen, grandslambert, kevinB, wlindley, dbernar1, atimmer, mdawaffe, helen, benjibee, johnbillion, peterwilsoncc, costdev, flixos90, joemcgill.
Fixes #12821.
Built from https://develop.svn.wordpress.org/trunk@55569


git-svn-id: http://core.svn.wordpress.org/trunk@55081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 12:49:18 +00:00
hellofromTonya
90b5db421c Editor: Update @wordpress packages for 6.2 RC3.
Updates the `@wordpress` packages to include the fixes for these regressions introduced in the 6.2 cycle:

* [Regression] Navigation Block: Category/Custom taxonomy links are not searchable in the Link inserter [https://github.com/WordPress/gutenberg/pull/49126 Gutenberg PR 49126]. See #57929 
* [Regression] Post Editor: List View has no close button on mobile viewports [https://github.com/WordPress/gutenberg/pull/49200 Gutenberg PR 49200] 

References:
* [811da1ab3a Packages x.3.11 publish commit].

Follow-up to [55548].

Props andraganescu, costdev, get_dave, hellofromTonya, mamaduka, ntsekouras, scruffian, talldanwp, thomask.
See #57471.
Fixes #57929.
Built from https://develop.svn.wordpress.org/trunk@55568


git-svn-id: http://core.svn.wordpress.org/trunk@55080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-21 12:43:46 +00:00
hellofromTonya
69a5893569 Tests: Add test class for wp_enqueue_stored_styles().
[54214] added the `wp_enqueue_stored_styles()` tests and `clean_up_global_scope()` reset global method to `Tests_Theme_wpGetGlobalStylesheet`.

This changeset relocates those tests a new test class specifically for `wp_enqueue_stored_styles()` and removes `Tests_Theme_wpGetGlobalStylesheet::clean_up_global_scope()` method.

Why not relocate the `clean_up_global_scope()` method to the new test class?
The test class extends from `WP_Theme_UnitTestCase` which includes this method.

Follow-up to [54214], [54703].

Props costdev.
See #57841.
Built from https://develop.svn.wordpress.org/trunk@55567


git-svn-id: http://core.svn.wordpress.org/trunk@55079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-20 18:22:19 +00:00
Sergey Biryukov
fc43b28dec Cache API: Correct the second parameter's name in _get_non_cached_ids().
The parameter represents the cache group, not the cache key.

Follow-up to [19918].

Props johnjamesjacoby, spacedmonkey.
Fixes #40420.
Built from https://develop.svn.wordpress.org/trunk@55566


git-svn-id: http://core.svn.wordpress.org/trunk@55078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-20 16:42:19 +00:00
hellofromTonya
5b0a2e6d06 Tests: Add test class for wp_script_is().
Changes:
* Adds a test class for `wp_script_is()`.
* Moves `WP_Dependencies_jQuery::test_wp_script_is_dep_enqueued()` into this test class and splits it into 2 separate tests, happy and unhappy paths.
* Adds `WP_Scripts::query` `@covers`, as `wp_script_is()` is helper function for it.
* Relocates the global resetting from the test method to the `clean_up_global_scope()` method.

Follow-up to [52010], [29252].

Props hellofromTonya, antonvlasenko.
See #57841, #57958.
Built from https://develop.svn.wordpress.org/trunk@55565


git-svn-id: http://core.svn.wordpress.org/trunk@55077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-20 16:18:20 +00:00
Sergey Biryukov
6740fd5821 KSES: Allow filter property to accept a URL in safecss_filter_attr().
CSS filters can accept `url()` as a reference to an SVG filter element:
{{{
filter: url( file.svg#filter-element-id );
}}}
This commit allows for that syntax to be used in inline CSS.

Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/48281 #48281 Duotone: Use the style engine to generate CSS for Duotone]

References:
* [https://developer.mozilla.org/en-US/docs/Web/CSS/filter MDN Web Docs: filter()]
* [https://developer.mozilla.org/en-US/docs/Web/CSS/url MDN Web Docs: url()]

Follow-up to [44136], [52049].

Props scruffian, jeryj, ironprogrammer, azaozz, hellofromTonya, SergeyBiryukov.
Fixes #57780.
Built from https://develop.svn.wordpress.org/trunk@55564


git-svn-id: http://core.svn.wordpress.org/trunk@55076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-20 08:25:22 +00:00
Sergey Biryukov
4630e311e7 Tests: Improve documentation and variable names in some formatting tests.
Includes documenting data provider values using hash notation in the tests for:
* `convert_smilies()`
* `get_url_in_content()`
* `links_add_target()`
* `normalize_whitespace()`

Follow-up to [26191], [26327], [26328], [26972], [55562].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55563


git-svn-id: http://core.svn.wordpress.org/trunk@55075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-19 12:53:17 +00:00
Sergey Biryukov
77fe35a423 Tests: Use the data_ prefix for various data provider methods.
This aims to bring more consistency to the test suite, as the vast majority of data providers already use that prefix.

Includes moving some data providers next to the tests they are used in.

Follow-up to [55464].

See #57841.
Built from https://develop.svn.wordpress.org/trunk@55562


git-svn-id: http://core.svn.wordpress.org/trunk@55074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-19 12:05:21 +00:00
joedolson
d49897485b Editor: Show scheduled text when changing to new future dates.
In the classic editor, fix the publish status change text shown when a future post's date is changed to a different future date. Show 'scheduled' statement instead of 'publish' statement.

Props tyxla, sdavis2702, joedolson.
Fixes #31040.
Built from https://develop.svn.wordpress.org/trunk@55561


git-svn-id: http://core.svn.wordpress.org/trunk@55073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-18 16:35:18 +00:00
joedolson
514460e505 Quick/Bulk Edit: Show scheduled in status for future drafts.
Change the quick edit status `select` to use the 'Scheduled' status instead of the 'Published' status or posts where the date is in the future. 

Props ipstenu, MrFlannagan, sabernhardt, oglekler.
Fixes #38834.
Built from https://develop.svn.wordpress.org/trunk@55560


git-svn-id: http://core.svn.wordpress.org/trunk@55072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-18 15:47:24 +00:00
Sergey Biryukov
123b819f4f Coding Standards: Remove unused variables in WP_Comment_Query.
* `$unapproved_ids` and `$unapproved_emails` in `WP_Comment_Query::get_comment_ids()` were added in [29965] and appear to never have been used.
* `$wpdb` in `WP_Comment_Query::fill_descendants()` was replaced with `$this->db` in [38275], removed in [38446], and accidentally reinstated in [38768].

Follow-up to [29965], [34546], [37625], [38275], [38446], [38768], [44546].

Props upadalavipul, dingo_d, audrasjb, SergeyBiryukov.
Fixes #57482.
Built from https://develop.svn.wordpress.org/trunk@55559


git-svn-id: http://core.svn.wordpress.org/trunk@55071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-18 12:34:21 +00:00