Commit Graph

45757 Commits

Author SHA1 Message Date
Sergey Biryukov
a42b89fc71 REST API: Some documentation and test improvements for update_menu_item_cache():
* Make the function description more specific, for consistency with other similar functions.
* Add a `@since` note for the `$update_menu_item_cache` parameter of `WP_Query::parse_query()`.
* Add missing `@covers` tags for the unit tests.

Follow-up to [53504].

See #55620.
Built from https://develop.svn.wordpress.org/trunk@53508


git-svn-id: http://core.svn.wordpress.org/trunk@53097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-15 13:37:10 +00:00
Sergey Biryukov
84a8194200 REST API: Some documentation and test improvements for update_post_parent_caches():
* Make the function description more specific, for consistency with `update_post_author_caches()`.
* Add missing `@covers` tags for the unit test.

Follow-up to [53506].

See #55593.
Built from https://develop.svn.wordpress.org/trunk@53507


git-svn-id: http://core.svn.wordpress.org/trunk@53096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-15 13:19:10 +00:00
spacedmonkey
2c8a6170af REST API: Prime caches for post parents in post REST API controller.
Prime caches for all post parents in the post REST API controller using the `_prime_post_caches` function. Post parent objects are required as part of the `check_read_permission` method’s permission check in post REST API controller. 

Props spacedmonkey, furi3r, peterwilsoncc, mitogh, madpixels. 
Fixes #55593.
Built from https://develop.svn.wordpress.org/trunk@53506


git-svn-id: http://core.svn.wordpress.org/trunk@53095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-15 10:43:10 +00:00
Sergey Biryukov
ab5cc35046 Database: Don't translate the "WordPress database error" message in the error log.
When using multilingual websites, this string could end up with multiple different translations in the error log, making it less actionable.

Unlike errors displayed to the user, a general consensus for software is that errors in logs should always be in English. Since MySQL errors are also returned in English, this brings more consistency to the logs.

Follow-up to [6391], [8168], [19760].

Props malthert.
Fixes #53125.
Built from https://develop.svn.wordpress.org/trunk@53505


git-svn-id: http://core.svn.wordpress.org/trunk@53094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-15 10:36:09 +00:00
spacedmonkey
991acc48d4 REST API: Prime caches for linked objects in menu item REST API controller.
Add a new parameter to `WP_Query` called `update_menu_item_cache` that when set to true, primes the caches for linked terms and posts for menu item post objects. This change moves logic 
found in `wp_get_nav_menu_items` into a new function called `update_menu_item_cache`.  Update the menu item REST API controller, to pass the `update_menu_item_cache` parameter to the 
arguments used for the  `WP_Query` run to get menu items. 

Props furi3r,  TimothyBlynJacobs, spacedmonkey, peterwilsoncc, mitogh.
Fixes #55620.

 --This line, and those below, will be ignored--

M    src/wp-includes/class-wp-query.php
M    src/wp-includes/nav-menu.php
M    src/wp-includes/rest-api/endpoints/class-wp-rest-menu-items-controller.php
M    tests/phpunit/tests/post/nav-menu.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@53093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-15 10:20:13 +00:00
Sergey Biryukov
73a2d87eae Docs: Add a comment for stripping the leading AND from SQL clauses in some query classes.
Follow-up to [30084], [34529], [34542], [36598], [37477], [37572], [43010].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53503


git-svn-id: http://core.svn.wordpress.org/trunk@53092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 16:17:08 +00:00
Sergey Biryukov
cacf46f12b Docs: Add a missing word in pre_months_dropdown_query filter description.
Follow-up to [50163].

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53502


git-svn-id: http://core.svn.wordpress.org/trunk@53091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 15:07:10 +00:00
Sergey Biryukov
3f74637dfe I18N: Use a translatable string for displaying a user's first name and last name.
That allows locales to switch the order of the first name and last name, should they prefer to do so.

The string was previously used in `wp_insert_user()` and is now reused in other places for consistency:

* `WP_MS_Users_List_Table::column_name()`​
* `WP_Users_List_Table::column_name()​`
* `wp_list_authors()`
* `wp_list_users()`

Note: This also removes the `wp_list_author_full_name` filter, introduced for the same purpose in `wp_list_authors()`, as redundant for now.

Follow-up to [53486].

See #17025.
Built from https://develop.svn.wordpress.org/trunk@53501


git-svn-id: http://core.svn.wordpress.org/trunk@53090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 14:43:12 +00:00
desrosj
cc05e7b608 External Libraries: Upgrade PHPMailer to version 6.6.2.
Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.6.2.

For a full list of changes in this update, see the PHPMailer GitHub: https://github.com/PHPMailer/PHPMailer/compare/v6.6.0...v6.6.2.

Props ayeshrajans, jrf.
Fixes #55976.
Built from https://develop.svn.wordpress.org/trunk@53500


git-svn-id: http://core.svn.wordpress.org/trunk@53089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 14:38:10 +00:00
spacedmonkey
77f62c11db REST API: Prime caches for featured images in post controller.
Ensure that featured image caches are primed for post collections in the post REST API controller, by calling the `update_post_thumbnail_cache` function. 

Props Spacedmonkey, TimothyBlynJacobs, mitogh.
Fixes #55592. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@53088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 13:10:10 +00:00
spacedmonkey
7df9ba26b2 REST API: Avoid duplicated query in post collections.
Avoid duplicated query when retrieving empty posts collections by adding a check if the page is more than 1. 

Props furi3r, gdetassigny, TimothyBlynJacobs, spacedmonkey. 
Fixes #55677.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 12:42:10 +00:00
Sergey Biryukov
c7ab92451a Tests: Remove redundant skip call in Tests_Image_Functions::get_image_editor_engine_classes().
The test bootstrap requires GD to be available, so this test skip condition will never be matched.

Also, test skipping from within a helper method, which may be used in a data provider, can lead to test runtime errors.

Follow-up to [49009], [49014], [49535], [49571], [51415].

Props jrf.
See #55652.
Built from https://develop.svn.wordpress.org/trunk@53497


git-svn-id: http://core.svn.wordpress.org/trunk@53086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 11:46:09 +00:00
spacedmonkey
47a8b2f5de Taxonomy: Fix caching issues in WP_Term_Query class.
Introduced [52836] when passing `child_of` or `pad_counts` parameters to `get_terms` or `WP_Term_Query` class, the array of terms received by the query, was not correctly cached. This 
change simplifies the logic in `WP_Term_Query` and ensures terms are correctly cached. This change also, improves performance, by only caching an array of term ids where possible.  

Props denishua, spacedmonkey, oztaser, peterwilsoncc, SergeyBiryukov, georgestephanis, jnz31, knutsp, mukesh27, costdev.
Fixes #55837.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-14 11:43:13 +00:00
Sergey Biryukov
e3e0bb1183 Tests: Move helper functions in Tests_Image_Functions to more appropriate places.
* Move a non-test specific helper function used by multiple tests up to the top of the class to make it more easily discoverable.
* Move a test-specific helper function used by only one test to be directly below the test using the helper function and make the link with the test explicit by adding a `@see` tag.

Follow-up to [1201/tests], [51415].

Props jrf.
See #55652.
Built from https://develop.svn.wordpress.org/trunk@53495


git-svn-id: http://core.svn.wordpress.org/trunk@53084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-13 16:44:10 +00:00
Sergey Biryukov
30a9e469b8 Tests: Rename classes in phpunit/tests/option/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265], [53489].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53494


git-svn-id: http://core.svn.wordpress.org/trunk@53083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-13 15:26:10 +00:00
Sergey Biryukov
ca2e67d1b0 Tests: Add a unit test for PHP 8.1 deprecation notice in wp_user_settings().
This ensures that PHP 8.1 "passing null to non-nullable" deprecation notice is not thrown for the `$domain` parameter of `setcookie()` calls in the function.

Follow-up to [53490].

See #54914.
Built from https://develop.svn.wordpress.org/trunk@53493


git-svn-id: http://core.svn.wordpress.org/trunk@53082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-13 15:22:10 +00:00
Sergey Biryukov
e3e07d2751 Tests: Use more consistent wording when referring to PHP deprecation notices.
Follow-up to [51619], [51695].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53492


git-svn-id: http://core.svn.wordpress.org/trunk@53081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-13 14:53:11 +00:00
Sergey Biryukov
c12b446f41 Tests: Use a consistent URL in HTTP response cookie tests.
Follow-up to [34369], [35734], [38164].

See #51568.
Built from https://develop.svn.wordpress.org/trunk@53491


git-svn-id: http://core.svn.wordpress.org/trunk@53080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-12 15:18:10 +00:00
Sergey Biryukov
6151fddb6c Code Modernization: Pass correct default value to setcookie() in wp_user_settings().
The `wp_user_settings()` function calls the PHP native `setcookie()` function, the fifth parameter of which is the ''optional'' `$domain` parameter which expects a `string`.

A parameter being optional, however, does not automatically make it nullable.

As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice.

In this case, this function call yielded a `setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated` notice.

Changing the `null` to an empty string fixes this without a backward compatibility break.

References:
* [https://www.php.net/manual/en/function.setcookie.php PHP Manual: setcookie()]
* [https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg PHP RFC: Deprecate passing null to non-nullable arguments of internal functions]

Follow-up to [29478].

Props ocean90, shenyanzhi, meysamnorouzi, jrf.
Fixes #54914.
Built from https://develop.svn.wordpress.org/trunk@53490


git-svn-id: http://core.svn.wordpress.org/trunk@53079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-12 11:11:11 +00:00
Sergey Biryukov
97eff9b7b2 Tests: Rename classes in phpunit/tests/user/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53489


git-svn-id: http://core.svn.wordpress.org/trunk@53078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-11 15:50:08 +00:00
Sergey Biryukov
df324b9ff6 Tests: Re-initialize WP_Rewrite before running wp_list_authors() tests.
This ensures that the expected results use the default permalink structure, not affected by other tests.

Follow-up to [27550], [27684], [53487].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53488


git-svn-id: http://core.svn.wordpress.org/trunk@53077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-11 15:36:13 +00:00
Sergey Biryukov
193a959806 Tests: Rename the test file and class for wp_list_authors() tests.
This matches the name of the function being tested.

Follow-up to [27550].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53487


git-svn-id: http://core.svn.wordpress.org/trunk@53076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-11 13:43:13 +00:00
audrasjb
df0d910007 Query: Add a hook to filter author full name from wp_list_authors().
This changeset introduces the `wp_list_author_full_name` hook to allows developers to filter author full name, which by default is a combinaison of the author first and last name, separated by a space.

Props kevinB, wonderboymusic, DrewAPicture, nacin, Mte90, jorbin, afercia, rafiahmedd.
Fixes #17025.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 18:23:18 +00:00
spacedmonkey
c8f31dc0c0 REST API: Improve post cache priming in WP_REST_Post_Search_Handler class.
In the `WP_REST_Post_Search_Handler` class, ensure that post, post meta and term caches are correctly primed when performing a search.

Props furi3r, spacedmonkey, TimothyBlynJacobs, audrasjb, peterwilsoncc. 
Fixes #55674.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 15:47:08 +00:00
Sergey Biryukov
a29c6663fd Docs: Use typed array notation in some post function DocBlocks:
* `wp_queue_posts_for_term_meta_lazyload()`
* `_prime_post_caches()`

See #55646.
Built from https://develop.svn.wordpress.org/trunk@53484


git-svn-id: http://core.svn.wordpress.org/trunk@53073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 15:22:11 +00:00
Sergey Biryukov
9e01bd8adc Query: Some documentation and test improvements for update_post_author_caches():
* Make the descriptions for `update_post_author_caches()` and `update_post_caches()` more specific.
* Move the unit test into its own file, for consistency with `update_post_cache()` tests. This also allows for using shared fixtures in case more tests are added in the future.

Follow-up to [53482].

See #55716.
Built from https://develop.svn.wordpress.org/trunk@53483


git-svn-id: http://core.svn.wordpress.org/trunk@53072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 15:17:10 +00:00
spacedmonkey
2237f67458 Prime users cache in WP_Query and post REST API controller.
For a call to `WP_Query` or a post REST API request that contains posts from multiple authors, call the `cache_users` function, to ensure that all user data for post authors is primed in 
a single database query. This results in far fewer database queries on multiple author sites. 

Props spacedmonkey, timothyblynjacobs, peterwilsoncc.
Fixes #55716.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-10 13:39:11 +00:00
Sergey Biryukov
558cd4c353 Media: Some documentation and test improvements for wp_img_tag_add_decoding_attr():
* Add a `@since` note for the `decoding` attribute in `wp_get_attachment_image()`.
* Adjust `wp_img_tag_add_decoding_attr()` DocBlocks per the documentation standards.
* Wrap some long `sprintf()` calls in unit tests for better readability. In at least one case, `the_content` was unnecessarily passed to `sprintf()` as an extra (unused) parameter.

Follow-up to [53480].

See #53232.
Built from https://develop.svn.wordpress.org/trunk@53481


git-svn-id: http://core.svn.wordpress.org/trunk@53070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-09 16:21:14 +00:00
Peter Wilson
b8e44627c8 Media: Add decoding="async" to image attributes.
Dynamically add `decoding="async"` to image tags on the front end of a site to instruct browsers to download them in parallel.

Modifies `wp_get_attachment_image()`, `get_avatar()` to include the attribute by default. Modifies `wp_filter_content_tags()` to add the attribute during the front-end render of the site.

Introduces `wp_img_tag_add_decoding_attr()` to take an image tag and modify it to include the attribute. Introduces the filter `wp_img_tag_add_decoding_attr` used to define the default value for the attribute.

Props adamsilverstein, ayeshrajans, costdev, flixos90, hellofromtonya, isaumya, michaelbourne, mihai2u, mitogh, sergiomdgomes, spacedmonkey, westonruter, peterwilsoncc.
Fixes #53232.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-09 05:31:12 +00:00
Sergey Biryukov
cf5df71b88 Tests: Correct an assertion in wp_rand() tests.
The function returns non-negative integers, which includes zero.

Follow-up to [53473], [53477].

See #55194.
Built from https://develop.svn.wordpress.org/trunk@53479


git-svn-id: http://core.svn.wordpress.org/trunk@53068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-08 13:19:14 +00:00
Sergey Biryukov
4b286c4f77 Tests: Move the tests for individual pluggable functions into their own directory.
This aims to make the tests more discoverable and easier to expand.

Follow-up to [50790], [53473], [53477].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53478


git-svn-id: http://core.svn.wordpress.org/trunk@53067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 14:45:12 +00:00
Sergey Biryukov
e380ff685d Tests: Use more descriptive names for wp_rand() test methods.
This aims to clarify the intention of the tests.

Follow-up to [53473].

Props mlajo, costdev, acoulombe, azouamauriac, swissspidy, tobifjellner, peterwilsoncc, audrasjb, marekdedic, SergeyBiryukov.
See #55194.
Built from https://develop.svn.wordpress.org/trunk@53477


git-svn-id: http://core.svn.wordpress.org/trunk@53066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 12:03:12 +00:00
audrasjb
7821fe08db Text Changes: Improve consistency of admin error notices in wp-admin/options.php.
This changeset replaces <strong>Error</strong>: with <strong>Error:</strong>, for better consistency.

Follow-up to [53458].

Fixes #50785.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 05:30:13 +00:00
audrasjb
2029a33158 Twenty-Twenty: Fix a width/alignement issue on "Wide Line" Separator style variation.
This change fixes an alignement issue on the "Wide Line" Separator style variation on front-end, especially when used inside a column block. It changes the block `width` value from `120rem` to `100%` to avoid container overflowing.

Props kjellr, matthiaspabst, sabernhardt, audrasjb.
Fixes #53643.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 05:23:09 +00:00
audrasjb
20c003e842 Docs: Use third-person singular verbs for function descriptions in the Core Translation API.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-07 05:18:13 +00:00
audrasjb
56d7437f59 General: Ensure wp_rand() returns 0 when $min and $max values are equal to 0.
This changeset ensures `wp_rand()` returns zero instead of a random number when both `$min` and `$max` values are equal to zero.

Fixes #55194.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-06 22:50:10 +00:00
audrasjb
0ab9c4ee4b Docs: Various fixes in wp-includes/pluggable.php docblocks, as per documentation standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-06 22:35:10 +00:00
audrasjb
312f7d4b76 Twenty-Twenty: Fix paragraph block alignment issues when used on a RTL website.
Twenty Twenty's `style.css` file has `/*rtl:ignore*/` for the `.has-text-align-left` class, but that was previously missing from the `.has-text-align-right` class. As a result, the theme overrides block library styles on the front-end (and not in the editor). This changeset adds the missing declaration.

Props amirkamizi, mayankmajeji, ianbelanger, sabernhardt, hasanuzzamanshamim.
Fixes #49447.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-06 21:42:13 +00:00
audrasjb
5d96ddab10 Twenty-Twenty: Improve Quote block style consistency between front and back-end.
This changeset updates the `font-style` value of the Quote block in the block editor to ensure styles are consistent between the editor and the front-end.

Props kajalgohel, iamjaydip, audrasjb, whaze, mukesh27.
Fixes #55931.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-06 13:31:15 +00:00
Sergey Biryukov
a29a0e05d1 Docs: Correct method reference format in some DocBlocks.
This ensures that the methods are recognized by the WordPress Code Reference parser.

Follow-up to [7994], [25567], [27156], [28887], [49672], [52226].

Props dd32, audrasjb.
Fixes #55928.
Built from https://develop.svn.wordpress.org/trunk@53469


git-svn-id: http://core.svn.wordpress.org/trunk@53058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-06 10:51:12 +00:00
desrosj
1ce3b1ae3b Build/Test Tools: Correctly confirm the previous workflow run was triggered by a push event.
This fixes the code added in [53466] to look at the correct workflow object when determining the outcome of the previous workflow run.

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53468


git-svn-id: http://core.svn.wordpress.org/trunk@53057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-05 19:45:15 +00:00
Sergey Biryukov
6c79e4b29b Tests: Update the URL to the documentation on GitHub Actions environment variables.
Follow-up to [49264].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53467


git-svn-id: http://core.svn.wordpress.org/trunk@53056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-05 14:06:11 +00:00
desrosj
6a7de2d74a Build/Test Tools: Prevent inaccurate “fixed” notifications in Slack.
When searching for previous workflow runs by branch, GitHub currently includes matches within forks.

If a contributor opens a pull request from their fork with a `head_ref` matching a Core branch that triggers a workflow on `push` event, the outcomes of the workflows associated with that pull request are currently used to determine if the previous workflow run had failed.

The result is a false “fixed” notifications when a commit immediately follows a failed workflow run from the pull request.

This adds a check to skip any workflow runs not triggered by a `push` event to prevent these inaccurate notifications.

Props SergeyBiryukov.
See #55652.
Built from https://develop.svn.wordpress.org/trunk@53466


git-svn-id: http://core.svn.wordpress.org/trunk@53055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-05 09:31:13 +00:00
Sergey Biryukov
5a2b984cc0 Tests: Don't overwrite image metadata in a wp_calculate_image_srcset() test for zero width.
This was unnecessarily replacing the original image metadata with a scaled version, leading to a few leftover images with the `-scaled` suffix in the `wp-content/uploads` directory.

Follow-up to [35412].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53465


git-svn-id: http://core.svn.wordpress.org/trunk@53054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-04 18:05:08 +00:00
Sergey Biryukov
61b7a2a3e2 Tests: Consistently pass the $force_delete parameter to wp_delete_attachment().
Convert some `wp_delete_post()` calls to `wp_delete_attachment()` to avoid an extra function call.

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53464


git-svn-id: http://core.svn.wordpress.org/trunk@53053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-04 13:41:08 +00:00
Sergey Biryukov
854a06a4ad Tests: Clean up test images before performing assertions in image resize tests.
This makes sure there are no leftover images in case of a test failure.

Follow-up to [161/tests], [1255/tests].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53463


git-svn-id: http://core.svn.wordpress.org/trunk@53052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-04 12:57:10 +00:00
audrasjb
343af672af Docs: Replace "updated" with "deleted" in wpdb::delete @return description.
Props audrasjb, cadlec.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-04 12:15:12 +00:00
Sergey Biryukov
3fec80568e Tests: Add some test cases for path_join() with Windows paths.
Follow-up to [6984], [53457], [53460].

Props joyously.
See #55897.
Built from https://develop.svn.wordpress.org/trunk@53461


git-svn-id: http://core.svn.wordpress.org/trunk@53050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-03 15:07:21 +00:00
Sergey Biryukov
1d2e969b50 General: Remove redundant ltrim() from path_join().
If the path starts with a slash, it will be considered absolute and returned as is earlier in the function.

It it's not absolute, then it does not start with a slash, so there is nothing to trim.

This change is covered by existing unit tests.

Follow-up to [6984], [53457].

Props karlijnbk.
See #55897.
Built from https://develop.svn.wordpress.org/trunk@53460


git-svn-id: http://core.svn.wordpress.org/trunk@53049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-02 15:31:08 +00:00
audrasjb
e05a38f0a5 Twenty-Twenty: Alignment fix on Separator Block editor styles.
This changeset fixes an issue with some CSS rules of the "Wide Line" variation of the Separator Block’s editor stylesheet, for small, medium and large screens.

Props umesh84, iamjaydip, mukesh27, larrach.
Fixes #55896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-02 15:10:10 +00:00