Commit Graph

21186 Commits

Author SHA1 Message Date
Sergey Biryukov
c7f946d961 Post WordPress 6.2 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@55454


git-svn-id: http://core.svn.wordpress.org/trunk@54987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 17:39:17 +00:00
Sergey Biryukov
1790e02848 WordPress 6.2 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@55453


git-svn-id: http://core.svn.wordpress.org/trunk@54986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 17:19:20 +00:00
Sergey Biryukov
932449e9fa Help/About: Improve help text about the WordPress URL and Site URL settings.
This aims to elaborate a bit more on the difference between these two settings, as well as explain the `http://` or `https://` prefix.

Follow-up to [15000], [19472].

Props marybaum, sabernhardt, tobifjellner, justinahinon, webcommsat, hellofromtonya, audrasjb, robinwpdeveloper, costdev, SergeyBiryukov.
Fixes #50886.
Built from https://develop.svn.wordpress.org/trunk@55452


git-svn-id: http://core.svn.wordpress.org/trunk@54985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 17:03:19 +00:00
ryelle
774a23c3c0 Administration: Update the Dashboard welcome banner for 6.2.
Props richtabor, markoserb, laurlittle.
See #57759.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:42:18 +00:00
audrasjb
3fdc61552e Media: Rename the wp_ajax_save_attachment action hook to wp_ajax_save_attachment_updated.
This changeset renames the `wp_ajax_save_attachment` action to `wp_ajax_save_attachment_updated` to avoid confusion with the similarly named `wp_ajax_save-attachment` action. This also add a dockblock note to indicate that when checking if an action is being done, `doing_action( 'wp_ajax_save-attachment' )` may be used if that is more convenient.

Follow-up to [55106].

Props azaozz, sc0ttkclark, costdev.
Fixes #23148

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


git-svn-id: http://core.svn.wordpress.org/trunk@54983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:32:20 +00:00
ryelle
7a4b3a5dab Help/About: Update the About page for 6.2.
This is the start of the WordPress 6.2 about page, introducing new content and a first pass of the new style.

Props laurlittle, jpantani, richtabor, audrasjb.
See #57477.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:30:20 +00:00
audrasjb
0b2a7b380f Editor: Ensure Global styles values are reset in the site editor.
This changeset fixes a bug by which the reset function of the global styles sidebar would not work as expected in the site editor. It reverts [54517] and adds related unit tests.

Props oandregal, ntsekouras, youknowriad, hellofromTonya.
Fixes #57824
See #56467

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


git-svn-id: http://core.svn.wordpress.org/trunk@54981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:17:18 +00:00
hellofromTonya
47c492b114 Editor: Exclude non-sticky posts in Query Loop Block when set to "Only".
Fixes a front-end issue to not include non-sticky posts in the Query Loop block when it's "Sticky Post" is set to "Only", meaning only show sticky posts.

This change was made in Gutenberg between 5.8 to 6.0, but was not merged into Core.

Reference:
* [42dad571ea/lib/compat/wordpress-6.1/blocks.php (L171-L183) Gutenberg code]

Follow-up to [50945].

Props RavanH, sc0ttkclark, ocean90, sc0ttkclark, hellofromTonya, ntsekouras.
Fixes #57822.
Built from https://develop.svn.wordpress.org/trunk@55447


git-svn-id: http://core.svn.wordpress.org/trunk@54980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 16:15:18 +00:00
audrasjb
c4593442cd Script Loader: Pass the asset path to the _doing_it_wrong() notice in register_block_script_handle().
This changeset ensures the file path is correctly passed in the output from `_doing_it_wrong()` notice in `register_block_script_handle()`.

Props desrosj, neychok, mahbubshovan, ironprogrammer, robinwpdeveloper, hellofromTonya, simongomes02, mukesh27, costdev.
Fixes #53566.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 15:59:41 +00:00
Sergey Biryukov
0c81b800a4 Tests: Ignore EOL differences in a wpautop() test for <math> block elements.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

This commit resolves a failure when running the test suite on Windows:
{{{
1) Tests_Formatting_wpAutop::test_skip_block_math_elements
Failed asserting that two strings are identical.
...
#Warning: Strings contain different line endings!
}}}

Follow-up to [55272].

Props davidbaumwald, ignatggeorgiev, sakibmd.
Fixes #57718.
Built from https://develop.svn.wordpress.org/trunk@55445


git-svn-id: http://core.svn.wordpress.org/trunk@54978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 15:58:24 +00:00
Sergey Biryukov
376748a097 Users: Use a separate variable for the post counts query in wp_list_authors().
This avoids a collision if `wp_list_authors()` is called with the `optioncount` parameter enabled, and the resulting array for the post counts query contains a key that matches the ID of a user who does not have any posts.

Follow-up to [54262].

Props peterwilsoncc, johnbillion, lifeboat, brookedot, thedaysse, Toru.
Fixes #57011.
Built from https://develop.svn.wordpress.org/trunk@55444


git-svn-id: http://core.svn.wordpress.org/trunk@54977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 15:39:27 +00:00
hellofromTonya
13195cfe8e Editor: Partial revert of r55230.
[55230] introduced a regression to the content markup. This changeset is a partial revert to remove the added `wp-includes/block-supports/anchor.php` file. 

The change of adding `'id'` to `$attributes_to_merge` in `get_block_wrapper_attributes()` is not reverted as this change did not impact the regression and helps to support continue development in Gutenberg for the anchor support in dynamic blocks feature.

Reference:
* [https://github.com/WordPress/gutenberg/pull/48592 Gutenberg PR 48592].

Follow-up [55230].

Props wildworks, mamaduka, hellofromTonya. 
Fixes #57830.
See #56852.
Built from https://develop.svn.wordpress.org/trunk@55443


git-svn-id: http://core.svn.wordpress.org/trunk@54976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 15:05:19 +00:00
Sergey Biryukov
f57f704bbb Tests: Add unit tests for get_next_posts_link() and get_previous_posts_link().
The tests ensure that the `next_posts_link_attributes` and `previous_posts_link_attributes` filters are applied correctly.

Follow-up to [1383], [5045], [8502], [9632], [55429].

Props geisthanen, mukesh27, costdev, audrasjb, SergeyBiryukov.
Fixes #55751.
Built from https://develop.svn.wordpress.org/trunk@55442


git-svn-id: http://core.svn.wordpress.org/trunk@54975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 14:45:20 +00:00
gziolo
27d51752d5 Build: Regenerate correctly the block-json.php file
See #57471.
Follow-up [55440].


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


git-svn-id: http://core.svn.wordpress.org/trunk@54974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 12:20:17 +00:00
gziolo
d444b56849 Update the WP packages with fixes prior to WP 6.2 beta 4
This updated the packages to the latest versions with the latest fixes.

Gutenberg changes: 35f10c1836

Includes the following bug fixes:

- Only add layout classes to inner wrapper if block is a container.
- Revert dynamic block anchor support
- [Inserter - Media tab]: Upload Openverse images when inserted
- SpacingSizesControl: Fix white dot on thumb
- Site Editor: update the edit button
- Change "Browse all templates" to "Manage all templates" in template details popover
- Remove TemplateAreas from template details
- Add support for orientation-based block movers to core/social-links
- Site Editor: polish add template modal style
- Match color of the focus template view with site dark material
- Site Editor: Fix routing for Classic themes using block-based template parts
- Remove broken site editor redirect
- Make the template customized info accessible
- Sort templates and template parts by slug
- Prevent distracting focused back button on site editor load
- Fix: Content only CPT template locking.
- Pin floating-ui/react-dom version
- Widget Importer: Don't render controls when there's nothing to import
- Post Editor: Update postContentBlock check to see if the block is valid
- Site Tagline: Add example so that it will display in style book
- Remove copy for managing a block's style variations
- Fix the site editor home page loading when installed in a subdirectory
- Global Styles: Display preset names via the tooltip
- [Query Loop] Fix top border in pattern selection modal
- Site Editor: Fix the 'Browse all' link in the template details modal
- Site Editor: Fix the tooltip and shortcut for the global save button
- Make the Site Logo block placeholder state smaller
- Site Editor Sidebar: Add line-height for template/parts name and update width for edit button
- Style Book: Focus the Style Book when opened, and enable ESCAPE key to close
- [Site Editor]: Set html block as freeform fallback block
- Make the performance tests more stable
- Adds all allowed innerblocks to the inspector animation experiment
- Revert Link control UX changes for WP 6.2
- Fix Site Editor perf tests
- Playwright: fix request utils for non Docker envs

See #57471.
Props Mamaduka, ntsekouras.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 12:05:03 +00:00
gziolo
b68b0ad84d Editor: Only add layout classes to inner wrapper if block is a container
Backport of https://github.com/WordPress/gutenberg/issues/48606, which fixes an issue found in adding fixtures for deprecated Gallery block versions in #55571.

See #55571.
Fixes #57831.
Props isabel_brison, Mamaduka, dasnitesh780.



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


git-svn-id: http://core.svn.wordpress.org/trunk@54972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 11:47:19 +00:00
gziolo
12995d49e4 Editor: Correctly merge custom CSS into global styles
Update the get_block_editor_settings function and merge custom CSS directly into the $global_styles array.

Fixes #57833.
Props Mamaduka, poena, sakibmd.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 11:43:20 +00:00
Andrew Ozz
e9d290a104 Media: Revert the addition of a $size parameter to get_attached_file().
Reverts [55199], [55202], and [55217] but keeps the updated docs.

Props: flixos90, joedolson, azaozz.
Fixes: #51780.
Built from https://develop.svn.wordpress.org/trunk@55437


git-svn-id: http://core.svn.wordpress.org/trunk@54970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-01 00:36:24 +00:00
hellofromTonya
5d05653b2f Editor: Deprecate _resolve_home_block_template().
The internal Core-only `_resolve_home_block_template()` function was introduced in [53093] for a specific purpose of resolving the template for a site's home page. It was used as part of the Site Editor's redirect when the `postType` and `postId` query args were missing. The server-side handling was removed in [55338]. The function is no longer used in Core.

This changeset deprecates the function and removes its tests.

Follow-up to [55338], [53093].

Props johnbillion, hellofromTonya.
Fixes #57716.
Built from https://develop.svn.wordpress.org/trunk@55436


git-svn-id: http://core.svn.wordpress.org/trunk@54969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 15:07:23 +00:00
hellofromTonya
278725acba Site Editor: Add 'path' query arg to Appearance > Template Parts menu.
To display a list of block-based template parts for classic themes, this changeset adds a `path` query arg to the Appearance > Template Parts menu URL. This change is necessary due to recent changes to Site Editor's client-side routing.

Reference:
* [https://github.com/WordPress/gutenberg/pull/48343 Gutenberg PR 48343]
* [https://github.com/WordPress/gutenberg/pull/42729 Gutenberg PR 42729]

Follow-up to [55392], [54176].

Props mamaduka, audrasjb, fabiankaegy, hellofromTonya, kevin940726, mukesh27, youknowriad.
Fixes #57819.
Built from https://develop.svn.wordpress.org/trunk@55435


git-svn-id: http://core.svn.wordpress.org/trunk@54968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 15:04:23 +00:00
Sergey Biryukov
f6b1fd3205 Help/About: Restore the correct URL for Editing Files article on Edit Themes screen.
Replace the URL for Editing Themes article instead to avoid an extra redirect.

Follow-up to [55432].

See #57726.
Built from https://develop.svn.wordpress.org/trunk@55434


git-svn-id: http://core.svn.wordpress.org/trunk@54967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 13:52:20 +00:00
Sergey Biryukov
0449c238bd Users: Adjust the initialization of the $duplicated_keys array in wp_salt().
This avoids an endless loop if `get_current_user_id()` is used in a callback attached to the `gettext` filter.

With the translated phrase moved into a separate assignment, the function succeeds in setting the static `$duplicated_keys` array once and no longer goes into this code section on subsequent calls.

Follow-up to [54249].

Props adityaarora010196, SergeyBiryukov.
Fixes #57121.
Built from https://develop.svn.wordpress.org/trunk@55433


git-svn-id: http://core.svn.wordpress.org/trunk@54966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 13:22:22 +00:00
audrasjb
933bb3999b Help/About: Avoid extra redirections on HelpHub Links.
This changeset replaces various HelpHub links that have changed to avoid extra 301 redirections.

Follow-up to [55412], [55413], [55414], [55415], [55416], [55431].

Props sabernhardt, audrasjb.
Fixes #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 12:52:18 +00:00
audrasjb
7939ee8926 Help/About: Use a consistent capitalization for "Support forums" links across WP Admin.
This partially reverts [55415] and fix a few inconsistencies found in "support forums" links.

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

Props sabernhardt, audrasjb.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 12:48:23 +00:00
Peter Wilson
baf4e6021f Formatting: Add aspect-ratio tests for safecss_filter_attr().
Follow up to [55309].

Props rahmohn, desrosj, mukesh27.
Fixes #57664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-28 02:52:20 +00:00
audrasjb
fa42e86adf Build/Test Tools: Add test coverage for the get_posts_navigation() function.
This changeset adds a test case to verify that `get_the_posts_navigation()` only includes the "Older posts" and "Newer" posts links when appropriate.

Props jongycastillo, michelmany, joyously, geisthanen, SergeyBiryukov, mukesh27, audrasjb, costdev, sun, chrisbaltazar.
Fixes #55751.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-27 23:16:20 +00:00
audrasjb
5170ad3bac Docs: Fix erroneous @since mention in wp_internal_hosts hook.
Follow-up to [55289].

Props wildworks, SergeyBiryukov, simongomes02.
Fixes #57796.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-27 22:55:22 +00:00
Felix Arntz
26ab805ad4 Twenty Twenty: Avoid PHP warnings in 8.1 due to incorrect usage of wp_add_inline_style().
This changeset adjusts the logic to use a more defensive approach, to avoid passing potentially invalid values to `wp_add_inline_style()`.

Props flixos90, mukesh27, costdev, swissspidy, poena, sabernhardt.
Fixes #57777.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-27 17:32:18 +00:00
Sergey Biryukov
58d7cd099e Themes: Account for a numeric theme directory in WP_Theme::__construct().
This ensures that if a theme with a numeric directory name is active, it is correctly identified as such, and that theme support features work as expected.

Follow-up to [20029], [49925].

Props lopo, alvastar, winterpsv, hugodevos, ankit-k-gupta, jakariaistauk, mukesh27, spacedmonkey, SergeyBiryukov.
Fixes #54645.
Built from https://develop.svn.wordpress.org/trunk@55426


git-svn-id: http://core.svn.wordpress.org/trunk@54959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-27 15:34:23 +00:00
Sergey Biryukov
04967a68b6 Upgrade/Install: Introduce WP_Automatic_Updater::is_allowed_dir() method.
As part of determining whether to perform automatic updates, WordPress checks if it is running within a version-controlled environment, recursively looking up the filesystem to the top of the drive, looking for a Subversion, Git, Mercurial, or Bazaar directory, erring on the side of detecting a VCS checkout somewhere.

This commit avoids a PHP warning if the `open_basedir` directive is in use and any of the directories checked in the process are not allowed:
{{{
is_dir(): open_basedir restriction in effect. File(/.git) is not within the allowed path(s)
}}}

Follow-up to [25421], [25700], [25764], [25835], [25859].

Props costdev, markjaquith, meyegui, dd32, arnolp, robin-labadie, hellofromTonya, afragen, pbiron, SergeyBiryukov.
Fixes #42619.
Built from https://develop.svn.wordpress.org/trunk@55425


git-svn-id: http://core.svn.wordpress.org/trunk@54958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-26 15:19:21 +00:00
Sergey Biryukov
325a14a3ef Docs: Correct duplicate hook reference for notify_moderator.
The original filter location is `wp_notify_moderator()` in `wp-includes/pluggable.php`.

This commit updates the instance in `wp_new_comment_notify_moderator()` to point to the correct file.

Follow-up to [35339], [35725].

Props zevilz.
Fixes #57808.
Built from https://develop.svn.wordpress.org/trunk@55424


git-svn-id: http://core.svn.wordpress.org/trunk@54957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-25 21:56:21 +00:00
Sergey Biryukov
66937c7dce General: Add more error checking to WP_List_Util::pluck().
Values for the input array in `WP_List_Util::pluck()` or `wp_list_pluck()` must be either objects or arrays.

This commit adds a check to ensure that the value retrieved in the loop is an array before treating it as such, and throws a `_doing_it_wrong()` notice if it is neither an object nor an array.

Follow-up to [14108], [15686], [18602], [28900], [38928].

Props afragen, costdev, audrasjb.
Fixes #56650.
Built from https://develop.svn.wordpress.org/trunk@55423


git-svn-id: http://core.svn.wordpress.org/trunk@54956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-25 10:59:22 +00:00
Sergey Biryukov
5f0e3de1f8 Twenty Seventeen: Mark one more screen reader string with a translator comment.
Includes minor comment layout fixes for consistency with other themes.

Follow-up to [55276].

See #29748.
Built from https://develop.svn.wordpress.org/trunk@55422


git-svn-id: http://core.svn.wordpress.org/trunk@54955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-24 15:26:18 +00:00
Sergey Biryukov
89f39839ab Database: Remove the check for sitecategories table on Database Repair screen.
The table is no longer created by core as of WordPress 3.0, and support for global terms was removed in WordPress 6.1, so `$wpdb->sitecategories` is unset by default.

This commit resolves a "passing null to non-nullable" deprecation notice on PHP 8.1:
{{{
Deprecated: addcslashes(): Passing null to parameter #1 ($string) of type string is deprecated in wp-includes/class-wpdb.php on line 1804
}}}

The `tables_to_repair` filter is available for plugins to readd the table or include any additional tables to repair.

Follow-up to [14854], [14880], [54240].

Props ipajen, chiragrathod103, SergeyBiryukov.
Fixes #57762.
Built from https://develop.svn.wordpress.org/trunk@55421


git-svn-id: http://core.svn.wordpress.org/trunk@54954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-24 15:10:22 +00:00
Sergey Biryukov
803426a023 Coding Standards: Use strict comparison in bundled themes' PHP files.
This addresses all the remaining WPCS warnings in bundled themes.

Includes using the correct type when checking the number of comments, as `get_comments_number()` returns a numeric string, not an integer.

Follow-up to [41285], [44562], [47941].

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


git-svn-id: http://core.svn.wordpress.org/trunk@54953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-24 06:23:23 +00:00
Sergey Biryukov
896f5ef18f Posts, Post Types: Pass the post object to _update_posts_count_on_delete().
The function checks the status of the post being deleted, and then only calls `update_posts_count()` if the deleted post was previously published, as the update query would be unnecessary otherwise.

However, by the time the function runs, the post is already deleted from the database, and the post status check fails.

This commit uses the previously retrieved post object for the status check, so that the function proceeds as expected.

Includes updating the unit test to call `wp_delete_post()` with the `$force_delete` argument, so that the post is actually deleted, not trashed, and the `after_delete_post` action is run.

Follow-up to [28835], [52207], [54760], [54762].

Fixes #57023.
Built from https://develop.svn.wordpress.org/trunk@55419


git-svn-id: http://core.svn.wordpress.org/trunk@54952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-24 01:23:20 +00:00
joedolson
f51b63c1fe Networks and Sites: Use consistent markup for admin notices.
Fix admin notices in network screens so they use consistent markup and style.

Props afercia, marksabbath, stevenkword, jeremyfelt, aryamaaru, robinwpdeveloper, obayedmamur, joedolson.
Fixes #39213.
Built from https://develop.svn.wordpress.org/trunk@55418


git-svn-id: http://core.svn.wordpress.org/trunk@54951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 22:13:23 +00:00
Felix Arntz
259af07d2b Editor: Fix invalid parameters being passed to wp_register_style().
Boolean `true` is not a valid value for the `$ver` or `$media` parameters of `wp_register_style()`.

Props sabernhardt, flixos90, hellofromtonya.
Fixes #57771. See #56990, #57688.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 21:34:19 +00:00
Sergey Biryukov
1356f65372 Toolbar: Update the URL for Documentation link in the admin bar.
This avoids an extra redirect from `https://wordpress.org/support/` to `https://wordpress.org/documentation/`.

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

See #57726.
Built from https://develop.svn.wordpress.org/trunk@55416


git-svn-id: http://core.svn.wordpress.org/trunk@54949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 12:34:18 +00:00
audrasjb
54dd6eda90 Help/About: Use a consistent capitalization for "Support forums" links across WP Admin.
Follow-up to [55412], [55413].

See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 11:13:22 +00:00
audrasjb
34229a4286 Help/About: Avoid extra redirections on HelpHub Links.
This changeset replaces various HelpHub links that have changed to avoid extra 301 redirections.

Props sabernhardt, audrasjb.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 11:06:19 +00:00
audrasjb
0000d83e08 Help/About: Use the new /documentation/ URLs for HelpHub links in Bundled Themes.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/article/*` links with `/documentation/article/*` to avoid an extra redirect.

This also updates links to Support Forums by replacing `https://wordpress.org/support/` URLs with `https://wordpress.org/support/forums/`.

Props SergeyBiryukov, audrasjb, dhrupo, hasanmisbah, sakibmd, sabernhardt.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:49:19 +00:00
audrasjb
418a21fdbc Help/About: Use the new /documentation/ URLs for HelpHub links in WordPress Admin.
As `https://wordpress.org/support/` was redirected to `https://wordpress.org/documentation/`, this changeset replaces various `/support/article/*` links with `/documentation/article/*` to avoid an extra redirect.

This also updates links to Support Forums by replacing `https://wordpress.org/support/` URLs with `https://wordpress.org/support/forums/`.

Props SergeyBiryukov, audrasjb, dhrupo, hasanmisbah, sakibmd, sabernhardt.
See #57726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:38:21 +00:00
audrasjb
8771b175cd Mail: Fix character encoding issues in Plugin/Theme background update emails.
This changeset fixes encoding issues in background update emails by applying `html_entity_decode()` on Plugin/Theme names in `send_plugin_theme_email()`.

Props paulschreiber, audrasjb, benjgrolleau, sanketchodavadiya, robinwpdeveloper, paulamit.
Fixes #56964.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-23 10:07:26 +00:00
audrasjb
e61ec90f68 Administration: Move wp-theme-plugin-editor script before </body>.
This changeset moves the `wp-theme-plugin-editor` admin script before `</body>` instead of in the `<head>`. This fixes an issue where the collapse admin menu feature was not working in the Theme|Plugin File Editor screens.

Props itsnikhilpatel, dilipbheda, stalukder03, audrasjb, adeltahri, Ankit-K-Gupta, mahbubshovan.
Fixes #57073.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 23:39:17 +00:00
joedolson
0f98f3142c Widgets: Match variable types in rss feed link filter.
The `rss_widget_feed_link` filter added in [52031] documents the parameter as a string, but recommends removing by returning false. Change the recommendation and documentation to make this consistent and update Twenty Twenty One to use the new recommended return value. Maintains documentation as possibly returning `false` for backwards compatibility.

Props sabernhardt, Mista-Flo.
Fixes #57594.
Built from https://develop.svn.wordpress.org/trunk@55409


git-svn-id: http://core.svn.wordpress.org/trunk@54942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 22:02:23 +00:00
John Blackbourn
9ddb112d51 Networks and Sites: Remove confusing upper case for option names on Edit Site: Settings screen.
This type of transformation isn't always appropriate, especially for non-English language sites. Displaying the original option name makes it more clear what option is being changed.

Props SergeyBiryukov, sabernhardt, afrin29, afshanadiya

Fixes #50572

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


git-svn-id: http://core.svn.wordpress.org/trunk@54941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 20:57:18 +00:00
hellofromTonya
1579f32cc6 HTML API: Fix finding bookmarks set on closing tag WP_HTML_Tag_Processor.
Setting a bookmark on a tag should set its "start" position before the opening "<", e.g.:
{{{
<div> Testing a <b>Bookmark</b>
----------------^
}}}

The previous calculation assumed this is always one byte to the left from `$tag_name_starts_at`.

However, in a closing tag that index points to a solidus symbol "/":
{{{
<div> Testing a <b>Bookmark</b>
----------------------------^
}}}

The bookmark should therefore start two bytes before the tag name:
{{{
<div> Testing a <b>Bookmark</b>
---------------------------^
}}}

This changeset achieves this by:
* Using the correct starting index for closing tag bookmarks.
* Adding `array( 'tag_closers' => 'visit' )` in `WP_HTML_Tag_Processor::seek()`.

Follow-up to [55203].

Props zieladam, dmsnell, flixos90.
Fixes #57787.
See #57575.
Built from https://develop.svn.wordpress.org/trunk@55407


git-svn-id: http://core.svn.wordpress.org/trunk@54940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 20:55:23 +00:00
John Blackbourn
ffc55e249f Revisions: Remove an unnecessary call to _doing_it_wrong() and corresponding new text string from the implementation of the new wp_save_post_revision_revisions_before_deletion filter.
While the guard condition was technically correct, it's not practical or necessary to provide this protection for every use of every filter, and it adds unnecessary burden to translators to provide translations for strings that will likely not be seen.

Follow up to [55254].

Fixes #57320

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


git-svn-id: http://core.svn.wordpress.org/trunk@54939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 20:49:20 +00:00
hellofromTonya
93dfe28aaf Themes: Add 3 and update 2 shadow presets in theme.json.
Adds Deep, Outlined, and Crisp default shadow presets to Core's `theme.json` file.

Updates the Natural and Sharp `'shadow'` styles.

These shadow presets are used to populate the Shadow tools in the Site Editor's Global Styles UI.

References:
* [https://github.com/WordPress/gutenberg/pull/46502 Gutenberg PR 46502]

Follow-up to [55176].

Props franz00, madhudollu, ajlende, beafialho, costdev, dhrupo, fabiankaegy, hellofromTonya, jameskoster, joen, kellychoffman, mamaduka, mtias, oandregal, priethor, richtabor, scruffian. 
Fixes #57708.
See #57559.
Built from https://develop.svn.wordpress.org/trunk@55405


git-svn-id: http://core.svn.wordpress.org/trunk@54938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 16:00:21 +00:00
Sergey Biryukov
3533ec3159 Media: Add WP_Image_Editor_Imagick::set_imagick_time_limit() method.
This aims to avoid timeout in Imagick operations.

Previously, Imagick operations could silently error by timeout and produce unexpected results. The new `::set_imagick_time_limit()` method, now used in `::resize()` and `::crop()`, will better handle garbage collection in these cases as well as better align Imagick's timeout with PHP timeout, assuming it is set.

Props drzraf, audrasjb, costdev, antpb, SergeyBiryukov.
Fixes #52569.
Built from https://develop.svn.wordpress.org/trunk@55404


git-svn-id: http://core.svn.wordpress.org/trunk@54937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 14:25:25 +00:00
gziolo
582feb3ffb HTML API: Set $this->html to protected to support subclassing
When the HTML API was introduced a number of fields were switched from private visibility to protected so that Gutenberg and other systems could more easily enhance the behaviors through subclassing. The $this->html property was overlooked but important for systems using the Tag Processor to stich HTML, specifically performing operations on innerHTML and innerText.

Follow-up [55203].
Props dmsnell.
See #57575.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-22 06:24:22 +00:00
Dominik Schilling
6d0eaf9674 Taxonomy: Rename temporary variable in wp_queue_posts_for_term_meta_lazyload().
This ensures the `$term_ids` variable only contains term IDs and is not filled with full term objects due to deprecated term caching.

Introduced in [55252].

Props skithund, Chouby, joemcgill, flixos90, ocean90.
Fixes #57150.
Built from https://develop.svn.wordpress.org/trunk@55401


git-svn-id: http://core.svn.wordpress.org/trunk@54934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 21:04:17 +00:00
audrasjb
dd87b5a4bd Post WordPress 6.2 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@55400


git-svn-id: http://core.svn.wordpress.org/trunk@54933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 18:06:25 +00:00
audrasjb
2e1bc6e81e WordPress 6.2 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@55399


git-svn-id: http://core.svn.wordpress.org/trunk@54932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 17:24:21 +00:00
Sergey Biryukov
77dfc892fe Docs: Document default values for optional parameters in various DocBlocks.
Props paulkevan, costdev, audrasjb, SergeyBiryukov.
See #56792.
Built from https://develop.svn.wordpress.org/trunk@55398


git-svn-id: http://core.svn.wordpress.org/trunk@54931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 16:39:19 +00:00
TimothyBlynJacobs
9b806a3114 Recovery Mode: Use PasswordHash API directly when validating keys.
Previously, the wp_check_password function was used for validating keys, while the PasswordHash class was used for creating keys. This would prevent Recovery Mode from working on sites that provide a custom implementation for the wp_check_password pluggable function.

Props calvinalkan.
Fixes #56787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 15:59:18 +00:00
audrasjb
57d8df8ab1 Users: Fix confirmation link for multisite users with no role.
This fixes a regression introduced in [41163], where the link in change confirmation emails for users with no roles in a multisite install was incorrect, causing them to be unable to change their email address. This changeset replaces `admin_url()` with `self_admin_url()` to restore the previous fix.

Follow-up to [38876], [40632], [41165], [41163].

Props roytanck, SergeyBiryukov, johnbillion, afrin29.
Fixes #57164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 15:55:19 +00:00
hellofromTonya
f579bc0356 Comments: Restore global $comment assignment in comment_form_title().
Restores the global `$comment` assignment in `comment_form_title()`, which was mistakely removed in [55369].

As noted in the function's DocBlock:
{{{
@internal The $comment global must be present to allow template tags access to the current comment. See https://core.trac.wordpress.org/changeset/36512.
}}}

Follow-up to [55369].

Props hellofromTonya, costdev.
Fixes #53962.
Built from https://develop.svn.wordpress.org/trunk@55395


git-svn-id: http://core.svn.wordpress.org/trunk@54928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 15:28:17 +00:00
audrasjb
a8c80af126 Networks and Sites: Fix the attributes for the email input field on the new network user screen.
This reverts the email input field back to its previous state (before [55026]), except for the expected addition of the `required` attribute.

Follow-up to [55026].

Props johnbillion.
Fixes #38460.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 14:52:18 +00:00
Sergey Biryukov
8211ef5c3a Tests: Remove duplicate DocBlock opening characters in tests/theme/wpTheme.php.
Follow-up to [814/tests], [904/tests], [50967].

Props mukesh27, costdev.
See #56792.
Built from https://develop.svn.wordpress.org/trunk@55393


git-svn-id: http://core.svn.wordpress.org/trunk@54926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 13:55:19 +00:00
gziolo
2b08f8960b Update the WP packages with fixes prior to WP 6.2 beta 3
Includes the following changes:

- Upgrade Playwright to 1.30.0
- [Block Editor - Inserter]: preload media categories empty check - client side
- Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector
- Fix: OffCanvasEditor does not inserts submenu on collapsed items.
- OffCanvasEditor: Only allow some blocks to be converted to submenus
- Navigation: Updates "Add Submenu item" text to "Add Submenu link"
- Update: Make OffCanvasEditor use LeafMoreMenu by default.
- Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet()
- Widget Editor: Fix a problem with 'Move to Widget Area' button not working
- Reusable Blocks: Use React 18 rendering for import dropdown
- useAsyncList: flush state updates when processing queue
- Refactor the site editor URLs for better backward compatibility
- Template editor: only disable the save button if no changes rather than hiding it
- [Quote]: Fix deprectated large style specificity rule
- Style Book: Allow button text labels for style book icon
- List View: Scroll selected block into view when single block selection changes
- Post editor: revert iframed editor for WP core only
- Fix the Publish region position and focus style.
- Remove "& Shadow" from the Border ScreenHeader title
- Site editor: specify focus state color for template navigation button

References: [1e2b2f680c Gutenberg's commit for publishing the packages]

Props ntsekouras, ellatrix.
See #57471.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 13:09:42 +00:00
Peter Wilson
770f413fe7 HTTP API: Add fragment support to WP_Http::make_absolute_url().
Modifies `WP_Http::make_absolute_url()` to prevent it from dropping URL fragments, this in turn fixes the same issue for `links_add_base_url()`.

Props costdev, sergeybiryukov, dshanske, schlessera, jrf, desrosj, dd32.
Fixes #56231.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 01:49:20 +00:00
Peter Wilson
a77704f1a3 Comments: Prevent replying to unapproved comments.
Introduces client and server side validation to ensure the `replytocom` query string parameter can not be exploited to reply to an unapproved comment or display the name of an unapproved commenter.

This only affects commenting via the front end of the site. Comment replies via the dashboard continue their current behaviour of logging the reply and approving the parent comment.

Introduces the `$post` parameter, defaulting to the current global post, to `get_cancel_comment_reply_link()` and `comment_form_title()`.

Introduces `_get_comment_reply_id()` for determining the comment reply ID based on the `replytocom` query string parameter.

Renames the parameter `$post_id` to `$post` in `get_comment_id_fields()` and `comment_id_fields()` to accept either a post ID or `WP_Post` object.

Adds a new `WP_Error` return state to `wp_handle_comment_submission()` to prevent replies to unapproved comments. The error code is `comment_reply_to_unapproved_comment` with the message `Sorry, replies to unapproved comments are not allowed.`.

Props costdev, jrf, hellofromtonya, fasuto, boniu91, milana_cap.
Fixes #53962.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 01:45:24 +00:00
hellofromTonya
5bf74c0433 Editor: Fix 'wp-block-library-theme' style enqueue conditions.
Fixes the conditions for when to enqueue the opinionated block styles (i.e. `'wp-block-library-theme'` stylesheet):

* the theme adds `'wp-block-styles'` theme support;
* and no editor styles are declared.

This resolves an issue with themes that do not add the `'wp-block-styles'` theme support while not impacting themes that do.

Follow-up to [53419], [52069], [50761], [44157].

Props mikachan, costdev, glendaviesnz, hellofromTonya, jffng, mamaduka, ndiego, poena, sannevndrmeulen, scruffian.
Fixes #57561.
Built from https://develop.svn.wordpress.org/trunk@55368


git-svn-id: http://core.svn.wordpress.org/trunk@54901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-20 21:13:27 +00:00
Sergey Biryukov
89a3b0e9f2 Bootstrap/Load: Check that either mysqli_connect() or mysql_connect() is available.
This resolves a fatal error and displays an actionable message if the `mysqli` PHP extension is missing.

Previously, `wp_check_php_mysql_versions()` performed an early check whether `mysql`, `mysqli`, or `mysqlnd` extensions are loaded, but that did not work if the `mysqlnd` extension is the only one present.

Checking specifically for `mysqli_connect()` or `mysql_connect()` functions should be a more reliable approach and more closely mirrors the existing checks in the `wpdb` class.

Follow-up to [1955], [4489], [7234], [12732], [19760], [27257], [36434].

Props bgin, desrosj, dimadin, ipajen, hellofromTonya, sc0ttkclark, azaozz, SergeyBiryukov.
Fixes #51988.
Built from https://develop.svn.wordpress.org/trunk@55367


git-svn-id: http://core.svn.wordpress.org/trunk@54900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-20 16:05:19 +00:00
gziolo
4046f55c78 Backport editor changes from Gutenberg for WordPress 6.2 Beta 3
Updates the `@wordpress` packages to include the following change:

- Pin `valtio` version

References: [ccabeeffe1 Gutenberg's commit for publishing the packages]

Props ntsekouras.
See #57471.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-20 13:29:05 +00:00
Sergey Biryukov
1553e3fa00 Coding Standards: Rename $post_ID variable to $post_id in various files.
The `$post_ID` variable is [546f59c678/WordPress/Sniffs/NamingConventions/ValidVariableNameSniff.php (L54) technically allowed in WPCS], as there is a global of the same name that needs to remain for backward compatibility. However, this name is mostly a remnant of legacy code, and switching to `$post_id` where appropriate brings more consistency with the rest of core.

Additionally, this commit resolves a few WPCS warnings in core:
{{{
Variable "$post_IDs" is not in valid snake_case format
}}}

This affects:
* Function parameters in:
 * `add_meta()`
 * `post_preview()`
 * `WP_Embed::delete_oembed_caches()`
 * `WP_Embed::cache_oembed()`
 * `wp_get_post_cats()`
 * `wp_set_post_cats()`
 * `wp_unique_post_slug()`
 * `wp_set_post_categories()`
 * `wp_check_post_hierarchy_for_loops()`
 * `wp_add_trashed_suffix_to_post_name_for_trashed_posts()`
 * `wp_filter_wp_template_unique_post_slug()`
 * `wp_xmlrpc_server::add_enclosure_if_new()`
 * `wp_xmlrpc_server::attach_uploads()`
 * `wp_xmlrpc_server::mt_getTrackbackPings()`
* Internal variables in:
 * `wp_ajax_inline_save()`
 * `wp_ajax_set_post_thumbnail()`
 * `wp_ajax_get_post_thumbnail_html()`
 * `edit_post()`
 * `bulk_edit_posts()`
 * `wp_write_post()`
 * `WP_Embed::shortcode()`
 * `wp_insert_post()`
 * `wp_xmlrpc_server::_insert_post()`
 * `wp_xmlrpc_server::blogger_getPost()`
 * `wp_xmlrpc_server::blogger_newPost()`
 * `wp_xmlrpc_server::blogger_editPost()`
 * `wp_xmlrpc_server::blogger_deletePost()`
 * `wp_xmlrpc_server::mw_getPost()`
 * `wp_xmlrpc_server::mw_newPost()`
 * `wp_xmlrpc_server::mw_editPost()`
 * `wp_xmlrpc_server::mt_getPostCategories()`
 * `wp_xmlrpc_server::mt_setPostCategories()`
 * `wp_xmlrpc_server::mt_publishPost()`
 * `wp_xmlrpc_server::pingback_ping()`
* Hook parameters in:
 * `oembed_ttl`
 * `embed_oembed_html`
 * `wp_insert_post_parent`
 * `add_trashed_suffix_to_trashed_posts`
 * `pre_post_update`
 * `edit_attachment`
 * `attachment_updated`
 * `add_attachment`
 * `edit_post_{$post->post_type}`
 * `edit_post`
 * `post_updated`
 * `save_post_{$post->post_type}`
 * `save_post`
 * `wp_insert_post`
 * `pre_wp_unique_post_slug`
 * `wp_unique_post_slug`
 * `xmlrpc_call_success_blogger_newPost`
 * `xmlrpc_call_success_blogger_editPost`
 * `xmlrpc_call_success_blogger_deletePost`
 * `xmlrpc_call_success_mw_newPost`
 * `xmlrpc_call_success_mw_editPost`

Note: The name change only affects variable names and DocBlocks.

The change does not affect the `$post_ID` global still used in a few places.

Follow-up to [51399], [52958], [53723], [53729], [55190], [55308], [55334].

Props mahekkalola, tanjimtc71, SergeyBiryukov.
Fixes #57692.
Built from https://develop.svn.wordpress.org/trunk@55365


git-svn-id: http://core.svn.wordpress.org/trunk@54898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-19 15:05:22 +00:00
Sergey Biryukov
454752d283 Coding Standards: Improve variables names in post and comment page link functions.
This commit renames a few internal variables for better clarity and consistency:

* `$nextpage` to `$next_page` in:
 * `get_next_posts_page_link()`
 * `get_next_posts_link()`
 * `get_next_comments_link()`
* `$nextpage` to `$previous_page` in:
 * `get_previous_posts_page_link()`
* `$prevpage` to `$previous_page` in:
 * `get_previous_comments_link()`

Includes minor code layout fixes for better readability.

Follow-up to [5045], [8502], [8961], [28111].

Props dalirajab, SergeyBiryukov.
Fixes #57746.
Built from https://develop.svn.wordpress.org/trunk@55364


git-svn-id: http://core.svn.wordpress.org/trunk@54897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-18 15:09:18 +00:00
Sergey Biryukov
89bb47e4e1 Docs: Add www. prefix to some PHP manual links in code comments.
This avoids an extra redirect and brings more consistency with other links to the PHP website in core.

Follow-up to [42980], [50914], [55355].

See #56792.
Built from https://develop.svn.wordpress.org/trunk@55363


git-svn-id: http://core.svn.wordpress.org/trunk@54896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-18 14:23:21 +00:00
danielbachhuber
07720ec51f REST API: Only use Latin characters in test filenames.
Non-Latin characters can break SVN checkout in some environments.

Follow up from [55294].

See #57329, #57761.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 18:39:22 +00:00
TimothyBlynJacobs
42b25d58ea REST API: Normalize WP_REST_Server::dispatch() to return a response object.
Previously, the `rest_pre_dispatch` filter could be used to return a `WP_Error` instance. This would cause a fatal error for `rest_post_dispath` 
filters that were rightly expecting a `WP_REST_Response` object to be passed instead.

Props DaveFX, felipeelia.
Fixes #56566.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 15:45:24 +00:00
Sergey Biryukov
db71029a47 Users: Correct the error code in wp_insert_user() when login matches an existing email.
Move the test next to the other tests for `user_login`.

Follow-up to [55358].

See #57394.
Built from https://develop.svn.wordpress.org/trunk@55360


git-svn-id: http://core.svn.wordpress.org/trunk@54893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 10:15:22 +00:00
audrasjb
818e9581a8 Upgrade/Install: Update available theme updates count when a theme si deleted.
This changeset fixes an issue where the available theme updates count was not updated after a theme is deleted.

Props nazmulhasan103, riccardodicurti, sabernhardt, ironprogrammer, costdev, robinwpdeveloper, rahmantasnia.
Fixes #57183.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 09:54:19 +00:00
Adam Silverstein
1b873c8a19 Login and Registration: prevent registering with username that matches previous user email.
When registering a new user, check that no existing user has an email matching the username.

Prevents a login name collision when one user registers with the email address user@test.com and a second user tries to register with the username user@test.com.

Props buutqn, dunhakdis, roytanck, ajayver.
Fixes #57394.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-17 08:10:22 +00:00
audrasjb
f0789b6423 Docs: Replace HTTP with HTTPS in PHP Manual links located in WP_Privacy_Policy_Content class.
Follow-up to [55355].

See #56792, #57017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 23:11:28 +00:00
audrasjb
5fd4961a97 Docs: Replace HTTP with HTTPS in PHP Manual links located in wp-load.php.
Props shamimmiashuhagh.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 23:08:20 +00:00
Andrew Ozz
e3d1a1291f Filesystem API: Use trailingslashit( $path ) instead of $path . '/'. Fixes a warning when $path already ends with a slash.
Props: costdev, afragen, mukesh27.
Fixes: #57516.
Built from https://develop.svn.wordpress.org/trunk@55354


git-svn-id: http://core.svn.wordpress.org/trunk@54887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 22:13:28 +00:00
Helen Hou-Sandí
c54e29fd68 Build/Test Tools: Improve devcontainer setup for non-Codespaces usage
This now runs in local Docker as well. Sets the executable propset to explicitly identify `install-tool.sh` and `setup.sh` as executable. Unclear if this will sync via the Git mirror; ideally it would as otherwise the two files show as modified in a Git clone even in a fresh container.

Props samruddhikhandale.
See #57187.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 03:50:19 +00:00
Sergey Biryukov
6ead8cfda8 Coding Standards: Replace strval() with (string) type casting in wp_nav_menu().
This adjusts a newly introduced instance for consistency with the rest of core.

Follow-up to [49108], [55059].

See #57169.
Built from https://develop.svn.wordpress.org/trunk@55352


git-svn-id: http://core.svn.wordpress.org/trunk@54885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-16 00:04:21 +00:00
Sergey Biryukov
f8dd6946fc I18N: Check that $wp_locale global is set before calling its methods.
This avoids a fatal error if these functions are called in a mu-plugin before `$wp_locale` is set:
* `wp_get_list_item_separator()`
* `wp_get_word_count_type()`

Follow-up to [52929], [52933], [55279], [55295].

Props kraftbj.
Fixes #56698.
Built from https://develop.svn.wordpress.org/trunk@55351


git-svn-id: http://core.svn.wordpress.org/trunk@54884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 23:37:17 +00:00
audrasjb
ae9744d1cc I18N: Add new strings to about.php for use with end-of-life updates.
This changeset adds two additional translation strings in the changelog file, for use when releasing the final version of WordPress on a particular branch.

Props peterwilsoncc, audrasjb, mukesh27, mukesh27.
Fixes #57216.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 23:33:18 +00:00
audrasjb
0bccdce442 Docs: Use correct 6.2.0 @since version in multiple docblocks.
Props kebbet, audrasjb, mukesh27.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 22:56:20 +00:00
Sergey Biryukov
b62555410f Docs: Update the wording for the Update Services link on Writing Settings screen.
The Codex URL was replaced with the corresponding HelpHub article a while ago.

Follow-up to [49912].

See #48987.
Built from https://develop.svn.wordpress.org/trunk@55347


git-svn-id: http://core.svn.wordpress.org/trunk@54880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 19:18:18 +00:00
Sergey Biryukov
b9a31d5343 Docs: Improve code comments in some sanitizing functions.
This aims to clarify a few inline comments related to removing percent-encoded characters and HTML entities.

Affected functions:
* `sanitize_user()`
* `sanitize_title_with_dashes()`
* `sanitize_html_class()`
* `_sanitize_text_fields()`
* `get_comments_number_text()`

Follow-up to [465], [3454], [11433], [12503], [37987].

Props ace100, tanjimtc71, codemonksuvro, SergeyBiryukov.
Fixes #57712.
Built from https://develop.svn.wordpress.org/trunk@55346


git-svn-id: http://core.svn.wordpress.org/trunk@54879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 13:06:21 +00:00
Peter Wilson
5deb3698e5 Editor: Prevent KSES stripping global layout style properties.
Layout style properties are stored using indirect values, rather than direct CSS properties. 

Allow users without the `unfiltered_html` capability to modify global styles using the indirect block spacing properties `contentSize`, `wideSize`, and `blockGap`, using a mapping of the eventual CSS property to the indirect property stored in `theme.json`. The mapped CSS property is then used for CSS validation.

Props andrewserong, costdev, hellofromtonya, mamaduka, mmtr86.
Fixes #57321.



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


git-svn-id: http://core.svn.wordpress.org/trunk@54878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 03:57:17 +00:00
Peter Wilson
fc49b0b92a Date/Time: Revert mysql2date changes in [55343].
These changes will be targeted to the 6.3 release.

See #57705.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-15 02:02:16 +00:00
spacedmonkey
0dc9b1a9b8 Date/Time: Save a call to wp_timezone in mysql2date.
Save a call to `wp_timezone` in `mysql2date` by saving the timezone to a variable and pass it into `wp_date` function call. 

Props spacedmonkey, costdev, SergeyBiryukov, audrasjb.
Fixes #57705.
Built from https://develop.svn.wordpress.org/trunk@55343


git-svn-id: http://core.svn.wordpress.org/trunk@54876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 21:41:20 +00:00
hellofromTonya
14f8608af9 Build/Test Tools: Fix invalid styles data type PHP Warning in REST_Block_Type_Controller_Test::test_get_item_invalid().
Sets the `styles` block setting to an empty array in the `REST_Block_Type_Controller_Test::test_get_item_invalid()` test to resolve:

{{{
Warning: foreach() argument must be of type array|object, string given in wp-includes/class-wp-theme-json.php on line 835
}}}

Previously the test set the `styles` setting to a string value, which is incompatible. The problem surfaced after [55172] added a `foreach` to iterate the `styles`. The root cause was due to this test passing a string instead of an array.

Why?

`WP_Block_Type` `styles` property is documented as only accepting an array data type. At the time of this changeset, it does not validate before setting the property.

Code interacting with the property expects it to be an array data type. The PHP Warning alerts that of a doing it wrong when the incorrect data type is registered for the block type.

Follow-up to [55172], [48173].

Props tanjimtc71, hellofromTonya, kapilpaul.
Fixes #57706.
Built from https://develop.svn.wordpress.org/trunk@55342


git-svn-id: http://core.svn.wordpress.org/trunk@54875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 19:10:21 +00:00
hellofromTonya
566eaaafa2 Build/Test Tools: Fix inaccurate coverage in Tests_Functions_wpListPluck::set_up().
The call stack for `WP_UnitTestCase_Base::set_up()` includes a call to `WP_List_Util::pluck()`, which creates an inaccurate coverage report for this method.

To resolve, `parent::set_up()` is removed from `Tests_Functions_wpListPluck::set_up()`.

To ensure that deprecation and incorrect usage notices continue to be detectable, `$this->expectDeprecated()` is added in the test's `set_up()` fixture.

Follow-up to [51663], [28900].

Props costdev, jrf, SergeyBiryukov, audrasjb.
Fixes #56706.
Built from https://develop.svn.wordpress.org/trunk@55341


git-svn-id: http://core.svn.wordpress.org/trunk@54874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 18:21:23 +00:00
audrasjb
4f9ff9b25b Post WordPress 6.2 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@55340


git-svn-id: http://core.svn.wordpress.org/trunk@54873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 18:05:19 +00:00
audrasjb
759a05a840 WordPress 6.2 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@55339


git-svn-id: http://core.svn.wordpress.org/trunk@54872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 17:46:23 +00:00
hellofromTonya
ab35789175 Editor: Remove missing postType and postId query args Site Editor redirect.
Removes the server-side redirection if missing `postType` and `postId` query args when visiting Site Editor. Why? This redirect is no longer needed as the routing is now handled client side (via [55333]).

References:
* [https://github.com/WordPress/gutenberg/pull/48023 Gutenberg PR 48023]
* [https://github.com/WordPress/gutenberg/pull/47777 Gutenberg PR 47777]

Follow-up to [55333], [53413], [53093].

Props ntsekouras, youknowriad.
Fixes #57716.
Built from https://develop.svn.wordpress.org/trunk@55338


git-svn-id: http://core.svn.wordpress.org/trunk@54871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:26:18 +00:00
Sergey Biryukov
fb6c959884 Tests: Merge file-level and class-level DocBlocks in various unit test files.
Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#6-file-headers documentation standards], whenever possible, all WordPress files should contain a header DocBlock, regardless of the file’s contents – this includes files containing classes.

However, this recommendation makes less sense for unit test classes if not applied consistently, and the duplicate tags cause some confusion.

This commit aims to reduce confusion and avoid repeating information by combining the DocBlocks.

Follow-up to [40607], [43183], [43291], [43292], [43499], [43568], [44502], [44535], [44628], [44786], [44824], [44906], [44909], [46175].

Props wojtekn, antonvlasenko, arafatjamil01, hztyfoon, mukesh27, costdev, jamilbd07, robinwpdeveloper, SergeyBiryukov.
Fixes #57099.
Built from https://develop.svn.wordpress.org/trunk@55337


git-svn-id: http://core.svn.wordpress.org/trunk@54870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:12:17 +00:00
audrasjb
592e136b67 Feeds: Fix various typos in MagpieRSS.
Props nithins53, desrosj, anantajitjg, mukesh27.
Fixes #57102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:06:21 +00:00
davidbaumwald
f1e01d188c Themes: Use add_action for pre_get_posts hook in _add_template_loader_filters().
Although `add_action` and `add_filter` are internally the same, `pre_get_posts` is an action hook.  This change updates the hook type to match what developers would expect when evaluating the code.

Follow-up to [52316].

Props swissspidy, riccardodicurti.
Fixes #57097.
Built from https://develop.svn.wordpress.org/trunk@55335


git-svn-id: http://core.svn.wordpress.org/trunk@54868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 15:57:21 +00:00
Sergey Biryukov
6e59ccc47e Coding Standards: Rename the remaining $cat_ID variables to $cat_id.
This resolves a few WPCS warnings:
{{{
Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"
}}}

Affected functions:
* `wp_delete_category()`
* `get_category_rss_link()`
* `get_catname()`

Follow-up to [836], [2068], [2551], [2695], [6365], [10959], [52958], [55190].

Fixes #56754.
Built from https://develop.svn.wordpress.org/trunk@55334


git-svn-id: http://core.svn.wordpress.org/trunk@54867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 15:46:18 +00:00
hellofromTonya
8588041fd2 Editor: Update @wordpress packages for 6.2 Beta 2.
Updates the `@wordpress` packages to include the following changes:

- Add missing period in keyboard shortcut descriptions
- Site Editor: Append template type and name to the site editor page title
- Specify active color state for template navigation button
- Global Styles: Move more link about custom CSS to part of description
- ToolsPanel: Display optional items when values are updated externally
- File block: Re-add editor styles for classic themes
- Enable undo after creating a new menu
- Style Book: Exclude blocks that are not allowed to insert
- Add basic tsconfig.json validation
- Fix Experiments native variant breakage
- Update moment and moment-timezone packages to fix timezone issues
- NavigatorButton: Reuse Button types
- ToolsPanel: Ensure display of optional items when panel id is null
- ColorPalette: Ensure text label contrast checking works with CSS variables
- Components: Add support for named arguments in the navigator components
- Rename experiments package to private-apis
- Cherry-pick CLI: Fix the default label to match the documentation
- Handle block metadata attribute and related experimental APIs
- Fix: Remove browser default border for iframe in the editor
- [Layout]: Fix align controls for hybrid themes
- Visual Regression tests: use default playwright utils
- SelectControl: Fix multiple prop styling
- Fix clicking on the toggle button not closing the block inserter
- Update deps for the useEffect that creates navigation menus
- Minor updates in Private APIs docs
- Site Editor: Fix custom Template Parts rename action
- [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses
- Revert "Prevent the image from being resized larger than its container"
- Lodash: Remove from @wordpress/keycodes package
- Distraction free mode: Fix keyboard shortcut not working
- Popover: lock the __experimentalPopoverPositionToPlacement function
- Rename the "experiments" export to "privateApis"
- Add an aria label to the site save dialog
- Navigator: add more pattern matching tests, refine existing tests
- Add parent navigation support for the navigator component
- Add back link to Design heading in site editor navigation to return to Dashboard
- Add a nested level when selecting templates or template parts
- Move site editor 6.2 specific code to the right file
- Fix site editor navigation

References:
* [1bf01c01a8 Gutenberg's commit for publishing the packages]

Follow-up to [55257].

Props ntsekouras.
See #57471.
Built from https://develop.svn.wordpress.org/trunk@55333


git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 15:44:36 +00:00
Sergey Biryukov
b23607d537 Docs: Add a @since note about Twenty Twenty-Three for WP_Theme::$default_themes.
Follow-up to [51328], [52941], [54236].

Props petitphp.
Fixes #57714.
Built from https://develop.svn.wordpress.org/trunk@55332


git-svn-id: http://core.svn.wordpress.org/trunk@54865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 14:38:22 +00:00
audrasjb
47b1864c2e Permalinks: Properly escape strings in Permalinks Settings screen.
Props jaedm97, audrasjb, robinwpdeveloper, shraboni.
Fixes #57143.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 11:34:23 +00:00
Peter Wilson
6310d1d21a Bundled themes: Recommit generated files following [55329].
See #56226.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 04:22:21 +00:00
Peter Wilson
5237f454bd Bundled themes: Fix row variation nested in group block.
Remove the `display` property from the custom group block styles to prevent the flex layout in the row variation from been removed.

Props abirhasandipu, poena, robinwpdeveloper.
Fixes #56226.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 04:03:18 +00:00
Peter Wilson
afe51338ac Menus: Test creating parent after a child doesn't throw an error.
As menus are re-arranged, it's possible a menu item was created prior to its parent.

This introduces a test to ensure the order in which menu items are created relevant to their parents does not trigger errors.

Props costdev, peterwilsoncc.
Fixes #57122.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 03:32:19 +00:00
joedolson
fe9d343775 Administration: Fix JavaScript test failure.
Remove unused variable `e` that I removed from Github, but failed to remove before committing. Follow up to [55326].

Unprops joedolson.
Fixes #53587.
Built from https://develop.svn.wordpress.org/trunk@55327


git-svn-id: http://core.svn.wordpress.org/trunk@54860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 00:41:19 +00:00
joedolson
cc27b6cc19 Administration: Close admin menu when focus moves to body.
User should not have to reach the admin menu toggle in order to close the menu. This can be a problem for one-handed mobile use, users with small hands, and numerous other situational usages.

Close the admin menu when focus moves anywhere other than the menu or the menu toggle and the current document is active.

Props kaneva, sabernhardt, costdev, ryokuhi, hellofromtonya, dhusakovic, thelovekesh, joedolson.
Fixes #53587.
Built from https://develop.svn.wordpress.org/trunk@55326


git-svn-id: http://core.svn.wordpress.org/trunk@54859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 00:38:20 +00:00
hellofromTonya
5584cf60c0 REST API: Remove 'Invalid user ID' error in WP_REST_Users_Controller::update_item().
Removes the `WP_Error` code for `'Invalid user ID.'`. Why?

tl;dr
This branch will never be entered as the `$user` will never be falsey.

Longer reasoning:

[39954] introduced `WP_REST_Users_Controller::get_user()` method to encapsulate getting the user and handling the `'Invalid user ID.'` `WP_Error`. It replaced `get_userdata()` in `WP_REST_Users_Controller::update_item()` but left the existing `'Invalid user ID.'` `WP_Error` introduced in [38832].

The code removed in this changeset will never be reached because `$user` will never be falsey. Rather, `WP_REST_Users_Controller::get_user()` will always return an instance of `WP_Error` or `WP_User`. 

Could the user's ID be falsey?
No. Why? `WP_REST_Users_Controller::get_user()` checks that the user exists, which checks if the ID is falsey.

Therefore, the code can safely be removed.

Follow-up to [39954], [38832].

Props jrf, costdev, hellofromTonya, SergeyBiryukov.
Fixes #56662.
Built from https://develop.svn.wordpress.org/trunk@55325


git-svn-id: http://core.svn.wordpress.org/trunk@54858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 23:10:20 +00:00
Sergey Biryukov
371afa317c Comments: Use correct orderby parameter name in personal data exporter and eraser.
This ensures that `get_comments()` is called with the correct parameter name in:
* `wp_comments_personal_data_exporter()`
* `wp_comments_personal_data_eraser()`

Follow-up to [42888], [42994].

Props smeunus, kapilpaul, SergeyBiryukov.
Fixes #57700.
Built from https://develop.svn.wordpress.org/trunk@55324


git-svn-id: http://core.svn.wordpress.org/trunk@54857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 22:05:22 +00:00
hellofromTonya
854f388d02 Editor: Restores file block button styles for classic themes.
Adds styles into `wp-includes/css/classic-themes.css` to restore file block button element styling for classic themes.

Why?

In [54257] and [54118], button element styles were moved from each block to `theme.json`. For the file block, the download button styles were removed from the block's stylesheet. These changes impacted themes without a `theme.json` file (i.e. classic themes).

This changeset restores the styles for backwards-compatibility.

References:
* [https://github.com/WordPress/gutenberg/pull/47686 Gutenberg PR 47686]

Follow-up to [54257], [54118].

Props wildworks, scruffian, mamaduka, ntsekouras.
Fixes #57688.
Built from https://develop.svn.wordpress.org/trunk@55323


git-svn-id: http://core.svn.wordpress.org/trunk@54856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 20:50:19 +00:00
Sergey Biryukov
3ed98d6e72 Tests: Declare the $post_id property in wp_comments_personal_data_exporter() tests.
Use the same approach in `wp_comments_personal_data_eraser()` for consistency and to minimize the number of fixtures created in each individual test.

Follow-up to [55319], [55321].

Props hellofromTonya.
See #56793.
Built from https://develop.svn.wordpress.org/trunk@55322


git-svn-id: http://core.svn.wordpress.org/trunk@54855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 19:37:22 +00:00
Sergey Biryukov
95fb91bc18 Tests: Move wp_comments_personal_data_exporter() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Follow-up to [42987], [55319].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@55321


git-svn-id: http://core.svn.wordpress.org/trunk@54854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 19:13:20 +00:00
Sergey Biryukov
20d73096b2 Tests: Add missing @covers tag for a wp_update_comment() test.
Follow-up to [37609], [53863].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@55320


git-svn-id: http://core.svn.wordpress.org/trunk@54853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 19:03:16 +00:00
Sergey Biryukov
4cbf7e7e7a Tests: Move wp_comments_personal_data_eraser() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Follow-up to [42994].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@55319


git-svn-id: http://core.svn.wordpress.org/trunk@54852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 18:58:20 +00:00
Felix Arntz
1da2841c07 Media: Enhance logic to determine LCP image in block themes and avoid lazy-loading it.
[52065] originally introduced the logic to guess the LCP image based on certain heuristics and to not lazy-load that image. However, with the introduction of block themes, that logic was not functioning correctly, resulting in all featured images to be lazy-loaded, regardless of whether it was the LCP image or not.

Together with an update to the `core/post-featured-image` block included in [55079], this changeset fixes the logic to correctly handle featured images in block themes as well.

Additionally, in combination with an update to the `core/template-part` block from [55246], this changeset includes an enhancement which uses the benefits of block template parts to avoid lazy-loading images in the `header` block template part, making the lazy-loading heuristics even more accurate for sites using a block theme.

Props flixos90, adamsilverstein, mamaduka, antonvlasenko, shahidul95, reduanmasud, costdev, mukesh27, ironprogrammer, manfcarlo, robinwpdeveloper, spacedmonkey.
Fixes #56930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 18:34:17 +00:00
audrasjb
588b002955 Twenty Twenty: Properly reflect text color changes in Quote and Pullquote block.
This changeset ensures that text color for citation are inherited when the user specifies color for the Pullquote or Quote block, or if one of those blocks is inside a block with a background.

Props nithins53, kajalgohel, kmadhak, sabernhardt, devtanbir, james-roberts, sapayth, rafinkhan, robinwpdeveloper, poena.
Fixes #55990.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 15:20:18 +00:00
audrasjb
b9dbddaac5 Docs: Various improvements in XML-RPC Class function descriptions, as per docblocks standards.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 15:18:19 +00:00
Sergey Biryukov
f77ce1d953 Tests: Rename the html tests directory to html-api.
This matches the `WP_HTML_Tag_Processor` class location in `wp-includes` and the `@group` name used in the tests.

Follow-up to [55203].

See #56793.
Built from https://develop.svn.wordpress.org/trunk@55315


git-svn-id: http://core.svn.wordpress.org/trunk@54848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 14:40:19 +00:00
hellofromTonya
be815b3093 Themes: Remove local() from @font-face styles in _wp_theme_json_webfonts_handler().
Removes adding `local()` as a `@font-face` `src` within `_wp_theme_json_webfonts_handler()`.

Why?

To fix font incompatibilities when a user has the font-family locally installed on their viewing computer or device. It's unknown if all of the font-face variations specified by theme.json and/or global styles are:

* installed on the user's computer/device.
* and in one file or multiple files.

The previous implementation used the `src` specified when registering the font with the API. That src will likely vary from user computer/device to user computer/device.

To avoid these unknowns which could cause incompatibilities or styling issues, this changeset removes adding `local()` to the generated font-face CSS styles.

References:
* [https://github.com/WordPress/gutenberg/pull/47254 Gutenberg PR 47254]

Follow-up to [53282].

Props luehrsen, aristath, ehtmlu, hellofromTonya, wetah.
Fixes #57430.
Built from https://develop.svn.wordpress.org/trunk@55314


git-svn-id: http://core.svn.wordpress.org/trunk@54847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 14:33:18 +00:00
Sergey Biryukov
e70f9b1a11 Tests: Move PasswordHash test file to a more appropriate place.
While also used for post passwords and application passwords, the PasswordHash library appears to be initially introduced and primarily used for user passwords, so the test file can be moved to the `user` directory.

Follow-up to [6350], [55310].

See #56340.
Built from https://develop.svn.wordpress.org/trunk@55313


git-svn-id: http://core.svn.wordpress.org/trunk@54846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 14:22:21 +00:00
audrasjb
170d435c0b Twenty Twelve: Properly reflect text color changes in Table block.
This changeset makes the table header cells also inherit text colors, when the user selects a text color.

Props nidhidhandhukiya, sabernhardt, poena, faguni22.
Fixes #56466.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 09:23:19 +00:00
audrasjb
a67d0acee7 Docs: Use third-person singular verbs for WP_Meta_Query related function descriptions, as per docblocks standards.
See #56792.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 09:21:18 +00:00
audrasjb
5ea4666f2d External Libraries: Prevent a PHP 8.1 deprecation notice in PasswordHash::gensalt_blowfish().
This changeset uses an `(int)` cast to prevent a PHP 8.1 deprecation notice for "Implicit conversation from float to int loses precision" in `PasswordHash::gensalt_blowfish()`.

Props hanshenrik, jrf, desrosj, costdev.
Fixes #56340.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 09:08:23 +00:00
audrasjb
125d3fd72e Formatting: Add aspect-ratio as valid CSS property in KSES.
This changeset adds support for the `aspect-ratio` CSS property, which is considered safe for inline CSS.

Props ajlende, peterwilsoncc.
Fixes #57664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 08:47:21 +00:00
Sergey Biryukov
bd92d87b74 Coding Standards: Rename $comment_ID variable to $comment_id in various files.
This resolves 80+ WPCS warnings in core:
{{{
Variable "$comment_ID" is not in valid snake_case format
}}}

While matching the database field of the same name, the `$comment_ID` variable did not follow the WordPress coding standards, and is now renamed to address that.

This affects:
* Function parameters in:
 * `get_comment_author()`
 * `comment_author()`
 * `get_comment_author_email()`
 * `comment_author_email()`
 * `get_comment_author_link()`
 * `comment_author_link()`
 * `get_comment_author_IP()`
 * `comment_author_IP()`
 * `get_comment_author_rl()`
 * `comment_author_url()`
 * `get_comment_date()`
 * `comment_date()`
 * `get_comment_excerpt()`
 * `comment_excerpt()`
 * `get_comment_text()`
 * `comment_text()`
 * `get_comment_time()`
 * `comment_time()`
 * `get_comment_type()`
 * `get_page_of_comment()`
 * `wp_new_comment_notify_moderator()`
 * `wp_new_comment_notify_postauthor()`
 * `get_commentdata()`

* Internal variables in:
 * `get_comment_ID()`
 * `wp_new_comment()`
 * `wp_xmlrpc_server::wp_deleteComment()`
 * `wp_xmlrpc_server::wp_editComment()`
 * `wp_xmlrpc_server::wp_newComment()`
 * `wp_xmlrpc_server::pingback_ping()`

* Hook parameters in:
 * `get_comment_author`
 * `comment_author`
 * `get_comment_author_email`
 * `author_email`
 * `get_comment_author_link`
 * `get_comment_author_IP`
 * `get_comment_author_url`
 * `comment_url`
 * `get_comment_excerpt`
 * `comment_excerpt`
 * `get_comment_ID`
 * `get_comment_type`
 * `get_page_of_comment`
 * `comment_{$new_status}_{$comment->comment_type}`
 * `comment_post`
 * `notify_moderator`
 * `notify_post_author`
 * `commentrss2_item`
 * `xmlrpc_call_success_wp_deleteComment`
 * `xmlrpc_call_success_wp_editComment`
 * `xmlrpc_call_success_wp_newComment`
 * `pingback_post`

Note: The name change only affects variable names and DocBlocks.

The change does not affect:

* `comment_ID` as the `$orderby` value in `WP_Comment_Query::__construct()`
* `comment_ID` as the `$orderby` value in `WP_Comment::get_children()`
* `comment_ID` as part of `$commentarr` parameter in `wp_update_comment()`

The associated array keys still match the database field.

Follow-up to [53723].

Props krunal265, costdev, SergeyBiryukov.
Fixes #57671. See #56791.
Built from https://develop.svn.wordpress.org/trunk@55308


git-svn-id: http://core.svn.wordpress.org/trunk@54841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-12 18:08:21 +00:00
joedolson
10a1594b64 Toolbar: Prevent false positive on automated contrast testing.
The non-focused state of the `.screen-reader-shortcut` element in the admin bar fails contrast tests. This has no real-world consequences, but raises false positives in some automated testing tools. This fix is largely so people using automated testing will not raise false positives.

Props sabernhardt, afercia, robinwpdeveloper, re_enter_rupok.
Fixes #56789.
Built from https://develop.svn.wordpress.org/trunk@55307


git-svn-id: http://core.svn.wordpress.org/trunk@54840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-11 17:39:20 +00:00
Sergey Biryukov
5826e74499 Coding Standards: Pass correct value to get_delete_post_link() in attachment_submit_meta_box().
The `$deprecated` parameter of `get_delete_post_link()` is documented to accept a string, not `null`.

Follow-up to [14099], [21948].

Props krunal265, jrf.
Fixes #57690.
Built from https://develop.svn.wordpress.org/trunk@55306


git-svn-id: http://core.svn.wordpress.org/trunk@54839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-11 13:12:19 +00:00
Sergey Biryukov
42d571decb Mail: Check that set_time_limit() function is available before using it in class-pop3.php.
This avoids a fatal error if the function is disabled on certain environments.

Follow-up to [55258].

Props mujuonly.
Fixes #57659.
Built from https://develop.svn.wordpress.org/trunk@55305


git-svn-id: http://core.svn.wordpress.org/trunk@54838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-11 12:43:22 +00:00
Sergey Biryukov
09cc873d3a Docs: Replace short array syntax in WP_HTML_Tag_Processor documentation.
Per [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#declaring-arrays WordPress PHP Coding Standards]:
> Using long array syntax ( `array( 1, 2, 3 )` ) for declaring arrays is generally more readable than short array syntax ( `[ 1, 2, 3 ]` ), particularly for those with vision difficulties. Additionally, it’s much more descriptive for beginners.
> 
> Arrays must be declared using long array syntax.

Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/47958 #47958 Docs: Don't recommend using short array syntax in WP_HTML_Tag_Processor]

Follow-up to [55203], [55206].

Props aristath, poena.
Fixes #57691.
Built from https://develop.svn.wordpress.org/trunk@55304


git-svn-id: http://core.svn.wordpress.org/trunk@54837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-10 10:59:25 +00:00
Helen Hou-Sandí
facdf664c9 Build/Test Tools: Add a devcontainer for Codespaces support.
This adds a devcontainer configuration tested for use with GitHub Codespaces. It is currently built on top of the Docker `wordpress` image for initial trial purposes. We should eventually be using our own containers to fully own the environment.

This should be considered a beta run to get a sense of how well cloud dev containers work for core contributors, in particular at contributor day events with limited bandwidth and mobile devices.

Props samruddhikhandale, dinhtungdu, helen, craiglpeters, sam1el, wirecat.
See #57187.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-10 03:01:18 +00:00
Pascal Birchler
cb9f9d81b2 I18N: Prevent fatal error in WP_Textdomain_Registry.
Use `rtrim` instead of `untrailingslashit` and `trailingslashit` directly.

Avoids `formatting.php` dependency and thus prevents an error when called via `wp_load_translations_early()`, which happens e.g. when in maintenance mode.

Props grl570810, ocean90.
Fixes #57218.
Built from https://develop.svn.wordpress.org/trunk@55302


git-svn-id: http://core.svn.wordpress.org/trunk@54835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-09 16:35:22 +00:00
Sergey Biryukov
bc0c01b1ac Login and Registration: Set correct default values in wp_signon().
The `$credentials['user_login']` and `$credentials['user_password']` parameters are passed by reference to the `wp_authenticate` action, and are at that point [https://www.php.net/manual/en/language.references.pass.php#124383 created as null] if they don't exist in the array.

This commit sets those values to an empty string, resolving two PHP 8.1 deprecation notices:
 * One from `preg_replace()` in `wp_strip_all_tags()` via `sanitize_user()` in `wp_authenticate()`:
{{{
Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
}}}
 * One from `trim()` in `wp_authenticate()` itself:
{{{
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated
}}}

Includes documenting the `$credentials` parameter using hash notation.

Follow-up to [6643], [37697].

Props lenasterg, TobiasBg, ocean90, afragen, lkraav, SergeyBiryukov.
Fixes #56850.
Built from https://develop.svn.wordpress.org/trunk@55301


git-svn-id: http://core.svn.wordpress.org/trunk@54834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-09 01:31:22 +00:00
danielbachhuber
d1b96a8e04 Media: Use strict comparison in make_subsize().
Follow up from [55278].

Props bueltge, desrosj, mukesh27.
See #57370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 20:51:21 +00:00
joedolson
be531bdd37 Media: Fix focus loss updating custom fields in media modal.
When the save action runs to dynamically save changes to custom fields in the media modal, the custom fields container is re-rendered, losing focus. Remove the re-rendering of custom fields to prevent loss of focus.

Props lucymtc, teebee, syhc, afrin29, antpb, joedolson.
Fixes #40909.
Built from https://develop.svn.wordpress.org/trunk@55299


git-svn-id: http://core.svn.wordpress.org/trunk@54832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 19:40:19 +00:00
Sergey Biryukov
411cd2f5b3 Docs: Correct @since tag for WP_Locale_Switcher::$stack.
The `WP_Locale_Switcher::$locales` property was replaced with `::$stack` in WordPress 6.2.

Follow-up to [38961], [55161], [55224].

See #57123.
Built from https://develop.svn.wordpress.org/trunk@55298


git-svn-id: http://core.svn.wordpress.org/trunk@54831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 17:08:21 +00:00
audrasjb
a612564204 Help/About: Add info about the "View" row action link to the Users screen help tab.
Props kebbet, audrasjb, SergeyBiryukov, webcommsat.
Fixes #57666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 16:14:18 +00:00
hellofromTonya
ecb9325014 Upgrade/Install: Skip preloading Requests for WordPress versions before 4.6.
Skip preloading Requests files in `_preload_old_requests_classes_and_interfaces()` when updating from a WordPress version older than 4.6.

Why?

Requests library was first introduced into WordPress 4.6 via #33055 / [37428]. If a user is upgrading from a version older than 4.6, this changeset prevents the Requests preloading to prevent a fatal error of attempting to load files that do not exist in their current WordPress version.

Follow-up to [54997], [37428].

Props afragen, costdev, ironprogrammer, antonvlasenko.
Fixes #57662.
Built from https://develop.svn.wordpress.org/trunk@55296


git-svn-id: http://core.svn.wordpress.org/trunk@54829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 15:03:19 +00:00
Sergey Biryukov
e841840662 Docs: Document possible return values for wp_get_word_count_type().
Follow-up to [55279].

See #56698.
Built from https://develop.svn.wordpress.org/trunk@55295


git-svn-id: http://core.svn.wordpress.org/trunk@54828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-08 10:17:23 +00:00
danielbachhuber
e41af7cdc6 REST API: Support non-Latin characters in template route regex.
Non-Latin characters are URL-encoded (e.g. `%cf%84%ce%b5%cf%83%cf%84`). Matching `%` in the route ensures templates with non-Latin titles can be properly saved.

Props antonyagrios, mburridge.
Fixes #57329.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 23:47:23 +00:00
John Blackbourn
270a3d009d Docs: Miscellaneous improvements and corrections to docblocks.
See #56792

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


git-svn-id: http://core.svn.wordpress.org/trunk@54826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 21:21:18 +00:00
davidbaumwald
f03dab31f3 Post WordPress 6.2 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@55292


git-svn-id: http://core.svn.wordpress.org/trunk@54825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 19:38:18 +00:00
davidbaumwald
1d6fb26cb8 WordPress 6.2 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@55291


git-svn-id: http://core.svn.wordpress.org/trunk@54824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 19:15:18 +00:00
Aaron Jorbin
a39daee51f Cleanup change to package.json.
[55289] made a change to test running that I was doing locally and is not needed for everyone or forever.

Unprops Jorbin.



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


git-svn-id: http://core.svn.wordpress.org/trunk@54823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:57:19 +00:00
Aaron Jorbin
6d179f0d90 Comments: Improve rel attribute usage in comments.
Internal links should be followed and it should be easier to modify other rel attributes on comments. This adds a helper function for determining if a URL is internal and also adds some new filters to make it easy to modify rel attributes in comments.

Props thomasplevy, desrosj, sabernhardt, benish74, samiamnot, galbaras, jorbin.

Fixes #53290, #56444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:54:19 +00:00
joedolson
ed511681a8 Administration: Match title tag to menu item for Editor.
Removes 'beta' from the title element for the site editor. Follow up to [55281].

Props kebbet.
Fixes #57654.
Built from https://develop.svn.wordpress.org/trunk@55288


git-svn-id: http://core.svn.wordpress.org/trunk@54821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:52:18 +00:00
Sergey Biryukov
7c0d982c8e Comments: Allow to pass $comment_ID parameter to comment_time().
This brings consistency with:
* `get_comment_time()`
* `get_comment_date()`
* `comment_date()`

Includes:
* Correcting the `@since` tag for `get_comment_time()`.
* Synchronizing parameter description between `get_comment_date()` and `get_comment_time()`.

Follow-up to [55284].

See #52322.
Built from https://develop.svn.wordpress.org/trunk@55287


git-svn-id: http://core.svn.wordpress.org/trunk@54820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:26:18 +00:00
davidbaumwald
39c66482e0 Editor: svn add new files missed in [55285].
Follow-up to [55285].

See #57618.
Built from https://develop.svn.wordpress.org/trunk@55286


git-svn-id: http://core.svn.wordpress.org/trunk@54819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:11:18 +00:00
davidbaumwald
f5d681f4bd Editor: Introduce sticky position block support.
In the Gutenberg plugin, a position block support feature was introduced last year, that allows a Group block to be set to a "sticky" position, meaning that when the page scrolls, the block will stick to the top of the window.

This change merges the "sticky" position feature for blocks introduced in Gutenberg 15.0.

Props andrewserong, flixos90, mukesh27.
Fixes #57618.
Built from https://develop.svn.wordpress.org/trunk@55285


git-svn-id: http://core.svn.wordpress.org/trunk@54818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:01:20 +00:00
audrasjb
c03b3420d9 Comments: Allow to pass $comment_ID parameter to get_comment_time().
Props spacedmonkey, travisaxton, SergeyBiryukov, d-signed, audrasjb, rudlinkon, h4l9k, mukesh27, costdev.
Fixes #52322.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:53:18 +00:00
John Blackbourn
e374552961 Application Passwords: Allow plain HTTP success and reject URLs when using a local environment type.
It's not uncommon for local environments to run over HTTP due to the relative complexity of configuring HTTPS for a local environment. This change allows HTTP URLs for application password responses when that is the case.

Props peterwilsoncc, wppunk, cadic, viralsampat

Fixes #52617

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


git-svn-id: http://core.svn.wordpress.org/trunk@54816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:46:20 +00:00
Felix Arntz
dbdba246b6 Editor: Add layout controls to children of flex layout blocks.
Props isabel_brison, andrewserong, davidbaumwald, flixos90, mamaduka, ntsekouras, hellofromtonya.
Fixes #57584.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:44:21 +00:00
audrasjb
10838cb5a0 Editor: Remove "beta" label from Site Editor submenu item.
One year later, the beta phase is finally over.

Props priethor, matveb, audrasjb, hellofromtonya.
Fixes #57654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:42:24 +00:00
danielbachhuber
5c0333ce97 Media: Add test file missed in [55278].
See #57370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:39:21 +00:00
audrasjb
3223743a6a I18N: Introduce word_count_type property to WP_Locale.
This changesets adds a `word_count_type` property, so that it does not need to be translated separately across multiple projects.

List of changes:
- New property: `WP_Locale::word_count_type`.
- New method: `WP_Locale::get_word_count_type()`.
- New function: `wp_get_word_count_type()` as a wrapper for `WP_Locale::get_word_count_type()`.
- All `_x( 'words', 'Word count type. Do not translate!' )` strings have been replaced with a call to `wp_get_word_count_type()`.

Props pedromendonca, desrosj, costdev, mukesh27, johnbillion.
Fixes #56698.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:28:18 +00:00
danielbachhuber
fbf90e465b Media: Bail early if image is already the requested size.
In `WP_Image_Editor_Imagick`, bail early in `make_subsize()` if the image is already the requested size. Previously, `make_subsize()` would create another copy of the file. `WP_Image_Editor_GD` doesn't have the same problem.

Props wojtekn, danielbachhuber.
Fixes #57370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:24:15 +00:00
audrasjb
7f49ed6ddf Twenty Twelve: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Twelve locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props garrett-eclipse, kjellr, ocean90, SergeyBiryukov, westonruter, luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, mukesh27, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:14:20 +00:00
Sergey Biryukov
9c5d4ca8d1 I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276


git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 17:10:21 +00:00
desrosj
bca7495bac External Libraries: Update element-closest.
This updates the `element-closest` polyfill to the latest version, `3.0.2`.

Because of changes to how the package is now built and distributed, both files for the library now contain minified code.

This library is no longer used by Core itself and maintained as a courtesy. Any projects utilizing it should reevaluate their usage requirements with modern browsers.

Props hareesh-pillai, gziolo, mukesh27, costdev.
Fixes #52851.
Built from https://develop.svn.wordpress.org/trunk@55275


git-svn-id: http://core.svn.wordpress.org/trunk@54808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:48:31 +00:00
audrasjb
4cf142b2b2 Twenty Thirteen: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Thirteen locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props garrett-eclipse, kjellr, ocean90, SergeyBiryukov, westonruter, luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, mukesh27, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:46:25 +00:00
davidbaumwald
de70cbd2ad Themes: Revert appearance tools theme support.
The appearance tools theme support(merged in [55067]) includes block gap, a feature that was not intended for themes without a theme.json.

Until it has been determined if the feature can and should be enabled in these themes, and has been successfully tested, the appearance tools theme support should be reverted.

Reverts [55067].

Props poena, Mamaduka, audrasjb.
Fixes #57649.
Built from https://develop.svn.wordpress.org/trunk@55273


git-svn-id: http://core.svn.wordpress.org/trunk@54806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:44:24 +00:00
joedolson
b2fb194bc1 Formatting: Treat math elements as block-level elements.
The `math` element can be displayed either as a block or inline element. If `wpautop` only treats it as an inline element, it will break multiline elements by inserting `br` elements. Treating the element as a block element means that the editor won't break common normative usages of the `math` element. 

Prevent `math` elements from having internal elements split up with `br` elements, disrupting formatting.

Props nicholaswilson, wojtek.szkutnik, hakre, conner_bw, ericlewis, hughie.molloy, SteelWagstaff, ryokuhi, joedolson, bgoewert, adamsilverstein, joedolson.
Fixes #13340.
Built from https://develop.svn.wordpress.org/trunk@55272


git-svn-id: http://core.svn.wordpress.org/trunk@54805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:18:22 +00:00
joedolson
9f8f0aa58e Media: Enable selective optout for video and audio shortcodes.
Make the JavaScript selectors for audio and video shortcodes aware of the state of the `wp_video_shortcode_library` and `wp_audio_shortcode_library` filters. Allow extenders to replace the library for either media shortcode.

Props westonruter, joedolson, rudlinkon, obayedmamur.
Fixes #40144.
Built from https://develop.svn.wordpress.org/trunk@55271


git-svn-id: http://core.svn.wordpress.org/trunk@54804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 16:00:42 +00:00
audrasjb
f7b69e3d1f Twenty Fourteen: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Fourteen locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props garrett-eclipse, kjellr, ocean90, SergeyBiryukov, westonruter, luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, mukesh27, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:59:23 +00:00
desrosj
ebef2f74cb External Libraries: Update miscellaneous libraries to their latest versions.
This updates the following external libraries to their latest versions:

- `polyfill-library` from `4.4.0` to `4.7.0`.
- `regenerator-runtime` from `0.13.9` to `0.13.11`.

These updates are minor without any breaking changes.

These libraries are no longer used by Core itself and maintained as a courtesy. Any projects relying on them should reevaluate their usage as modern browsers have made these almost entirely unnecessary.

Fixes #57646.
Built from https://develop.svn.wordpress.org/trunk@55269


git-svn-id: http://core.svn.wordpress.org/trunk@54802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:56:37 +00:00
audrasjb
0ba150a87b Twenty Fifteen: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Fifteen locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props garrett-eclipse, kjellr, ocean90, SergeyBiryukov, westonruter, luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, mukesh27, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:52:26 +00:00
audrasjb
c0dddba726 Twenty Sixteen: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Sixteen locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props garrett-eclipse, kjellr, ocean90, SergeyBiryukov, westonruter, luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, mukesh27, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:45:25 +00:00
audrasjb
af5723a5d4 Twenty Seventeen: Bundle Google Fonts locally.
This changeset bundles the Google Fonts used by Twenty Seventeen locally in the theme folder, instead of loading them from Google servers. Existing font stylesheet handles are maintained for backward compatibilily.

Props luminuu, audrasjb, jhoffmann, jffng, paapst, cbirdsong, webcommsat, kau-boy, MatthiasReinholz, sabernhardt, hellofromTonya, JeffPaul, davidbaumwald, desrosj, bedas, poena, costdev, azaozz, aristath.
See #55985.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:31:24 +00:00
Sergey Biryukov
6a22b9c21c Quick/Bulk Edit: Remove the bulk_edit_posts action for now.
This reverts [55108] pending confirmation that this hook is still needed, that the right variable is passed, and that the docs are correct.

The necessity and implementation of this hook will be reconsidered in a future release.

See #28112.
Built from https://develop.svn.wordpress.org/trunk@55265


git-svn-id: http://core.svn.wordpress.org/trunk@54798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:25:24 +00:00
Sergey Biryukov
e9b231ccdf Tests: Use assertSameSets() in WP_Query tests for search_columns argument.
This aims to resolve intermittent test failures due to indeterminate sort order.

Follow-up to [55248].

Props petitphp, costdev, audrasjb, johnbillion.
Fixes #43867.
Built from https://develop.svn.wordpress.org/trunk@55264


git-svn-id: http://core.svn.wordpress.org/trunk@54797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 15:00:22 +00:00
Sergey Biryukov
8702927f8d Administration: Define the $title global on privacy screens.
This brings more consistency with other screens and avoids a PHP warning in `get_plugin_page_hookname()`:
{{{
preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
}}}

Props ipajen, jrf, SergeyBiryukov.
Fixes #57578.
Built from https://develop.svn.wordpress.org/trunk@55263


git-svn-id: http://core.svn.wordpress.org/trunk@54796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 14:40:21 +00:00
audrasjb
2b1840d393 Media: Introduce wp_get_attachment_link_attributes filter.
This changeset introduces the `wp_get_attachment_link_attributes` hook to allow developers to filter the link attributes when getting the attachment link.

Props NathanAtmoz, aaroncampbell, antpb, costdev.
Fixes #41574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 14:35:23 +00:00
audrasjb
8dc60dd213 Privacy: Add rel="privacy-policy" to the Privacy Policy link.
This changeset adds a `rel="privacy-policy"` attribute to user-facing links to the Privacy Policy of the website, when a privacy policy page is set and available. While this `rel` value is still a RFC of the Link Types HTML specification, this changeset helps to make Privacy Policy link more discoverable for user agents and HTML parsers. 

Props dshanske, audrasjb, bhavz-10, bookwyrm, faisal03, JeffPaul, peterwilsoncc, paapst, davidbaumwald, costdev, robinwpdeveloper, kawserz.
Fixes #56345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 14:05:20 +00:00
Sergey Biryukov
11d374ff97 Users: Pass correct number of arguments to send_auth_cookies filter in wp_clear_auth_cookie().
Follow-up to [55164], [55253], [55259].

Props mukesh27.
See #56971.
Built from https://develop.svn.wordpress.org/trunk@55260


git-svn-id: http://core.svn.wordpress.org/trunk@54793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:53:18 +00:00
Sergey Biryukov
09ec812116 Users: Pass the authentication scheme to the send_auth_cookies filter.
This brings more consistency with the `set_auth_cookie` and `set_logged_in_cookie` hooks.

Follow-up to [55164], [55253].

See #56971.
Built from https://develop.svn.wordpress.org/trunk@55259


git-svn-id: http://core.svn.wordpress.org/trunk@54792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:46:17 +00:00
Sergey Biryukov
b29536b060 General: Check that set_time_limit() function is available before using it in core.
This avoids a fatal error if the function is disabled on certain environments.

Props theode, jokerrs, johnbillion, hellofromTonya, costdev, jrf, azaozz, SergeyBiryukov.
Fixes #55711.
Built from https://develop.svn.wordpress.org/trunk@55258


git-svn-id: http://core.svn.wordpress.org/trunk@54791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:28:18 +00:00
youknowriad
804fbe781a Block Editor: Updates the WordPress packages with all the fixes targetted for WP 6.2 beta1.
Includes the following changes

- Fix multi entities saved state in the post editor
- Adds a global save button to the site editor
- Shadow: move shadow to own panel
- [Block Editor]: Lock __experimentalBlockInspectorAnimation setting
- useBlockSync: change subscribed.current on unsubscribe
- [Block Library - Gallery]: Minor code quality update
- [Patterns]: Reorder pattern categories
- Fix inline preview infinite render
- Show a pointer/hint in the settings tab informing the user about the styles tab
- I18N: update string concatenation method in read more block
- LocalAutosaveNotice: use stable notice id to prevent double notices
- Navigation: Remove the IS_GUTENBERG_PLUGIN check around block_core_navigation_parse_blocks_from_menu_items

Props mamaduka, ntsekouras, kebbet.
See #57471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 13:00:09 +00:00
spacedmonkey
65c71d1db4 Options, Meta APIs: Add a filter to allow the shortcut return to wp_load_alloptions function.
Add a new filter `pre_wp_load_alloptions` in the `wp_load_alloptions` function to short circuit the return value. 

Props pbearne, spacedmonkey, joyously, SergeyBiryukov, mukesh27, costdev. 
Fixes #56045.
Built from https://develop.svn.wordpress.org/trunk@55256


git-svn-id: http://core.svn.wordpress.org/trunk@54789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:49:17 +00:00
jorgefilipecosta
bd2eae6719 Block editor: Add frontend block-level settings to the core.
This commit adds block-level settings in the core. Block level settings allow a block to define the preset settings of its nested blocks using the same shape as theme.json.

Props oandregal, Mamaduka, jorgefilipecosta, dmsnell, adamziel.
57651 #57651.
Built from https://develop.svn.wordpress.org/trunk@55255


git-svn-id: http://core.svn.wordpress.org/trunk@54788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:42:20 +00:00
audrasjb
fe3f12b10f Revisions: Add a way to filter the revisions considered for deletion.
This changeset introduces a new filter for `wp_save_post_revision()`. `wp_save_post_revision_revisions_before_deletion` passes the revisions to be considered for deletion, and the new revision's post ID.

This allows extenders to exclude specific revisions from being considered for deletion.

Props jhned, costdev, audrasjb, adamsilverstein, mukesh27.
Fixes #57320.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:39:17 +00:00
audrasjb
0c5812699c Users: Change parameters order in send_auth_cookies filter.
This changeset makes this filter more consistent with `set_auth_cookie` and `set_logged_in_cookie` hooks.

Follow-up to [55164].

Props SergeyBiryukov, audrasjb, mukesh27 , costdev.
Fixes #56971.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:30:17 +00:00
spacedmonkey
63e73fb860 Taxonomy: Implement wp_cache_get_multiple in wp_queue_posts_for_term_meta_lazyload.
In [47938] the `wp_cache_get_multiple` function was added to core. This function allows for multiple cache keys to be received from cache in a single function call. `wp_queue_posts_for_term_meta_lazyload` function does many calls to cache. To get taxonomy relationship for multiple posts and get all terms. Replace calls to `get_object_term_cache` with calls to `wp_cache_get_multiple` and `_prime_term_caches`. This improves performance on sites that implement the `wp_cache_get_multiple` in their object caching drop-in. 

Props spacedmonkey, ocean90, SergeyBiryukov, costdev, flixos90, joemcgill, 10upsimon. 
Fixes #57150.
Built from https://develop.svn.wordpress.org/trunk@55252


git-svn-id: http://core.svn.wordpress.org/trunk@54785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:10:18 +00:00
audrasjb
47ca4980d8 Media: Remove unwanted quotation marks for playlist template.
This changeset improves the way quotation marks are handled in the Playlist template.

Follow-up to [27239], [33643 ].

Props hvar, Presskopp, sabernhardt, james-roberts, arrasel403, abidhasan112, robinwpdeveloper, costdev, mukesh27.
Fixes #50865.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 12:08:22 +00:00
audrasjb
4c9154723a Build/Test Tools: Add unit tests for wp_set_password hook.
Follow-up to [55056].

Props audrasjb, SergeyBiryukov, costdev.
Fixes #57436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 09:25:21 +00:00
audrasjb
e00a90c571 Media: Maintain the functionnality of the deprecated WP_Media_List_Table::column_desc() method.
Follow-up to [55159].

Props peterwilsoncc, costdev, mukesh27.
Fixes #39710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 09:08:20 +00:00
audrasjb
64384b74d8 Query: Add a search_columns argument to control which fields are searched in a search query.
Previously, the `s` argument of the `WP_Query::parse_query()` method searched the `post_title`, `post_excerpt`, and `post_content` fields, with no way of controlling this apart from using the `posts_search` filter and adjusting the SQL manually. This changeset adds the ability to specify which fields are searched when performing a query, using the `search_columns` argument.

Props johnbillion, birgire, petitphp, audrasjb, costdev, mukesh27.
Fixes #43867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 08:55:18 +00:00
youknowriad
ff5026369e Site Editor: Backport site editor intialization changes from Gutenberg 15.1
The site editor has been updated to not require the "home template" setting. 
This removes the key from the settings passed to the frontend.

Props flixos90, hellofromtonya, ntsekouras.
Fixes #57480.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 07:16:17 +00:00
youknowriad
a41c798835 Block Editor: Updated the WordPress packages to include Gutenberg 15.1.0 changes.
In addition to all the packages being updated to the latest versions, 
this commit also includes some mandatory changes to avoid editor breakage:

 - Update React to to 18.2.0.
 - Add the right stylesheets to support iframed block editors.

Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 07:04:52 +00:00
Peter Wilson
6b50b3e9fe Formatting: Guard wp_strip_all_tags() against fatal errors.
Check the input of `wp_strip_all_tags()` before passing it to `strip_tags()`. This protects against fatal errors introduced in PHP 8, retaining the `E_USER_WARNING` from PHP 7, and prevents a PHP 8.1 deprecation notice when passing null.

Props chocofc1, costdev, jrf, dd32, audrasjb, peterwilsoncc.
Fixes #56434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 03:34:15 +00:00
Peter Wilson
425787e5ba Filesystem API: Add test for uncovered WP_Error in move_dir().
Introduces a test for the `WP_Error` object `destination_not_deleted_move_dir` in the `move_dir()` function.

Follow up to [55226].

Props costdev, mukesh27.
Fixes #57375.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 03:17:17 +00:00
Peter Wilson
485d9da6ff Embeds: Use documented mixcloud.com oembed endpoint.
Adds a trailing slash to the mixcloud.com oembed endpoint to match the documented version.

Follow up to [55068].

Props jeherve, matclayton.
Fixes #57376.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 03:10:18 +00:00
Peter Wilson
dcf1b4c873 Embeds: Update YouTube provider for live URLs.
YouTube Live stream URLs can take the form of `youtube.com/live/videocode`. This registers the URL format for the oembed provider.

Props slieschke, costdev.
Fixes #57632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 02:56:19 +00:00
Felix Arntz
9c56cf2cf7 Emoji: Fix emoji feature detection.
The emoji feature detection that occurs on every page load by default has been broken at least since [45769], causing the feature detection to fail for browsers that in fact support emoji correctly. This has led to the `wp-emoji-release.min.js` file being loaded unnecessarily even in modern browsers, which accounts for roughly 4.7 KB of extra JavaScript on every page load.

This changeset fixes the feature detection, by using the correct sequences of char codes.

Props sergiomdgomes, dmsnell, peterwilsoncc.
Fixes #57301.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 21:38:15 +00:00
audrasjb
a816a24b9c Coding Standards: Add missing escaping function in Custom_Image_Header::show_header_selector().
Props chintan1896, SergeyBiryukov.
Fixes #57638.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 21:36:17 +00:00
audrasjb
b27543461d Users: Update get_avatar_url() and get_avatar() to include RoboHash support.
Follow-up to [55238].

Fixes #57493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 21:30:18 +00:00
audrasjb
cc6bdd0929 Users: Add support for RoboHash Gravatar images in default user profile pics.
Gravatar includes support for RoboHash auto-generated images. This changeset adds it to the built-in feature for user profile images.

See Gravatar docs: https://en.gravatar.com/site/implement/images/.

Props juliobox, audrasjb.
Fixes #57493.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 21:19:17 +00:00
audrasjb
e5b74056b6 External Libraries: Update jQuery Migrate to version 3.4.0.
A full list of changes in this release can be found upstream on the jQuery Migrate GitHub repository:
https://github.com/jquery/jquery-migrate/compare/3.3.2...3.4.0.

Props desrosj, audrasjb, a4jpcom, stalukder03, mukesh27, adeltahri, robinwpdeveloper, mahbubshovan.
Fixes #56743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 20:59:15 +00:00
Felix Arntz
8a805daa9a Themes: Add caching to WP_Theme::is_block_theme().
This changeset adds a `block_theme` entry in the theme cache data, similar to the existing entries `headers`, `errors`, `stylesheet`, and `template`.

Props spacedmonkey, costdev, joemcgill, flixos90, mukesh27, adamsilverstein.
Fixes #57114.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 19:59:17 +00:00
Felix Arntz
ee7b88a862 Editor: Use WP_HTML_Tag_Processor in wp_render_elements_support().
Props ntsekouras.
Fixes #57642.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 19:43:16 +00:00
Felix Arntz
53c7f7a8a7 Editor: Support the block_types and viewport_width props for remote patterns fetched from Pattern Directory.
Props ntsekouras, ironprogrammer, hellofromtonya, flixos90.
Fixes #57611.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 19:40:16 +00:00
desrosj
1593f0615a Build/Test Tools: Update npm dependencies for bundled themes.
This applies several dependency version updates to Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One.

`npm audit fix` has also been run to automatically fix any packages with reported vulnerabilities.

See #57535.
Built from https://develop.svn.wordpress.org/trunk@55233


git-svn-id: http://core.svn.wordpress.org/trunk@54766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 18:55:16 +00:00
desrosj
c1e29c4da6 Build/Test Tools: Update json2php package.
This updates the `json2php` package to the latest version, which is currently `0.0.7`.

See #57535.
Built from https://develop.svn.wordpress.org/trunk@55232


git-svn-id: http://core.svn.wordpress.org/trunk@54765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 18:44:30 +00:00
jorgefilipecosta
1bfd84f99a Block editor: Update WP_Theme_JSON_Resolver and improve its performance.
This commit includes the latest updates WP_Theme_JSON_Resolver class made in the block editor. Some of these updates improve the performance of the class.

Props Mamaduka, hellofromTonya, flixos90, jorgefilipecosta, oandregal, spacedmonkey, audrasjb, costdev, scruffian.
Closes #57545.
Built from https://develop.svn.wordpress.org/trunk@55231


git-svn-id: http://core.svn.wordpress.org/trunk@54764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 15:33:19 +00:00
jorgefilipecosta
f6cb5218c1 Block editor: Add ID support to block wrapper attributes.
This commit adds support for the ID attribute for dynamically rendered blocks.

Props Soean, flixos90, poena, costdev, Mamaduka.
Closes #56852.
Built from https://develop.svn.wordpress.org/trunk@55230


git-svn-id: http://core.svn.wordpress.org/trunk@54763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 15:24:16 +00:00
Sergey Biryukov
ba4ed5f86c Upgrade/Install: Send language pack updates to copy_dir().
If the `clear_working` flag in `WP_Upgrader::install_package()` is false, the source should not be removed, so `copy_dir()` should be used instead.

Partial updates, like language packs, may want to retain the destination. If the destination exists or has contents, this may be a partial update, and the destination should not be removed, so `copy_dir()` should be used instead.

Follow-up to [55204], [55219], [55220], [55223], [55226].

Props afragen, costdev, swissspidy.
See #57557.
Built from https://develop.svn.wordpress.org/trunk@55229


git-svn-id: http://core.svn.wordpress.org/trunk@54762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 14:48:16 +00:00
audrasjb
5c1f181c0a Twenty Fourteen: Correctly reflect text color changes in Pullquote block.
This changeset ensures text color changes on Pullquote block are reflected on both front-end and in the editor.

Props umesh84, audrasjb, sabernhardt, bgoewert, ruchirj, amitbarai013, robinwpdeveloper, shamayel007.
Fixes #56006.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 08:59:17 +00:00
audrasjb
b15e530828 Twenty Sixteen: Fix Gallery block images alignement.
This changeset fixes an alignment issue that has been present since the gallery block markup was changed in WordPress 6.0.

Props silicium23, zoonini, sabernhardt, bgoewert, ira2910, tahminar27.
Fixes #56412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 08:26:21 +00:00
Peter Wilson
be3d8fdcc3 Filesystem API: Prevent fatal error in move_dir().
Correctly instantiate `WP_Error()` within `move_dir()` to prevent a fatal error when unable to delete an existing directory that is intended to be replaced.

Follow-up to [55204], [55219], [55220], [55223].

Props swissspidy, costdev, afragen.
Fixes #57375.


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


git-svn-id: http://core.svn.wordpress.org/trunk@54759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-06 04:21:20 +00:00
Sergey Biryukov
cd0d67c8b2 Upgrade/Install: Silence Requests deprecations before preloading.
Intentional preloading of Requests 2.x classes and interfaces using their old (Requests 1.x) names should not produce deprecation notices.

This commit defines `REQUESTS_SILENCE_PSR0_DEPRECATIONS` as `true` in `_preload_old_requests_classes_and_interfaces()`.

Follow-up to [54997], [55007], [55046].

Props costdev, afragen, jrf.
Fixes #54504.
Built from https://develop.svn.wordpress.org/trunk@55225


git-svn-id: http://core.svn.wordpress.org/trunk@54758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-05 00:20:15 +00:00
Pascal Birchler
981111ee90 I18N: Improve method names in WP_Locale_Switcher().
This is a follow-up to [55161] to rename `::get_current_locale()` to `::get_switched_locale()` and `::get_current_user_id()` to `::get_switched_user_id()` for improved clarity.

Also:

* Fix docblock for `switch_locale` filter. The User ID is `false` if missing, not `null`.
* Add additional test involving `restore_previous_locale()` and improve test cleanup.

And most importantly: happy birthday ocean90! 🎂

Props johnjamesjacoby, ocean90.
See #57123.
Built from https://develop.svn.wordpress.org/trunk@55224


git-svn-id: http://core.svn.wordpress.org/trunk@54757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 20:47:18 +00:00
Sergey Biryukov
4b790e3483 Filesystem API: Simplify two conditionals in move_dir().
This updates the check whether the destination directory already exists to only call `$wp_filesystem->exists()` once.

Follow-up to [55204], [55219], [55220].

Props azaozz, afragen, SergeyBiryukov.
Fixes #57375.
Built from https://develop.svn.wordpress.org/trunk@55223


git-svn-id: http://core.svn.wordpress.org/trunk@54756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 15:37:16 +00:00
Sergey Biryukov
cb4b7b6a8b Docs: Use consistent format for the @return tags in _wp_object_name_sort_cb() and _wp_object_count_sort_cb().
Both functions are used as a callback for `uasort()`.

Follow-up to [36013], [55214].

See #57358, #56792.
Built from https://develop.svn.wordpress.org/trunk@55222


git-svn-id: http://core.svn.wordpress.org/trunk@54755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 15:18:16 +00:00
audrasjb
ba5324e2bd Media: Properly escape Download row action link in Media List Table.
Props joedolson, pbiron, audrasjb.
Fixes #57574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 07:10:18 +00:00
Andrew Ozz
552a0c71a8 Upgrade/Install: Use move_dir() instead of copy_dir() in WP_Upgrader::install_package() when possible. This would make the filesystem operations a lot faster in most cases, and potentially reduce failures.
Props: afragen, costdev, peterwilsoncc, pbiron, mukesh27, SergeyBiryukov, azaozz.
Fixes: #57557.
Built from https://develop.svn.wordpress.org/trunk@55220


git-svn-id: http://core.svn.wordpress.org/trunk@54753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 03:31:16 +00:00
Andrew Ozz
8cf4b7557f Filesystem API: Update move_dir() to better handle the differences in the WP_Filesystem::move() methods.
Changes `move_dir()` to attempt to delete the destination when overwriting, before calling `WP_Filesystem::move()`.

Props: afragen, costdev, azaozz.
Fixes: #57375.
Built from https://develop.svn.wordpress.org/trunk@55219


git-svn-id: http://core.svn.wordpress.org/trunk@54752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-04 01:08:17 +00:00
joedolson
e7a506c636 Media: Hide 'view' link if empty string passed to attachment_link.
Fix empty href attribute on 'View' link when the `attachment_link` filter is used to hide attachment pages.

Props oh_hello, iqbalrony.
Fixes #54824.
Built from https://develop.svn.wordpress.org/trunk@55218


git-svn-id: http://core.svn.wordpress.org/trunk@54751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 22:25:16 +00:00
joedolson
4efd5d5623 Media: Pass $size argument to get_attached_file filter.
Pass the new `$size` argument on `get_attached_file()` to `get_attached_file` filter. Follow up to [55199].
 
Props SergeyBiryukov, joedolson.
Fixes #51780.
Built from https://develop.svn.wordpress.org/trunk@55217


git-svn-id: http://core.svn.wordpress.org/trunk@54750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 19:25:21 +00:00
Felix Arntz
1856b98771 Editor: Add missing WP_Theme_JSON::process_blocks_custom_css() method.
Follow up to [55192].

Props aristath, mamaduka, mukesh27, hellofromtonya.
Fixes #57621.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 18:25:22 +00:00
spacedmonkey
203ba0cc28 Query: Revert [55169].
Revert [55169] and mark #56689 as wontfix. `get_page_by_path` can not use `WP_Query`, as is results in fatel errors for those using `get_page_by_path` in the `pre_get_posts` action or `posts_pre_query` filter. This sadly means that `WP_Query` can never be used in `get_page_by_path`.

Props spacedmonkey, iandunn, mukesh27, joemcgill, adamsilverstein, otto42. 
See #56689.
Built from https://develop.svn.wordpress.org/trunk@55215


git-svn-id: http://core.svn.wordpress.org/trunk@54748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 16:17:21 +00:00
audrasjb
e3e4d51e11 Fix a PHP 8 deprecation warning in category-template.php uasort() helper.
Props Webrocker, jigar-bhanushali, jrf, audrasjb, costdev.
Fixes #57358.
See #56790.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 15:44:19 +00:00
Sergey Biryukov
eff6618cbb Docs: Capitalize X-Pingback in discover_pingback_server_uri() DocBlock.
Follow-up to [55210], [55211], [55212].

See #54225.
Built from https://develop.svn.wordpress.org/trunk@55213


git-svn-id: http://core.svn.wordpress.org/trunk@54746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 14:47:18 +00:00
Sergey Biryukov
e235883c4d HTTP API: Restore one instance of the X-Pingback header capitalization.
The revert in the previous commit appears to be accidental.

Follow-up to [55210], [55211].

See #54225.
Built from https://develop.svn.wordpress.org/trunk@55212


git-svn-id: http://core.svn.wordpress.org/trunk@54745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 14:41:26 +00:00
audrasjb
897eefe2e3 HTTP API: Fix a unit test failure found after [55210].
Follow-up to [55210].

See #54225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 13:53:18 +00:00
audrasjb
28358ab213 HTTP API: Fix request header inconsistencies.
This changeset improves the consistency in capitalization of fetching and outputting of request headers. It also updates occurrences found in some docblocks.

Props johnjamesjacoby, costdev, audrasjb, petitphp, mhkuu, SergeyBiryukov.
Fixes #54225.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 13:35:20 +00:00
audrasjb
965fe8f209 Media: Replace consecutive periods in sanitize_file_name().
On some servers, consecutive periods in a filename can cause a 403 Forbidden response.
This changeset replaces consecutive periods with a single period, and adds related unit tests.

Props ArtZ91, costdev, SergeyBiryukov, arthurshlain, mukesh27.
Fixes #57242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 12:48:23 +00:00
Peter Wilson
39aa80cb87 Posts, Post Types: Add test coverage for _truncate_post_slug().
Props xknown, mukesh27, costdev, audrasjb.
Fixes #56868.
See #56793.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 04:04:15 +00:00
Peter Wilson
592be344b4 Posts, Post Types: Deprecate get_page_by_title() in favour of WP_Query.
Formally deprecate `get_page_by_title()`. In its current form the function is unpredictable in that it may return a result that leads to a 404 error and will return different results depending on the database version/engine combination used.

It is recommended developers use `WP_Query` instead:

{{{
$query = new WP_Query(
 array(
  'post_type' => 'page',
  'title'     => 'Sample Page',
 )
);
}}}


Props TimothyBlynJacobs, costdev, mukesh27, spacedmonkey, peterwilsoncc.
Fixes #57041.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 03:58:16 +00:00
Andrew Ozz
7bc792bb73 Fix couple of typos in inline docs.
Props: ironprogrammer.
See #57575.
Built from https://develop.svn.wordpress.org/trunk@55206


git-svn-id: http://core.svn.wordpress.org/trunk@54739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 02:14:19 +00:00
Andrew Ozz
d5f8d02445 Docs: Document directory support in FTP/SSH2 filesystem ::move() methods.
Props: costdev, flixos90, audrasjb.
Fixes: #57604.
Built from https://develop.svn.wordpress.org/trunk@55205


git-svn-id: http://core.svn.wordpress.org/trunk@54738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:59:15 +00:00
Andrew Ozz
47172a2c65 Filesystem API: Add directory support to WP_Filesystem_Direct::move().
Introduces:
- New function: `wp_opcache_invalidate_directory()`, to recursively call `wp_opcache_invalidate()` after overwriting .php files.
- New function: `move_dir()`, similar to `copy_dir()` that uses `WP_Filesystem::move()` followed by `wp_opcache_invalidate_directory()`, and has a fallback to `copy_dir()`.

Props: costdev, afragen, peterwilsoncc, sergeybiryukov, ironprogrammer, flixos90, bronsonquick, mukesh27, azaozz.
Fixes #57375.
Built from https://develop.svn.wordpress.org/trunk@55204


git-svn-id: http://core.svn.wordpress.org/trunk@54737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:50:16 +00:00
Andrew Ozz
be73904dc7 Introduce HTML API with HTML Tag Processor
This commit pulls in the HTML Tag Processor from the Gutenbeg repository.

The Tag Processor attempts to be an HTML5-spec-compliant parser that provides the ability in PHP to find specific HTML tags and then add, remove, or update attributes on that tag. It provides a safe and reliable way to modify the attribute on HTML tags.

More information: https://github.com/WordPress/wordpress-develop/pull/3920.

Props: antonvlasenko, bernhard-reiter, costdev, dmsnell, felixarntz, gziolo, hellofromtonya, zieladam, flixos90, ntsekouras, peterwilsoncc, swissspidy, andrewserong, onemaggie, get_dave, aristath, scruffian, justlevine, andraganescu, noisysocks, dlh, soean, cbirdsong, revgeorge, azaozz.
Fixes #57575.
Built from https://develop.svn.wordpress.org/trunk@55203


git-svn-id: http://core.svn.wordpress.org/trunk@54736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 01:05:17 +00:00
Sergey Biryukov
94ede5b18c Docs: Improve the DocBlock for get_attached_file().
Includes:
* Using 3-digit format for the `@since` tag.
* Minor wording updates and formatting corrections.

Follow-up to [3203], [4612], [6379], [8203], [24983], [29090], [55199].

See #51780, #56792.
Built from https://develop.svn.wordpress.org/trunk@55202


git-svn-id: http://core.svn.wordpress.org/trunk@54735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 00:47:19 +00:00
hellofromTonya
a35991eb44 Editor: Add missing controls to flex layouts in wp_get_layout_style().
Adds missing controls to flex layouts in `wp_get_layout_style()` for justify-content and vertical alignment options.

References:
* [https://github.com/WordPress/gutenberg/pull/47134 Gutenberg PR 47134].

Follow-up to [54274].

Props isabel_brison, andrewserong, jameskoster, joen, onemaggie , ndiego.
Fixes #57602.
Built from https://develop.svn.wordpress.org/trunk@55201


git-svn-id: http://core.svn.wordpress.org/trunk@54734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 00:36:17 +00:00
hellofromTonya
fbfd2b4372 Widgets: Preserve classic sidebars when switching to a block theme.
When switching to a block theme, classic sidebars were orphaned and their widgets remapping to the `'wp_inactive_widgets'` sidebar . This changeset preserves the sidebars and their widgets, providing a migration path to a block theme without losing the widgets.

Classic sidebars are now:

* Stored in a new theme mod called `'wp_classic_sidebars'`;
* Restored to the `$wp_registered_sidebars` global variable when the `'widgets_init'` action fires (via a new internal function called `_wp_block_theme_register_classic_sidebars()`);
* And marked as `'inactive'` when interacting with sidebars REST API endpoint.

References:
* [https://github.com/WordPress/gutenberg/pull/45509 Gutenberg PR 45509] which adds an option for importing widgets from sidebars into template parts.

Follow-up to [50995], [6334].

Props mamaduka, audrasjb, hellofromTonya, ironprogrammer, jameskoster, joen, matveb, mukesh27, noisysocks, poena, youknowriad.
Fixes #57531.
Built from https://develop.svn.wordpress.org/trunk@55200


git-svn-id: http://core.svn.wordpress.org/trunk@54733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-03 00:15:21 +00:00
joedolson
848a832fa0 Media: Add argument to get_attached_file() for subsizes.
Add a `$size` argument to `get_attached_file()` to simplify getting the path to an intermediate image size.
 
Props paulschreiber, audrasjb, Mista-Flo.
Fixes #51780.
Built from https://develop.svn.wordpress.org/trunk@55199


git-svn-id: http://core.svn.wordpress.org/trunk@54732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 23:40:16 +00:00
audrasjb
93234049f2 Media: Add a Download row action to the Media List Table.
This changeset makes it easier for users to download their uploaded media by providing a Download row action to the Media List Table. It also rephrases the Copy URL row action for better consistency and to give room for the new Download action.

Follow-up to [55156].

Props pbiron, joedolson, kebbet, Mista-Flo, costdev, amin7, mukesh27.
Fixes #57574.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 22:48:16 +00:00
audrasjb
0874553f76 Plugins: Rephrase Add Plugins screen description for better clarity.
This changeset rephrases the Add Plugins screen description to clarify the purpose of the two available options for installing plugins.

Props tahmidulkarim, audrasjb, costdev, ryokuhi, krupalpanchal, SergeyBiryukov.
Fixes #57155.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 21:50:16 +00:00
audrasjb
09d26de216 I18N: Pass $locale parameter to override_load_textdomain filter.
In [53874] the `$locale` parameter was added to `load_textdomain()` so it can be used to properly fill `WP_Textdomain_Registry`. Since `$locale` may not be the same value as `determine_locale()` returns (e.g. when filtered by `plugin_locale` in `load_plugin_textdomain()`) this changeset also passes the `$locale` parameter to the filter so custom file loading implementations are using the same locale as `load_textdomain()` got.

Follow-up to [53874].

Props ocean90, cadic, SergeyBiryukov, swissspidy, costdev.
Fixes #57056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 21:31:18 +00:00
audrasjb
bc802e7b51 Help/About: Update help tab texts to consistently describe button labels.
This changeset ensures help tab texts consistently refer to the related button labels.

Props kebbet, costdev.
Fixes #57608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 20:24:20 +00:00
jorgefilipecosta
cae1a31e55 Editor: Remove need for template prefix in get_template_hierarchy.
This commit removes the need to pass a template prefix in get_template_hierarchy.
This is required because, in some block editor usages, the template prefix is not known.

Props youknowriad, davidbaumwald, jorgefilipecosta.
Fixes #57614.
Built from https://develop.svn.wordpress.org/trunk@55194


git-svn-id: http://core.svn.wordpress.org/trunk@54727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 19:38:19 +00:00
Felix Arntz
043e2016a3 Editor: Remove unnecessary CSS comments from compiled styles.
Props aristath, adamsilverstein, SergeyBiryukov, gziolo.
Fixes #56388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 18:59:20 +00:00
Felix Arntz
5b4af6125a Editor: Add support for custom CSS in global styles.
This changeset introduces functions `wp_get_global_styles_custom_css()` and `wp_enqueue_global_styles_custom_css()`, which allow accessing and enqueuing custom CSS added via global styles.

Custom CSS via global styles is handled separately from custom CSS via the Customizer. If a site uses both features, the custom CSS from both sources will be loaded. The global styles custom CSS is then loaded after the Customizer custom CSS, so if there are any conflicts between the rules, the global styles take precedence.

Similarly to e.g. [55185], the result is cached in a non-persistent cache, except when `WP_DEBUG` is on to avoid interrupting the theme developer's workflow.

Props glendaviesnz, oandregal, ntsekouras, mamaduka, davidbaumwald, hellofromtonya, flixos90.
Fixes #57536.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 18:52:17 +00:00
desrosj
ae378d5095 Build/Test Tools: Update npm dependencies.
This updates the following npm dependencies to their latest versions:

- `chalk` from `5.1.0` to `5.2.0`.
- `dotenv-expand` from `9.0.0` to `10.0.0`.
- `grunt-contrib-qunit` from `6.2.0` to `6.2.1`.
- `prettier` from `2.0.5` to `2.6.2`.
- `qunit` from `2.19.1` to `2.19.4`.
- `sass` from `1.55.0` to `1.58.0`.
- `sinon` from `14.0.1` to `15.0.1`.
- `sinon-test` from `3.1.4` to `3.1.5`.
- `source-map-loader` from `4.0.0` to `4.0.1`.
- `uglify-js` from `3.17.3` to `3.17.4`.
- `wait-on` from `6.0.1` to `7.0.1`.
- `webpack` from `5.74.0` to `5.75.0`.

Additionally, `npm audit fix` has been run to further update packages that may contain vulnerabilities.

Props naeemhaque, mukesh27, desrosj.
See #57535.
Built from https://develop.svn.wordpress.org/trunk@55191


git-svn-id: http://core.svn.wordpress.org/trunk@54724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 16:36:32 +00:00
Sergey Biryukov
12aba159d9 Coding Standards: Rename the $cat_ID variable to $cat_id in wp_update_category().
This resolves a few WPCS warnings:
{{{
Variable "$cat_ID" is not in valid snake_case format, try "$cat_i_d"
}}}

Follow-up to [2695], [4490], [52958].

Props hilayt24, viralsampat, desrosj, robinwpdeveloper, tanazmasaba, costdev, SergeyBiryukov.
See #56754.
Built from https://develop.svn.wordpress.org/trunk@55190


git-svn-id: http://core.svn.wordpress.org/trunk@54723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 13:59:18 +00:00
audrasjb
3f4a005ea6 Twenty Twenty-Two: Improve spacing for the legacy Post Comments block.
This changeset adds margins to improve spacing in the legacy Post Comments block. This change only affects users who have not updated to the new Comments block.

Props patelhitesh, audrasjb, poena, miguelaxcar.
Fixes #57560.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 09:25:17 +00:00
audrasjb
7e3b08c8af Themes: Increase HTTP timeout for Theme API requests.
This changeset modifies the HTTP request in `themes_api()` to use the same HTTP request timeout as in `plugins_api()`, which is 15 seconds, instead of a default value of 5 seconds.

Props ahortin, peterwilsoncc, dd32, costdev.
Fixes #57315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 09:14:17 +00:00
joedolson
01236f5948 Media: Fix inconsistent font weight in media detail views.
Make font weight consistent between different screens and different parts of media views.
 
Props szaqal21, sabernhardt.
Fixes #54509.
Built from https://develop.svn.wordpress.org/trunk@55187


git-svn-id: http://core.svn.wordpress.org/trunk@54720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 02:16:12 +00:00
Andrew Ozz
9d580a0fcb Emoji: Always skip nodes with the wp-exclude-emoji CSS class.
Patches twemoji.js to add support for a `doNotParse()` callback. Uses that callback to always exclude emojis in HTML elements with the above class.

Props: dd32, peterwilsoncc, azaozz.
Fixes #52219.
Built from https://develop.svn.wordpress.org/trunk@55186


git-svn-id: http://core.svn.wordpress.org/trunk@54719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-02 00:53:25 +00:00
Felix Arntz
9feba5fa8b Editor: Use a non-persistent object cache instead of transient in wp_get_global_stylesheet().
This changeset is part of a greater effort to enhance the caching strategy for theme.json based data. Similar to [55138], [55148], and [55155], the cache is currently ignored when `WP_DEBUG` is on to avoid interrupting the theme developer's workflow.

Props spacedmonkey, oandregal, flixos90, ajlende, hellofromtonya.
Fixes #57568.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 22:59:13 +00:00
hellofromTonya
1056e0175c KSES: Allow position-related CSS properties.
Adds support for the following CSS properties considered safe for inline CSS:
* `position`
* `top`
* `right`
* `bottom`
* `left`
* `z-index`

References:
* [https://github.com/WordPress/gutenberg/pull/46142 Gutenberg PR 46142].

Follow-up to [54117].

Props andrewserong, mukesh27.
Fixes #57504.
Built from https://develop.svn.wordpress.org/trunk@55184


git-svn-id: http://core.svn.wordpress.org/trunk@54717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 22:52:14 +00:00
joedolson
379bec8ea6 Media: Ensure media IDs are type int in bulk editing.
Cast all array values to integers using `array_map` so functions like `wp_delete_attachment` receiving the expected variable type.
 
Props eherman24, joedolson.
Fixes #56170.
Built from https://develop.svn.wordpress.org/trunk@55183


git-svn-id: http://core.svn.wordpress.org/trunk@54716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 22:17:15 +00:00
audrasjb
e8bd962c4e Embeds: Add oEmbed support for crowdsignal.net surveys.
Crowdsignal has a block-editor powered survey/project editor. Surveys created using this editor appear on `*.crowdsignal.net` when published. This changeset adds oEmbed support for these URLs to embed Crowdsignal surveys.

Props donncha, audrasjb, Mamaduka, ntsekouras.
Fixes #57543.

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


git-svn-id: http://core.svn.wordpress.org/trunk@54715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 21:45:16 +00:00
hellofromTonya
e8096f0883 Editor: Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox.
Adds the polyfill script to the iframe to make the `inert` attribute work correctly in Firefox. This solves the problem that the site editor can operate on the block editor in Firefox even in browse mode.

Why?

The inert attribute is intended to render the element and its sub-tree elements `inert`, but Firefox doesn't support this attribute. For the `inert` attribute to work as intended in Firefox, even within an iframe, the script needs to be injected into the iframe as well as the global document.

References:
* [https://github.com/WordPress/gutenberg/pull/47398 Gutenberg PR 47398].

Follow-up to [53160].

Props wildworks, mamaduka, youknowriad.
Fixes #57552.
Built from https://develop.svn.wordpress.org/trunk@55181


git-svn-id: http://core.svn.wordpress.org/trunk@54714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-01 20:44:11 +00:00