Commit Graph

19680 Commits

Author SHA1 Message Date
audrasjb
4770e926ab Docs: Use third-person singular verbs for function descriptions in wp-admin/includes/comment.php, as per docblocks standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 22:15:10 +00:00
audrasjb
0df025d2bd Docs: Add missing function description in wp-admin/includes/comment.php.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 22:12:09 +00:00
audrasjb
bcf4ff0c3f Themes: Add a hook to filter theme header image URL.
This changeset introduces the `get_header_image` filter, which can be used to modify header image URL returned by `get_header_image()`, in themes that support the Header Image feature. 

Props hztyfoon, audrasjb, mukesh27, SergeyBiryukov, costdev.
Fixes #56180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 21:13:09 +00:00
audrasjb
63d113e62c Docs: Use third-person singular verbs for function descriptions in general-template.php, as per docblocks standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 20:37:07 +00:00
desrosj
3e1fd05600 Twenty Twenty-One: Rebuild the IE specific stylesheet.
This was missed in [53517].

See #55989.
Built from https://develop.svn.wordpress.org/trunk@53739


git-svn-id: http://core.svn.wordpress.org/trunk@53298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 19:20:11 +00:00
desrosj
8e91a8f995 Build/Test Tools: Add tag pattern matching for the testing NPM workflow.
This workflow was missed in [50298].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 18:52:10 +00:00
desrosj
44412840a8 Build/Test Tools: Make the GitHub Action pattern matching for tags more specific.
This improves the tag pattern matching for GitHub Action workflows to be more specific. The `*` wildcard in the current patterns matches any character except slash (`/`). While this correctly matches a version like `X.Y.Z`, it could also match non-numeric characters.

This changes patterns to use the `+` character, which matches one or more of the preceding characters (`[0-9]` in this case).

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


git-svn-id: http://core.svn.wordpress.org/trunk@53295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 18:41:11 +00:00
desrosj
cfe7d795f5 Build/Test Tools: Correctly detect the first workflow run for a branch or tag.
When trying to determine the outcome of the previous run for a GitHub Action workflow, the current run is included in the list fetched from the GitHub API.

This adjusts the logic checking for the previous run to account for that and fixes notifications for the first workflow runs of a new branch or tag.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 17:43:13 +00:00
Sergey Biryukov
486602cfca Docs: Add a @since note for get_post_permalink() returning false on failure.
Follow-up to [53733].

See #45329.
Built from https://develop.svn.wordpress.org/trunk@53734


git-svn-id: http://core.svn.wordpress.org/trunk@53293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 15:46:09 +00:00
Sergey Biryukov
4bfc1358a0 Posts, Post Types: Correct the check for non-existing post in get_post_permalink().
The function was erroneously calling `is_wp_error()` on the result of a `get_post()` call, which returns `null` on failure, and never returns a `WP_Error` object.

Previously, passing a non-existing post ID to the function would result in a home URL being returned and a few `Attempt to read property "post_type, post_name, hierarchical..." on null` PHP warnings.

This commit ensures `get_post_permalink()` returns `false` on failure, which brings parity with `get_permalink()`.

Includes a unit test to confirm the correct behavior.

Follow-up to [12923], [13023], [32606].

Props renegeuze, manzoorwani.jk.
Fixes #45329.
Built from https://develop.svn.wordpress.org/trunk@53733


git-svn-id: http://core.svn.wordpress.org/trunk@53292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 15:41:09 +00:00
Sergey Biryukov
d77d8384ad Tests: Correct the test for passing all expected parameters to the preprocess_comment filter.
Previously, `assertSame()` was replaced with `assertSameSets()`, which does not preserve the array keys. `assertSameSetsWithIndex()` should have been used instead.

Follow-up to [36038], [48937], [53729], [53730].

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53732


git-svn-id: http://core.svn.wordpress.org/trunk@53291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:49:12 +00:00
desrosj
04cea1d615 Administration: Remove unused CSS selectors related to old format menu icons.
This removes all CSS definitions related to the `.icon16` class. Research shows that current ecosystem usage of this class is extremely minimal.

This selector was used for the Welcome Panel and Welcome Screen in WordPress 3.3 (see [19163] and [19197]. The icons were removed for WordPress 3.5 in [22018], but the related CSS remained, and were also included when the MP6 admin re-skinning was merged in [26072].

Props afercia, mmaumio, isabel_brison, sabernhardt, audrasjb, desrosj.
Fixes #35717.
Built from https://develop.svn.wordpress.org/trunk@53731


git-svn-id: http://core.svn.wordpress.org/trunk@53290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:39:09 +00:00
Sergey Biryukov
c0065475f3 Coding Standards: Remove extra comma in a compact() call.
This fixes a PHP compatibility error in `wp_handle_comment_submission()`:

* `Trailing comma's are not allowed in function calls in PHP 7.2 or earlier`

Follow-up to [53729].

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53730


git-svn-id: http://core.svn.wordpress.org/trunk@53289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:22:08 +00:00
Sergey Biryukov
e2a5b8684e Coding Standards: Standardize on user_id when passing data to comment functions.
The `wp_new_comment()`, `wp_update_comment()`, and `wp_filter_comment()` functions already normalize the `user_ID` parameter internally to `user_id`, which matches the database field name.

This commit aims to bring some consistency when passing the parameter in core.

The corresponding `$user_ID` variable is also renamed to `$user_id` to match the other variables when not referring to the `$user_ID` global, which has an exception in the WordPress coding standards.

Follow-up to [8543], [8720], [12267], [12300], [26491], [28915], [28922], [34799], [49303].

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53729


git-svn-id: http://core.svn.wordpress.org/trunk@53288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 14:14:09 +00:00
audrasjb
917e850008 Docs: Use third-person singular verbs for function descriptions in block-template.php and block-template-utils.php.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 13:21:08 +00:00
audrasjb
6d9424f138 Docs: Fix indentation issues in block-template-utils.php docblocks, as per docs standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 13:14:10 +00:00
audrasjb
79c4babf39 Plugins: Improve color contrast on plugins screen when recovery mode is activated.
This changeset replaces `#d63638` (contrast ratio: 4.40) with `#b32d2e` (contrast ratio: 5.87) in Plugins screen row action links when the site is in recovery mode.

Props kebbet, mukesh27, joedolson, audrasjb.
Fixes #56190.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-20 11:37:15 +00:00
desrosj
866abfda9f External Libraries: Update the Moment library to version 2.29.4.
This is a minor bug fix release.

Props dilipbheda.
Fixes #56031.
Built from https://develop.svn.wordpress.org/trunk@53725


git-svn-id: http://core.svn.wordpress.org/trunk@53284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 19:43:25 +00:00
Sergey Biryukov
81b7b229ed Coding Standards: Use consistent placement for ::prepare_links() methods.
This moves the `::prepare_links()` methods in REST API classes next to `::prepare_item_for_response()` where they are used, to bring some consistency across the classes and make code navigation easier.

Includes wrapping some long lines for better readability.

Follow-up to [52079], [52051], [52342], [53721], [53722].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53724


git-svn-id: http://core.svn.wordpress.org/trunk@53283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 16:22:09 +00:00
Sergey Biryukov
69a8ecce33 Coding Standards: Rename $comment_post_ID and $comment_author_IP variables in various files.
This fixes two WPCS warnings:
* `Variable "$comment_post_ID" is not in valid snake_case format`
* `Variable "$comment_author_IP" is not in valid snake_case format`

While matching the database fields of the same name, these variables did not follow the WordPress coding standards, and are now renamed to address that.

Note: The name change only affects internal variables and parameters for a few actions receiving a comment post ID:

* `edit_comment`
* `comment_id_not_found`
* `comment_closed`
* `comment_on_trash`
* `comment_on_draft`
* `comment_on_password_protected`
* `pre_comment_on_post`

The change does not affect parameters for functions receiving an array of comment data:

* `wp_insert_comment()`
* `wp_new_comment()`
* `wp_update_comment()`
* `wp_handle_comment_submission()`

The associated array keys still match the database fields: `comment_post_ID` and `comment_author_IP`.

Follow-up to [1706], [2894], [8720], [28427], [28437], [28457], [34799], [53720],

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53723


git-svn-id: http://core.svn.wordpress.org/trunk@53282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 16:19:11 +00:00
spacedmonkey
31c061e89d REST API: Add prepare_links method to WP_REST_Taxonomies_Controller class.
Move logic to from `prepare_item_for_response` to `prepare_links` method to bring `WP_REST_Taxonomies_Controller` class inline with other REST API controllers.

Props Spacedmonkey, timothyblynjacobs, dlh.
Fixes #56020.
Built from https://develop.svn.wordpress.org/trunk@53722


git-svn-id: http://core.svn.wordpress.org/trunk@53281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 14:54:08 +00:00
spacedmonkey
070bc9b5ea REST API: Add prepare_links method to WP_REST_Post_Types_Controller class.
Move logic to from `prepare_item_for_response` to `prepare_links` method to bring `WP_REST_Post_Types_Controller` class inline with other REST API controllers.

Props Spacedmonkey, timothyblynjacobs, dlh.
Fixes #56019.
Built from https://develop.svn.wordpress.org/trunk@53721


git-svn-id: http://core.svn.wordpress.org/trunk@53280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 14:49:08 +00:00
Sergey Biryukov
9fbd3b5403 Coding Standards: Remove unused variable in wp-trackback.php.
This was present in the initial import of b2 files, but appears to have never been used in WordPress core.

Follow-up to [3], [636], [637], [1616].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53720


git-svn-id: http://core.svn.wordpress.org/trunk@53279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 14:17:09 +00:00
Sergey Biryukov
f14f6a162a Coding Standards: Improve variable names in wp-trackback.php.
This fixes a `Variable "$comment_post_ID" is not in valid snake_case format` WPCS warning.

`$comment_post_ID`, while matching the database field of the same name, does not follow the WordPress coding standards, so the variable is now renamed to `$comment_post_id`.

Additionally, these variables are renamed for clarity:

* `$tb_id` to `$post_id` (this was not the trackback ID)
* `$tb_url` to `$trackback_url`

Follow-up to [172], [637], [1616], 

See #55647, #56244.
Built from https://develop.svn.wordpress.org/trunk@53719


git-svn-id: http://core.svn.wordpress.org/trunk@53278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 14:02:10 +00:00
gziolo
fdcb34fad3 Editor: Fix register_block_type does not recognise ancestor block setting
When registering block through PHP, using `register_block_type` function, newly introduced `ancestor` block setting in `block.json` was not recognised. It worked though, when block is registered from JavaScript.

Props lovor, annezazu.
Fixes #56184.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 13:24:12 +00:00
audrasjb
31a5eaf174 Upgrade/Install: Improve plugin update icon alignment.
This changeset improves the vertical alignment of the plugin update button in the Plugins screen.

Props Presskopp, sabernhardt, costdev, eherman24.
Fixes #56123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 09:25:13 +00:00
audrasjb
e1dfa87a88 Twenty Twenty-One: Add block type suggestions to block patterns.
When using a given block, patterns which use that block can be suggested. This changeset adds `blockType` suggestion for several Twenty Twenty-One bundled patterns.

Props ryelle, poena, audrasjb.
Fixes #53647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 08:56:14 +00:00
Sergey Biryukov
1069ac4afd Posts, Post Types: Standardize on $post parameter name where appropriate.
This renames the `$post_id` or `$id` parameters to `$post` for functions that accept a post ID or post object:

* `get_sample_permalink()`
* `get_sample_permalink_html()`
* `wp_check_post_lock()`
* `wp_set_post_lock()`
* `get_the_tags()`
* `comment_class()`
* `get_comment_class()`
* `get_comments_link()`
* `get_comments_number()`
* `comments_number()`
* `get_comments_number_text()`
* `comments_open()`
* `pings_open()`
* `comment_form()`
* `do_trackbacks()`
* `pingback()`
* `post_permalink()`
* `get_post_permalink()`
* `get_edit_post_link()`
* `edit_post_link()`
* `get_delete_post_link()`
* `post_class()`
* `get_post_class()`
* `the_attachment_link()`
* `wp_get_attachment_link()`
* `wp_list_post_revisions()`
* `check_and_publish_future_post()`
* `add_ping()`
* `get_pung()`
* `get_to_ping()`
* `wp_get_post_revisions()`
* `wp_get_post_revisions_url()`

Additionally, `$revision_id` is renamed to `$revision` in:

* `wp_restore_post_revision()`
* `wp_delete_post_revision()`

Includes minor documentation improvements for consistency and code layout fixes for better readability.

Follow-up to [1599], [1794], [2881], [3303], [3851], [5302], [6633], [6716], [6985], [7103], [7149], [7747], [8011], [8638], [8643], [8695], [9138], [9273], [11425], [11922], [11956], [12284], [12810], [12923], [13023], [13171], [25567], [27156], [27473], [28558], [28602], [33659], [38852], [47276], [47366], [48622], [49544], [49597], [52095].

See #56243, #55647.
Built from https://develop.svn.wordpress.org/trunk@53715


git-svn-id: http://core.svn.wordpress.org/trunk@53274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-18 17:37:17 +00:00
Sergey Biryukov
4e0b801910 Coding Standards: Use MINUTE_IN_SECONDS where appropriate.
This aims to clarify the time units for some timeout or expiration values.

Follow-up to [11823], [13177], [21996], [37747].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53714


git-svn-id: http://core.svn.wordpress.org/trunk@53273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 02:18:09 +00:00
Sergey Biryukov
0eff79af37 Coding Standards: Use a single input array on Permalink Settings screen.
This reduces the amount of code to edit in case of any changes to the default permalink structures.

Follow-up to [53706], [53710].

See #55647, #55498.
Built from https://develop.svn.wordpress.org/trunk@53713


git-svn-id: http://core.svn.wordpress.org/trunk@53272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 01:38:08 +00:00
Sergey Biryukov
74b2659ce4 Permalinks: Use home_url() to set the URL base on Permalink Settings screen.
This brings more consistency with how the home URL is retrieved elsewhere in the admin.

Follow-up to [1567], [1664], [2746], [3029], [4144], [53710].

Props sabernhardt.
Fixes #56235.
Built from https://develop.svn.wordpress.org/trunk@53712


git-svn-id: http://core.svn.wordpress.org/trunk@53271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-17 01:06:13 +00:00
Sergey Biryukov
82ee734e8b Permalinks: Add a guiding paragraph on the Permalink Settings screen.
This is intended as an introduction to permalink structure selection.

Props kebbet, costdev, hasanuzzamanshamim, mukesh27.
Fixes #55947.
Built from https://develop.svn.wordpress.org/trunk@53711


git-svn-id: http://core.svn.wordpress.org/trunk@53270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-16 20:13:10 +00:00
Sergey Biryukov
033728a0b7 Coding Standards: Improve readability of wp-admin/options-permalink.php.
Includes: 
* Wrapping longer lines and reducing alignment levels to fit more data on the screen.
* Restoring `esc_attr()` for input values, which may include translatable parts.
* Adding comments to closing `</div>` tags and PHP `endif` statements.
* Reducing the context switching between HTML and PHP.
* Balancing PHP conditionals to better reflect the structure.
* Removing repeated function calls to improve performance.
* Renaming some variables for clarity and consistency.

Follow-up to [470], [601], [963], [1227], [1664], [2746], [3029], [6976], [7230], [11350], [14051], [14553], [21891], [34691], [34749], [37747], [38066], [41182], [41986], [42343], [43571], [48710], [50830], [51892], [53706].

See #55647.
Built from https://develop.svn.wordpress.org/trunk@53710


git-svn-id: http://core.svn.wordpress.org/trunk@53269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-16 16:20:10 +00:00
joedolson
a65abecc15 Administration: Audible messages on AJAX error cases.
Issues appropriate audible messages via `wp.a11y.speak()` when `ajax-response.js` generates an error via `wp_die()`.

Props afercia, alexstine.
Fixes #54483.
Built from https://develop.svn.wordpress.org/trunk@53709


git-svn-id: http://core.svn.wordpress.org/trunk@53268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-16 01:08:10 +00:00
joedolson
9f851abc3f Coding Standards: Missed space in code indentation in [53707].
Fixes code style issue from [53707].

Follow up to [53707].

See #54483.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 23:59:09 +00:00
joedolson
38a13f94ba Login: Explicitly associate errors with input fields.
Add an `aria-describedby` relationship between login email/password input fields and displayed login error messages.

Props patrickgroot, rollybueno, afercia.
Fixes #54483.
Built from https://develop.svn.wordpress.org/trunk@53707


git-svn-id: http://core.svn.wordpress.org/trunk@53266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 23:40:10 +00:00
joedolson
1d101bada0 Permalinks: Label and describe permalink settings fields.
Restructure the permalink settings fields so URL formats are communicated to screen readers through `aria-describedby` relationships, avoid the usage of implicitly labeled input fields, labeling the custom permalink format correctly, and clarifying values. Make settings `table` element presentational.

Props rishishah, sabernhardt, kebbet.
Fixes #55498.
Built from https://develop.svn.wordpress.org/trunk@53706


git-svn-id: http://core.svn.wordpress.org/trunk@53265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 22:42:10 +00:00
Sergey Biryukov
35c65333bd Docs: Correct @since tags introduced in WordPress 6.0.1.
The associated changes were backported to the 6.0 branch, so the version should be 6.0.1 instead of 6.1.0.

This affects:
* `@since` tag for the `block-templates` feature in `create_initial_theme_features()`.
* `@since` tag for the `show_on_front`, `page_on_front`, and `page_for_posts` options on the REST API settings endpoint.

Follow-up to [53590], [53661].

Props tommusrhodus, johnbillion.
Fixes #56225.
Built from https://develop.svn.wordpress.org/trunk@53704


git-svn-id: http://core.svn.wordpress.org/trunk@53263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 16:00:10 +00:00
Sergey Biryukov
cd6e4451f1 Docs: Document that allowed_tags() is no longer used in core as of WordPress 4.4.
Previously, it was used in core and older bundled themes to display the list of allowed tags in the comment form.

Follow-up to [709], [2009], [2012], [2032], [2040], [13030], [14365], [32858], [34316], [34351].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 14:15:08 +00:00
Sergey Biryukov
0eb9abd1fe Coding Standards: Rename the $user_id parameter of get_user_locale() to $user for accuracy.
Since the parameter accepts not only a user's ID, but also a `WP_User` object, `$user` is a more appropriate name, which better aligns with the `$post` parameter of functions that accept a post ID or a `WP_Post` object.

The pre-existing internal `$user` variable which contained a `WP_User` object is renamed to `$user_object` for clarity.

Follow-up to [38955].

Props aristath, poena, afercia, SergeyBiryukov.
See #55647.
Built from https://develop.svn.wordpress.org/trunk@53702


git-svn-id: http://core.svn.wordpress.org/trunk@53261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-15 13:45:11 +00:00
Sergey Biryukov
ccba239e04 Tests: Use a consistent way of setting the Administrator role in Ajax tests.
This removes some duplicate code in favor of calling the `WP_Ajax_UnitTestCase::_setRole()` method created specifically for this purpose and used in other tests.

Follow-up to [500/tests], [37288].

Props martin.krcho.
See #56203.
Built from https://develop.svn.wordpress.org/trunk@53701


git-svn-id: http://core.svn.wordpress.org/trunk@53260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-14 14:28:09 +00:00
Sergey Biryukov
749720d897 Text Changes: Improve consistency of punctuation in some strings.
* Move the colon inside the `<strong>` tags in some `Error:` prefixes, to match other strings.
* Move the full stop at the end of some sentences outside of the `<strong>` tags used for individual phrases.

Follow-up to [11669], [23844], [53118], [53458], [53476].

Props NekoJonez, Presskopp.
Fixes #56027.
Built from https://develop.svn.wordpress.org/trunk@53700


git-svn-id: http://core.svn.wordpress.org/trunk@53259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-14 14:10:11 +00:00
Sergey Biryukov
5a59007323 I18N: Remove code from a translatable string in wp-includes/ms-default-constants.php.
This replaces the `VHOST` and `SUBDOMAIN_INSTALL` constant names in a message in `ms_subdomain_constants()` with placeholders, as they don't need to be translated.

Follow-up to [36773].

Props weboccults, hztyfoon, pratiweb.
Fixes #56216.
Built from https://develop.svn.wordpress.org/trunk@53699


git-svn-id: http://core.svn.wordpress.org/trunk@53258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-14 13:35:13 +00:00
John Blackbourn
5dc1150ea2 Users: Allow conditional supression of the email notifications that are sent when a new user account is registered.
This introduces the following new filters:

* `wp_send_new_user_notification_to_admin`
* `wp_send_new_user_notification_to_user`

Props janthiel, costdev, audrasjb, peterwilsoncc

Fixes #54874

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


git-svn-id: http://core.svn.wordpress.org/trunk@53257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-12 21:05:16 +00:00
Sergey Biryukov
2cc9f73523 Editor: Include user's name in the wp_refresh_post_lock() response.
This ensures that the post lock data returned by the Heartbeat API is consistent.

Previously, `wp_check_locked_posts()` was updated to return the name of the user currently editing the post, but the `wp_refresh_post_lock()` response did not get a similar change.

Follow-up to [53070].

Props nathan.noom.
Fixes #56197.
Built from https://develop.svn.wordpress.org/trunk@53692


git-svn-id: http://core.svn.wordpress.org/trunk@53251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-11 18:18:13 +00:00
Sergey Biryukov
a5cc224b3c Docs: Correct the type of the $number parameter in ngettext* filters.
This applies to:
* `ngettext`
* `ngettext_{$domain}`
* `ngettext_with_context`
* `ngettext_with_context_{$domain}`

Follow-up to [25565], [48136].

Props cyrillbolliger.
Fixes #56187.
Built from https://develop.svn.wordpress.org/trunk@53691


git-svn-id: http://core.svn.wordpress.org/trunk@53250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-10 00:07:16 +00:00
Sergey Biryukov
9177df1ee7 Docs: Improve description for wp_plugin_update_rows() and wp_theme_update_rows().
Follow-up to [53689].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-09 12:59:11 +00:00
audrasjb
4f41d38512 Docs: Add missing function descriptions in wp-admin/includes/update.php.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-08 20:13:12 +00:00
gziolo
4e3b22546f Tools: Automate backporting core blocks from Gutenberg to Core
Syncing stable blocks from the Gutenberg repository to wordpress-develop was a manual process, but it got automated with the script that runs together with syncing WordPress packages changed in the Gutenberg package.

Props zieladam.
Fixes #56179.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-08 12:34:14 +00:00
Sergey Biryukov
b50ec525ac Tests: Remove @uses tags from the test suite.
* These were not used consistently, with only four instances across all the tests.
* Using this tag in combination with the `beStrictAboutCoversAnnotation="true"` setting will mark a test as "Risky" if code is executed during the test which is not annotated via `@covers` or `@uses` tags. That would make the maintainance of the tags very fiddly, while adding little additional value for the test code base.

Follow-up to [32995], [39914], [42636], [53682].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-08 00:13:12 +00:00
Sergey Biryukov
ef2bce73e2 Tests: Separate the tests in basic.php for clarity.
There were two kinds of tests in this file:

* Tests for content of some files in the root directory:
 * `license.txt`
 * `SECURITY.md`
 * `package.json`
* Tests for some utility functions of the test framework itself:
 * `strip_ws()`
 * `test_mask_input_value()`

The latter are now moved to their own file, `utils.php`.

Follow-up to [22/tests], [81/tests], [103/tests], [25240], [26940], [28064], [28480], [28493], [28523], [28631], [42381], [47403], [53683].

See #39265, #55652.
Built from https://develop.svn.wordpress.org/trunk@53686


git-svn-id: http://core.svn.wordpress.org/trunk@53245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 23:57:13 +00:00
Andrew Ozz
8091de83b5 Media:
- Deprecate `wp_get_attachment_thumb_file()`.
- Make `wp_get_attachment_thumb_url()` an alias of `wp_get_attachment_image_url()`. This fixes it to return the proper thumbnail URL and fall back to returning the URL to `image_meta['thumb']` if only that exists.

Props: markhowellsmead, mukesh27, csesumonpro, SergeyBiryukov, mikeschroder, killua99, joemcgill, mashukushibiki, mfgmicha, swissspidy, romulodl, nacin, JoshuaAbenazer, wonderboymusic, lonnylot, azaozz.
Built from https://develop.svn.wordpress.org/trunk@53685


git-svn-id: http://core.svn.wordpress.org/trunk@53244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 23:32:11 +00:00
Andrew Ozz
b8b2693bdb Build/Test Tools: Add @covers tags to the taxonomy and category test groups.
Props pbeane, hellofromTonya, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@53684


git-svn-id: http://core.svn.wordpress.org/trunk@53243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 23:02:09 +00:00
Andrew Ozz
9a7c53ac4c Build/Test Tools: Add @coversNothing tags to the tests for some content in documentation and settings files.
Props pbeane, hellofromTonya, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@53683


git-svn-id: http://core.svn.wordpress.org/trunk@53242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 22:55:10 +00:00
Andrew Ozz
48dbe8c3f0 Build/Test Tools: Add @covers tags to the url test group.
Props pbeane, hellofromTonya, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 22:45:11 +00:00
Andrew Ozz
bdc1bbac2d Tests: Remove duplicate testcase test_get_privacy_policy_url_should_return_empty_when_privacy_policy_page_not_set() from Tests_Url_GetPrivacyPolicyUrl.
See: #39265.
Built from https://develop.svn.wordpress.org/trunk@53681


git-svn-id: http://core.svn.wordpress.org/trunk@53240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 22:22:11 +00:00
Andrew Ozz
590b9278ff Build/Test Tools: Add and fix @covers tags to the attachments and block-supports test groups.
Props pbeane, hellofromTonya, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.
Built from https://develop.svn.wordpress.org/trunk@53680


git-svn-id: http://core.svn.wordpress.org/trunk@53239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 21:08:13 +00:00
audrasjb
a5f489189d Docs: Misc. docblock enhancements in WP_REST_Menu_Items_Controller class, as per docblock standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 12:32:12 +00:00
audrasjb
e17247c78b REST API: Consolidate menu item type_label schema declaration.
This changeset removes a duplicate definition of the `type_label` property and consolidates the description of this property.

Props dlh, SergeyBiryukov.
Fixes #56072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-07 12:21:14 +00:00
desrosj
b5a14f47bb Themes: Properly escape home_url() when changing and updating themes.
Props obayedmamur, hurayraiit, costdev, shraboni, msnewas.
Fixes #56145.
Built from https://develop.svn.wordpress.org/trunk@53677


git-svn-id: http://core.svn.wordpress.org/trunk@53236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 19:46:10 +00:00
desrosj
7f43cc5d3a Coding Standards: Apply some alignment fixes after composer format.
Follow up to [53485].

See #55674.
Built from https://develop.svn.wordpress.org/trunk@53676


git-svn-id: http://core.svn.wordpress.org/trunk@53235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 19:31:14 +00:00
audrasjb
8de9cf1d8b Docs: Convert "Application Passwords" to lowercase in WP_Application_Passwords docblocks, for better consistency.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 11:55:11 +00:00
audrasjb
09f8333b0b Docs: Typo correction in WP_Application_Passwords docblocks.
Props im_niloy.
Fixes #56155.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 10:38:07 +00:00
Sergey Biryukov
3796360ba0 Coding Standards: Simplify the logic for setting DB host and port in wpdb::parse_db_host().
This removes an extra `foreach` loop and the only variable variable (`$$component`) in core.

Follow-up to [20088,28342,28736-28747], [41629], [41820], [42226], [53670].

Props johnjamesjacoby.
See #54877, #55647.
Built from https://develop.svn.wordpress.org/trunk@53671


git-svn-id: http://core.svn.wordpress.org/trunk@53230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 10:32:12 +00:00
Peter Wilson
d7d9adbf02 Database: Ensure MySQL port numbers are numeric in wpdb.
Ensure the database port number is recorded as an integer or `null` (the default port) when parsing the database host.

This is to prevent PHP/MySQLi throwing an exception caused by ports represented as numeric strings.

Props audrasjb, azouamauriac, chaion07, costdev, johnjamesjacoby, jrf, sergeybiryukov.
Fixes #54877.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 05:33:17 +00:00
Peter Wilson
1ace1a4d2b Taxonomy: Retain default term option when unregistering taxos.
No longer delete the default term option in `unregister_taxonomy()` to improve database performance.

Since taxonomies are registered at runtime and can't be unregistered unless they're already registered, prior to this 
change the option was created and deleted on each request.

Deleting the option should occur on a one-time opperation such as plugin deactivation.

Follow up to [48480].

Props dlh.
Fixes #54472.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-06 05:11:12 +00:00
Sergey Biryukov
228bbf3f7f Block Patterns: Update the value used for keywords.
Patterns on the [https://wordpress.org/patterns/ Pattern Directory] can have keywords for better discoverability while searching. The way these are stored [69548ff1f0 was changed from a taxonomy to meta value], but the `/wp/v2/pattern-directory/patterns` endpoint was still pulling from that old value.

The correct property to use for this field is `meta.wpop_keywords`, which returns a single string with comma-separated keywords.

Props ryelle, TimothyBlynJacobs.
See #56126.
Built from https://develop.svn.wordpress.org/trunk@53665


git-svn-id: http://core.svn.wordpress.org/trunk@53224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 16:03:13 +00:00
Sergey Biryukov
3d05e52827 Themes: Revert the change of theme preview width on Add Themes screen.
The intention was for the preview ratio to remain accurate for the user's screen size when the sidebar is open, but this appears to have caused unintended side effects to the preview alignment.

Follow-up to [52647].

Props superbthemescom, Presskopp.
Fixes #56097. See #54764.
Built from https://develop.svn.wordpress.org/trunk@53663


git-svn-id: http://core.svn.wordpress.org/trunk@53222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:36:12 +00:00
desrosj
3ff86728e5 External Libraries: Update the Moment library to version 2.29.3.
This is a minor bug fix release.

Props dilipbheda.
Fixes #56031.
Built from https://develop.svn.wordpress.org/trunk@53662


git-svn-id: http://core.svn.wordpress.org/trunk@53221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:21:26 +00:00
desrosj
2ab810d14c External Libraries: Update the Underscore library to version 1.13.4.
This is a minor documentation and bug fix release.

Props christinavoudouris, dilipbheda.
Fixes #56030.
Built from https://develop.svn.wordpress.org/trunk@53660


git-svn-id: http://core.svn.wordpress.org/trunk@53219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:01:25 +00:00
Sergey Biryukov
f9e979a74c Themes: Register the block-templates theme feature.
This ensures the feature is included in the `theme_supports` REST API data for the active theme.

Follow-up to [48171].

Props grantmkin, TimothyBlynJacobs, addiestavlo.
Fixes #55681.
Built from https://develop.svn.wordpress.org/trunk@53659


git-svn-id: http://core.svn.wordpress.org/trunk@53218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 14:59:16 +00:00
Sergey Biryukov
6d78a736ee Editor: Update block editor packages for WordPress 6.0.1.
This brings a new version of the Gutenberg code from the [https://github.com/WordPress/gutenberg/tree/wp/6.0 wp/6.0 branch] into core.

Original PR from Gutenberg repository:
* #GB42131 Post Comments Form: Fix warning i18n

The following packages were updated:
* `@wordpress/block-directory` to `3.4.13`
* `@wordpress/block-library` to `7.3.13`
* `@wordpress/customize-widgets` to `3.3.13`
* `@wordpress/edit-post` to `6.3.13`
* `@wordpress/edit-site` to `4.3.13`
* `@wordpress/edit-widgets` to `4.3.13`

Props zieladam, bernhard-reiter, tobifjellner.
See #56058.
Built from https://develop.svn.wordpress.org/trunk@53657


git-svn-id: http://core.svn.wordpress.org/trunk@53216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 14:38:33 +00:00
desrosj
9635543e0f General: Properly escape home_url() links in wp_page_menu().
Props sabbirmc, tushar284, costdev.
Fixes 56148.
Built from https://develop.svn.wordpress.org/trunk@53656


git-svn-id: http://core.svn.wordpress.org/trunk@53215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 14:14:21 +00:00
spacedmonkey
6e619966a6 Users: Prime user meta in WP_User_Query class.
When querying 'fields' equal to 'all' using the `WP_User_Query` class, this returns an array of `WP_User` objects. A `WP_User` object requires user meta to be primed, as the user's role is stored in user meta. Ensure that all users meta is primed in a single request by calling the `cache_users` function when querying 'fields' equal to 'all'. Soft deprecate fields equal to `all_with_meta` as it now acts the same as 'fields' equal to 'all'.

Props Spacedmonkey, peterwilsoncc, mehulkaklotar, timothyblynjacobs, furi3r.
Fixes #55594.
Built from https://develop.svn.wordpress.org/trunk@53655


git-svn-id: http://core.svn.wordpress.org/trunk@53214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 09:28:13 +00:00
audrasjb
0f3b3218c2 Menus: Use more appropriate escaping functions in class Walker_Nav_Menu_Edit.
This changeset replaces `esc_attr` escaping function with `esc_url` as it is more appropriate in the context of a link's `href` attribute.

Props audrasjb, aniketpatel.
Fixes #56108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 08:06:17 +00:00
Peter Wilson
2c768f7c9d Cron API: Make wp-cron non-blocking for LiteSpeed LSAPI.
This should make cron spawning faster on LSAPI by ensuring that cron requests return immediately.

To avoid code repetition, the no caching headers are relocated and always sent. Caching plugins attempting to set these 
headers later will replace those set by WordPress Core.

Follow up to [44488].

Props maximej, johnbillion.
Fixes #54668.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 03:14:14 +00:00
Peter Wilson
e54b4ad284 Media: Add tests for wp_img_tag_add_decoding_attr().
Add new tests skipped in original commit. Follow up to [53480].

Fixes #53232.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 00:48:14 +00:00
Sergey Biryukov
0ea522b7a8 Help/About: Add help tab info for the "Send password reset" row action on Users screen.
This adds a description in the "Available Actions" help tab for the "Send password reset" quick action when hovering over a username in the user list.

Follow-up to [50129].

Props kebbet, costdev.
Fixes #55801.
Built from https://develop.svn.wordpress.org/trunk@53651


git-svn-id: http://core.svn.wordpress.org/trunk@53210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 00:25:13 +00:00
Sergey Biryukov
8f37ef9daa Docs: Update the version in which Meetup.com was removed as an oEmbed source.
Meetup.com was previously removed as an oEmbed source, since they have deprecated their endpoint. The block has also been removed from the editor, see #GB35085.

This commit updates the associated changelog entry for the `oembed_providers` filter to version 6.0.1, as the change is being backported to the 6.0 branch.

Follow-up to [53540].

See #55997.
Built from https://develop.svn.wordpress.org/trunk@53646


git-svn-id: http://core.svn.wordpress.org/trunk@53205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 18:15:15 +00:00
Sergey Biryukov
0705b9daed Editor: Update block editor packages for WordPress 6.0.1.
This brings a new version of the Gutenberg code from the [https://github.com/WordPress/gutenberg/tree/wp/6.0 wp/6.0 branch] into core.

The following packages were updated:
* `@wordpress/block-directory` to `3.4.12`
* `@wordpress/block-editor` to `8.5.9`
* `@wordpress/block-library` to `7.3.12`
* `@wordpress/components` to `19.8.5`
* `@wordpress/customize-widgets` to `3.3.12`
* `@wordpress/edit-post` to `6.3.12`
* `@wordpress/edit-site` to `4.3.12`
* `@wordpress/edit-widgets` to `4.3.12`
* `@wordpress/editor` to `12.5.9`
* `@wordpress/format-library` to `3.4.9`
* `@wordpress/icons` to `8.2.3`
* `@wordpress/interface` to `4.5.6`
* `@wordpress/list-reusable-blocks` to `3.4.5`
* `@wordpress/nux` to `5.4.5`
* `@wordpress/plugins` to `4.4.3`
* `@wordpress/preferences` to `1.2.5`
* `@wordpress/reusable-blocks` to `3.4.9`
* `@wordpress/server-side-render` to `3.4.6`
* `@wordpress/widgets` to `2.4.9`

Props zieladam.
See #56058.
Built from https://develop.svn.wordpress.org/trunk@53644


git-svn-id: http://core.svn.wordpress.org/trunk@53203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 12:06:43 +00:00
Sergey Biryukov
e70ac7004c Coding Standards: Escape the home URL in the "Background updated. Visit your site" message.
This affects `Custom_Background::admin_page()`.

Follow-up to [13041], [45662], [53642].

Props robinwpdeveloper, sajjad67, rudlinkon, hztyfoon, costdev.
Fixes #56133.
Built from https://develop.svn.wordpress.org/trunk@53643


git-svn-id: http://core.svn.wordpress.org/trunk@53202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 10:14:14 +00:00
Sergey Biryukov
eb08ad9160 Coding Standards: Escape the home URL in the "Header updated. Visit your site" message.
This affects `Custom_Image_Header::step_1()`.

Follow-up to [12890], [45654].

Props jakariaistauk, rudlinkon, hztyfoon, costdev.
Fixes #56132.
Built from https://develop.svn.wordpress.org/trunk@53642


git-svn-id: http://core.svn.wordpress.org/trunk@53201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 10:11:12 +00:00
audrasjb
7c94f45bb0 Docs: Use third-person singular verbs for function descriptions in WP_Comments_List_Table class, as per docblock standards.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:20:15 +00:00
audrasjb
ec9b9bee76 Comments: Use more appropriate escaping functions in class WP_Comments_List_Table.
This changeset replaces `esc_attr` escaping function with `esc_html` as it is more appropriate in this context.

Props chintan1896, afragen, peterwilsoncc, SergeyBiryukov.
Fixes #56101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:16:16 +00:00
audrasjb
a72203aa54 Docs: Add missing docblock description for install_themes_upload().
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-04 08:00:15 +00:00
Sergey Biryukov
5cfb35a5f2 Docs: Add @since tags for _doing_it_wrong() and deprecation notice handlers in the PHPUnit test suite.
This affects methods in the `WP_UnitTestCase_Base` class:
* `::expectDeprecated()`
* `::expectedDeprecated()`
* `::setExpectedException()`
* `::deprecated_function_run()`
* `::doing_it_wrong_run()`

Follow-up to [25402], [25408], [25785], [37861], [40536], [40539], [40872], [51872], [53637].

See #55652, #55646.
Built from https://develop.svn.wordpress.org/trunk@53638


git-svn-id: http://core.svn.wordpress.org/trunk@53197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-03 17:30:09 +00:00
Sergey Biryukov
b8da90698c Build/Test Tools: Include the actual _doing_it_wrong() message or deprecation notice in the output.
This aims to provide better context and more details if an unexpected `_doing_it_wrong()` message or deprecation notice is encountered during a test run.

Previously, this would display a message like `Unexpected incorrect usage notice for [...]`, but without any further details, making it harder to track down the actual issue.

Follow-up to [25402], [25408], [25785], [37861], [51872].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-03 16:41:14 +00:00
John Blackbourn
c29d3d8142 Build/Test Tools: Enable loopback requests to work on the local development environment.
This maps `localhost` to the host machine so the requests get routed to the web server container.

Props sandrasanzdev, hasanuzzamanshamim

Fixes #52708

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


git-svn-id: http://core.svn.wordpress.org/trunk@53195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-02 22:54:12 +00:00
Sergey Biryukov
d7efd9a793 Docs: Add @since tags for wp_die() handlers in the PHPUnit test suite.
Follow-up to [289/tests], [28797], [41966], [53634].

See #55652, #55646.
Built from https://develop.svn.wordpress.org/trunk@53635


git-svn-id: http://core.svn.wordpress.org/trunk@53194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-02 18:29:11 +00:00
Sergey Biryukov
6ee60c3ebe Build/Test Tools: Add support for WP_Error in the test suite's wp_die() handlers.
This brings parity with WordPress core `wp_die()` handlers and ensures that if a `WP_Error` object is passed as the `$message` argument to `wp_die()`, the PHPUnit test suite displays the error message correctly.

Previously, this would cause a silent fatal error: `Object of class WP_Error could not be converted to string`, leading to just displaying `wp_die called` without any further details.

Follow-up to [28797], [41966], [44666], [45160], [47882].

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


git-svn-id: http://core.svn.wordpress.org/trunk@53193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-02 18:07:11 +00:00
Sergey Biryukov
9bea9ddfc9 Editor: Alphabetize block lists in various places.
This affects:
* `wp-includes/blocks/index.php`
* `tools/webpack/blocks.js`
* `_unhook_block_registration()` in `tests/phpunit/includes/functions.php`

Follow-up to [47250], [52069], [52730], [53157], [53278].

Fixes #56131.
Built from https://develop.svn.wordpress.org/trunk@53633


git-svn-id: http://core.svn.wordpress.org/trunk@53192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-02 17:46:13 +00:00
Sergey Biryukov
354545bc3e Editor: Register the Comments Query Loop block from metadata.
This ensures that the block title and description can be translated.

Follow-up to [53157].

Props cbravobernal, bernhard-reiter, adamziel, gziolo, peterwilsoncc, audrasjb, mukesh27, SergeyBiryukov.
Fixes #56093. See #55809.
Built from https://develop.svn.wordpress.org/trunk@53631


git-svn-id: http://core.svn.wordpress.org/trunk@53190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-02 14:35:14 +00:00
Sergey Biryukov
1f87125366 Widgets: Add a comment in WP_Nav_Menu_Widget::form() to clarify the esc_attr() usage.
The URL to create a new menu from the the Navigation Menu widget can be a `javascript:` link to the Customizer Menus panel, so `esc_attr()` is used here instead of `esc_url()`.

Follow-up to [53092].

Props hztyfoon.
Fixes #56128.
Built from https://develop.svn.wordpress.org/trunk@53630


git-svn-id: http://core.svn.wordpress.org/trunk@53189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-01 20:01:15 +00:00
John Blackbourn
c3188a2566 Build/Test Tools: Remove an unused build configuration file.
This is a configuration file for Apache Ant that is no longer used.

Fixes #52604

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


git-svn-id: http://core.svn.wordpress.org/trunk@53188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-01 19:56:16 +00:00
John Blackbourn
f5cbb5585a Build/Test Tools: Run the PHP container with PID > 1 so Ctrl+C works correctly.
This allows for cancellation of operations in the PHP container, such as a PHPUnit test suite run.

Fixes #55702

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


git-svn-id: http://core.svn.wordpress.org/trunk@53187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-01 19:37:14 +00:00
John Blackbourn
d50fbb4469 Taxonomy: Pass the $args parameter to all actions and filters in wp_insert_term() and wp_update_term().
This allows actions and filters to access potentially useful contextual information when terms are inserted and updated.

Props mboynes

Fixes #55441

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


git-svn-id: http://core.svn.wordpress.org/trunk@53186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-01 19:09:14 +00:00
Sergey Biryukov
3e622b1d75 Twenty Eleven: Replace deprecated function calls on theme options page.
This includes:
* Removing the deprecated `screen_icon()` function call.
* Replacing the deprecated `get_current_theme()` function call with `get_option( 'current_theme' )`.
* Using `wp_get_theme()->display( 'Name' )` explicitly instead of relying on `WP_Theme`'s `__toString()` method, for clarity.

Follow-up to [6334], [20039], [20040], [20042], [20508], [26537], [41274].

Props Presskopp, cu121, viralsampat, costdev, tomjdv, sabernhardt, SergeyBiryukov.
Fixes #54833.
Built from https://develop.svn.wordpress.org/trunk@53626


git-svn-id: http://core.svn.wordpress.org/trunk@53185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-01 14:26:15 +00:00
Sergey Biryukov
580d991349 Editor: Ensure only the main query is modified when resolving template for new posts.
This adds a check for the main query in `_resolve_template_for_new_post()` to fix a 404 response when resolving template for new posts or pages caused by the wrong query being modified.

Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/40799 #40799: Ensure only the main query is modified when resolving template for new posts]

Follow-up to [52316].

Props petitphp, zieladam, poena, ndiego, gziolo, kebbet, Mamaduka, manfcarlo.
See #56058.
Built from https://develop.svn.wordpress.org/trunk@53593


git-svn-id: http://core.svn.wordpress.org/trunk@53181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-30 15:48:15 +00:00
desrosj
296c363bc1 Build/Test Tools: Correct some GitHub Action workflow inline documentation.
See #55652.
Built from https://develop.svn.wordpress.org/trunk@53592


git-svn-id: http://core.svn.wordpress.org/trunk@53180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-30 15:09:15 +00:00
desrosj
856cee1568 Build/Test Tools: Remove the workflow_run event from the Slack notification workflow.
The `workflow_run` event was added to restore Slack notifications for older branches (5.8 and older) without having to backport any changes while alternate approaches were explored.

The workflow has been tested and refined as a reusable one in `trunk`, and this approach is superior to the `workflow_run` event in several ways.

Primarily, the `workflow_run` event results in a separate workflow run being created for sending Slack notifications after the completion of each workflow triggered by `push`. When called as a reusable workflow, this does not happen and the additional jobs are instead added to the initial workflow. This makes which jobs are sending notifications for the current workflow more clear, and reduces the amount of noise (less workflow runs overall).

The `workflow_run` event also makes some data available in different ways than `push` events. By removing it, much of the logic within the workflow can be simplified.

See #56095.
Built from https://develop.svn.wordpress.org/trunk@53591


git-svn-id: http://core.svn.wordpress.org/trunk@53179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-30 14:07:14 +00:00