44802 Commits

Author SHA1 Message Date
John Blackbourn
9932b46595 Docs: Various corrections and improvements relating to types used in inline documentation.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52204 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 13:48:43 +00:00
Jb Audras
fb23461742 Upgrade/Install: Add timezone info to last checked update time.
The time displayed on the Updates screen matches the server time which may not be the timezone the person viewing the page is in. This change includes the timezone information with the time.

Props mkaz.
Fixes #53554.


git-svn-id: https://develop.svn.wordpress.org/trunk@52203 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 09:23:51 +00:00
Jb Audras
d6f3d408d8 Posts, Post Types: Increment post_count option value only on multisite installations.
Avoid the `post_count` option to be created on single-site installations.

Follow-up to [52201].

Props dlh, henry.wright.
Fixes #54462.


git-svn-id: https://develop.svn.wordpress.org/trunk@52202 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 00:19:32 +00:00
Jb Audras
206f8b1d95 Posts, Post Types: Increment post_count option value during blog creation.
Previously, the `post_count` option value was not incremented when the default "Hello world!" post is inserted during blog creation on a multisite installation.

Props henry.wright.
Fixes #54462.
See #53443.


git-svn-id: https://develop.svn.wordpress.org/trunk@52201 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 23:06:06 +00:00
Joe Dolson
59311a53d2 Comments: Change new comment required text class.
Change the new class on comment required text from `comment-required-message` to `required-field-message` for better future-compatibility, enabling better reuse.

Props sabernhardt.
Fixes #16206.


git-svn-id: https://develop.svn.wordpress.org/trunk@52200 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 18:36:53 +00:00
Tonya Mork
902fd83cf4 Upgrade/Install: Remove 5.8 function and fix deactivate Gutenberg plugin version compare < 11.9.
Follow-up to [52165] where the `version_compare()` fails for 11.8.x versions. This commit changes the version comparison to < 11.9 for deactivating the Gutenberg plugin. 

The `_upgrade_580_force_deactivate_incompatible_plugins()` function is no longer needed in 5.9. It's redundant and unnecessary as `_upgrade_590_force_deactivate_incompatible_plugins()` deactivates those versions as well.

Removing `_upgrade_580_force_deactivate_incompatible_plugins()` and moving the deactivation logic back into the `_deactivate_gutenberg_when_incompatible_with_wp()`, thus removing the new private function `_deactivate_gutenberg_when_incompatible_with_wp()` introduced in [52165].

Follow-up [51180], [51266], [52165].

Props hellofromTonya, tobiasbg, clorith, sergeybiryukov, costdev.
Fixes #54405. 

git-svn-id: https://develop.svn.wordpress.org/trunk@52199 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 17:43:41 +00:00
Joe Dolson
11e1a295b6 Toolbar: Prevent adminbar from hiding in-page anchors.
Use scroll-padding-top to offset scroll position on in-page anchors when adminbar is active. Also adjusts existing scroll padding for core themes that implement it.

Props afercia, kingkero, audrasjb, dufresnesteven, thimalw, sabernhardt, costdev.
Fixes #46371.


git-svn-id: https://develop.svn.wordpress.org/trunk@52198 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 17:18:09 +00:00
Jb Audras
5036d60706 Upgrade/Install: Differentiate en_US version strings from localized ones.
Adds a condition to `$version_string` to determine whether the Core update is the original en_US package, or a localized one.

This change fixes an issue where these packages were not differentiated and duplicate messages were displayed.

Props Presskopp, benjamingosset.
Fixes #53710.


git-svn-id: https://develop.svn.wordpress.org/trunk@52197 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 16:22:19 +00:00
Joe Dolson
8cc2cd4a7d Media: Move dismiss upload errors button after errors.
Change the button that dismissess upload errors so it appears after the relevant errors. Change button from icon-only to text-based. Removes ambiguity about what you are cancelling when using the control.

Props ComputerGuru, melchoyce, vdwijngaert, alexislloyd, joedolson, shaunandrews, sabernhardt.
Fixes #42979.


git-svn-id: https://develop.svn.wordpress.org/trunk@52196 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 15:54:40 +00:00
Sergey Biryukov
d772a0407e WPDB: Call wp_load_translations_early() in wpdb::_real_escape().
This follows the pattern used in other `wpdb` methods to make sure the i18n functions are available.

Follow-up to [29840].

Props nacin, johnbillion.
See #32315.

git-svn-id: https://develop.svn.wordpress.org/trunk@52195 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 04:03:25 +00:00
Peter Wilson
aec78f5a16 Posts, Post Types: Use global post as the default for wp_get_post_parent_id().
Convert the `$post` parameter of `wp_get_post_parent_id()` to optional, defaulting to the current global post object when called within the loop.

Props danielpost, davidbaumwald, SergeyBiryukov, birgire, audrasjb, hellofromTonya, TimothyBlynJacobs.
Fixes #48358.



git-svn-id: https://develop.svn.wordpress.org/trunk@52194 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 03:23:40 +00:00
Jb Audras
6679a0614d Login and Registration: auto-focus the reset password field.
Although auto-focusing form fields can be arguable in some cases, it makes sense when there is a very specific task to accomplish and when there is no relevant content before the auto-focused field.

This change brings consistency between various forms generated by `wp-login.php`.

Props afercia, donmhico, sabernhardt.
Fixes #40302.


git-svn-id: https://develop.svn.wordpress.org/trunk@52193 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 00:12:35 +00:00
Sergey Biryukov
c1089ebc68 Upgrade/Install: Correct the weekly cron event for clearing the temp-backup directory:
* Make sure the `wp_delete_temp_updater_backups` event has an action associated with it when it runs.
* Check if the cron event already exists before scheduling it, to avoid scheduling duplicate events. 
* Move the code for clearing the `temp-backup` directory to a standalone function.

Follow-up to [51815], [51898], [51899].

Props pbiron, johnbillion.
See #51857.

git-svn-id: https://develop.svn.wordpress.org/trunk@52192 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 22:18:32 +00:00
Jb Audras
6192591757 Twenty Twenty-One: Remove RSS feed widget icon link.
Use the `rss_widget_feed_link` filter to disable the output of the icon on RSS feed widgets in Twenty Twenty-One. Improves accessibility by preventing invisible links.

Props sabernhardt, poena.
Fixes #52880.


git-svn-id: https://develop.svn.wordpress.org/trunk@52191 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 21:46:24 +00:00
Tonya Mork
3a03cdd776 Media: Add support for v1 and v2 gallery block in get_post_galleries().
The `get_post_galleries()` function only handled galleries from the `[gallery]` shortcode. It did not process gallery blocks.

Introducing v1 and v2 gallery block support in `get_post_galleries()` including support for innerblock nesting.

There are no changes to how the function is called. It detects if the post content has one or more gallery blocks. If detected, it parses the blocks and then processes to add each gallery block's HTML to the array of galleries before being passed through the filter and returned.

Includes integration tests.

Follow-up to [24682], [43309], [48262], [52042].

Props glendaviesnz, costdev, antpb, audrasjb, birgire, celloexpressions, desrosj, hellofromTonya, jeffpaul, lynk, pento, ramonopoly, russhylov, takahashi_fumiki, tellyworth.
Fixes #43826.

git-svn-id: https://develop.svn.wordpress.org/trunk@52190 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 21:23:12 +00:00
Adam Silverstein
530a3b0376 Media: improve error message for failed image uploads.
Clarify error language and change the maximum suggested size to match the large image threshold.

Props zodiac1978, SergeyBiryukov, antpb, webcommsat, hellofromTonya. 
Fixes 53985.



git-svn-id: https://develop.svn.wordpress.org/trunk@52189 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 19:59:11 +00:00
Tonya Mork
dac57bbf50 Formatting: Add additional support for single and nestable tags in force_balance_tags().
Adds `track` and `wbr` support for single tags.

Adds `article`, `aside`, `details`, `figure`, and `section` for nestable tags.

Updates tests.

Follow-up to [5805], [21828], [45929].

Props glendaviesnz, costdev, talldanwp, ramonopoly, sergeybiryukov.
Fixes #50225.

git-svn-id: https://develop.svn.wordpress.org/trunk@52188 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 19:40:36 +00:00
Tonya Mork
5d5c9bf6a7 HTTP API: Remove empty ? when only anchor remains in add_query_arg().
If after processing through `add_query_arg()` a `?#` remains, this commit removes the unnecessary and unused `?` character as there are no query args in the URL.

Includes tests.

Follow-up to [1823], [5193], [5999], [6005].

Props benjaminanakenam, sabernhardt, costdev, hellofromTonya.
Fixes #44499.

git-svn-id: https://develop.svn.wordpress.org/trunk@52187 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 18:48:47 +00:00
Jonny Harris
3c4d1d8c44 REST API: Make the templates controller follow core REST patterns.
The templates controller now respects the `_fields` parameter and filters the response accordingly. The schema has been updated to include all the fields returned. The `content.block_version` field has been added. The controller now returns WP_Error objects for improved error handling.

Add new unit tests.

Props TimothyBlynJacobs, hellofromtonya, zieladam.
Fixes #54422.


git-svn-id: https://develop.svn.wordpress.org/trunk@52186 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 18:04:49 +00:00
Kelly Choyce-Dwan
076d207fc1 Themes: Force a scrollbar on the Themes page to prevent visual shake on hover.
On some browser & window size combinations (near where a scrollbar would appear), hovering over the theme card causes a layout shift. This makes the screen visually "jump" as the scrollbar appears and disappears. By forcing the scrollbar to be visible on this page, hovering doesn't cause the layout shift anymore.

Props wparslan, sabernhardt, costdev, audrasjb.
Fixes #53478.



git-svn-id: https://develop.svn.wordpress.org/trunk@52185 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 17:16:07 +00:00
Jonny Harris
f4e75ee8b7 REST API: Remove experimental block menu item types.
The menu items REST API controller was added in [52079]. This included functionality to add a "block" menu item type. This functionality is experimental and not currently used in WordPress core, so should be removed. 

Props noisysocks.
See #40878.



git-svn-id: https://develop.svn.wordpress.org/trunk@52184 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 17:07:43 +00:00
Jonathan Desrosiers
e411a1536a Build/Test Tools: Update all 3rd party GitHub actions to the latest versions.
See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@52183 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 16:08:03 +00:00
Jonathan Desrosiers
a53e6bb7e0 Twenty Nineteen: Apply coding standards fix from running composer format.
Follow up to [52149].

See #54392.

git-svn-id: https://develop.svn.wordpress.org/trunk@52182 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 15:01:37 +00:00
Jonathan Desrosiers
a125f5e87f Themes: Check both parent and child themes for a theme.json file.
This updates `WP_Theme_JSON_Resolver::theme_has_support()` to properly check for a `theme.json` file in both parent and child themes when determining whether a theme supports block templates.

Follow up to [52077].

Props Mamaduka.
Fixes #54401.

git-svn-id: https://develop.svn.wordpress.org/trunk@52181 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 14:56:42 +00:00
Tonya Mork
a8485376d2 Taxonomy: Allow get_*_*_link() and edit_term_link() functions to accept a term ID, WP_Term, or term object.
`get_term()` accepts a term ID, instance of `WP_Term`, or an object (i.e. `stdClass` as a result of a db query). Functions that use `get_term()` also now allow for the same data types.

Why? For consistency, removing extra processing code in consuming functions, and performance.

Functions changed in this commit are:
* `get_category_feed_link()`
* `get_term_feed_link()`
* `get_tag_feed_link()`
* `get_edit_tag_link()`
* `get_edit_term_link()`
* `edit_term_link()`

For each of consumer of these functions, changes to pass the object instead of the term ID.

Includes unit/integration tests for test coverage of these changes.

Follow-up to [6365], [9136], [9340], [14711], [15792], [15800], [18827], [32606], [36646], [37252].

Props davidbinda, johnbillion, peterwilsoncc, hellofromTonya, sergeybiryukov, mista-flo, hareesh-pillai, audrasjb, jeffpaul, chaion07.
Fixes #50225.

git-svn-id: https://develop.svn.wordpress.org/trunk@52180 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 14:55:04 +00:00
Jonathan Desrosiers
ba620225c5 Build/Test Tools: Cache the results of PHP_CodeSniffer across workflow runs.
When the `PHP_CodeSniffer` runs, it produces a cache file. When a cache file is present, only changed files are rescanned, making subsequent scans significantly faster.

This adds the needed steps to the corresponding GitHub Actions workflows to cache these files across runs. The cache keys include the date of the previous Monday to ensure that the cache is flushed at least weekly.

Since GitHub Action caches cannot be updated once created, the scans will take slightly longer as the week progresses and more PHP files are updated. The date within the cache key can be updated to purge twice weekly if the scan time starts to approach the current scan times.

This change also introduces a `.cache` directory for all caching files related to build/test tools.

Props johnbillion, jrf.
Fixes #49783.

git-svn-id: https://develop.svn.wordpress.org/trunk@52179 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 14:17:26 +00:00
Tonya Mork
c3222105d8 Administration: Restores "Customize" menu item for non-block themes and moves for block themes.
For themes without non-block themes (i.e. without a `/block-templates/index.html` file), restores the "Customize" menu item under "Appearance" menu to its original location of `6`.

For block themes, moves it to position `8`, as "Styles" is in position `7` as of [52158].

Follow-up to [29026], [52069], [52158].

Props poena, davidbaumwald, sabernhardt, hellofromTonya.
Fixes #54418.

git-svn-id: https://develop.svn.wordpress.org/trunk@52178 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 04:43:49 +00:00
Tonya Mork
8e0e534d90 Widgets: Wraps long widget titles in classic Widgets screen.
Follow-up to [18577], [26426].

Props afercia, bravokeyl, drewapicture, gkloveweb, hitendra-chopda, hellofromTonya, ianhayes94, ovann86, pankajmohale, poena, sabrib, swissspidy, xkon.
Fixes #37451.

git-svn-id: https://develop.svn.wordpress.org/trunk@52177 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 03:16:40 +00:00
Tonya Mork
648eb03768 WPDB: Capture error in wpdb::$last_error when insert fails instead of silently failing for invalid data or value too long.
Instead of silently failing when attempting to insert a value into a field, this commit saves the error in the `wpdb::$last_error` property.

Sets `last_error` with an error message if:
* `wpdb::query()` fails for invalid data
* `wpdb::process_fields()` fails to process the value(s) for the field(s) where the value could be too long or contain invalid data

Sets `last_query` if `wpdb::query()` fails for invalid data.

If `__()` is not available, uses non-translated error message to ensure the error is captured.

There is no change to wpdb aborting when an error occurs.

Adds tests.

Props dlt101, mnelson4, dd32, pento, hellofromTonya, davidbaumwald, sergeybiryukov, johnbillion, swissspidy, datainterlock, anandau14, anthonyeden, asif2bd, audrasjb, chaion07, dpegasusm, fpcsjames, galbaras, jdgrimes, justindocanto, kwisatz, liammitchell, lucasw89, lukecarbis, nettsite, nlpro, procodewp, psufan, richardfoley, skunkbad, travisnorthcutt, woodyhayday, zoiec.
Fixes #37267.

git-svn-id: https://develop.svn.wordpress.org/trunk@52176 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 02:57:53 +00:00
Tonya Mork
32225077fc Comments: Don't output "cancel comment reply link" if comments aren't threaded.
Though hidden via `style="display:none;"`, if the comments aren't threaded, this commit doesn't output the cancel comment reply link (skips over that logic). Change in `comment_form()`.

Adds tests.

Follow-up to [12810], [38959].

Props henrywright, jigneshnakrani, rachelbaker, desrosj, audrasjb, hellofromTonya.
Fixes #37267.

git-svn-id: https://develop.svn.wordpress.org/trunk@52175 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 02:13:25 +00:00
Tonya Mork
e265334aed Login and Registration: Wrap long usernames in login error message.
Adds `word-wrap: break-word` to wrap long usernames in the login's error message. Using `word-wrap` instead of `word-break` for better cross-browser support and to avoid the deprecation (see Ref below).

For consistency, also changes `#backtoblog`.

Ref:
* `word-break: break-word` deprecation https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#syntax

Follow-up to [51108].

Props soniakash, audrasjb, sabernhardt, hellofromTonya, desrosj, ocean90.
Fixes #37617.

git-svn-id: https://develop.svn.wordpress.org/trunk@52174 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 01:55:32 +00:00
Tonya Mork
13b52a310f Widgets: Use isset() in WP_Widget:: display_callback() to support ArrayIterator and ArrayObject.
[33696] introduced support returning `ArrayIterator` and `ArrayObject` objects from `WP_Widget::get_settings()`. 

Per the PHP manual, `array_key_exists()` stopped supporting this in PHP 8.0.0 and deprecated in PHP 7.4.0.

>For backward compatibility reasons, array_key_exists() will also return true if key is a property defined within an object given as array. This behaviour is deprecated as of PHP 7.4.0, and removed as of PHP 8.0.0.

This commit uses `isset()` instead of `array_key_exists()` which is supported on all current versions of PHP.

Includes unit tests.

Ref:
* https://www.php.net/manual/en/function.array-key-exists.php#refsect1-function.array-key-exists-notes

Follow-up to [32602], [33696].

Props dlh, hellofromTonya, jrf, sergeybiryukov.
Fixes #52728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52173 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 01:41:23 +00:00
Joe Dolson
6ec3f649b7 Coding Standards: Revert accidental image changes in [52171].
Reverts images changed in [52171].

Follow up to [52171].

See #54168.


git-svn-id: https://develop.svn.wordpress.org/trunk@52172 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 00:02:29 +00:00
Joe Dolson
0a5971b72b Media: Revert media uploader input change in [52059].
Based on follow-up research, this change was never necessary in order to use e2e tests in the media library uploader. Additionally, it created several complicated side effects. Without significant benefit, it's not valuable to pursue the change further.

Follow up to [52059].

See #54168, #54411.
Fixes #54168.

git-svn-id: https://develop.svn.wordpress.org/trunk@52171 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 23:20:20 +00:00
Joe Dolson
74d7ef73b3 Taxonomy: Display update notices when adding terms.
Display notice and announce to screen readers when a new term is added. 

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.


git-svn-id: https://develop.svn.wordpress.org/trunk@52170 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 22:23:01 +00:00
Joe Dolson
706018e08f Commit Standards: Revert [52168] to correct commit message.
Used incorrect commit message..

Follow up to [52168].

See #42937.

git-svn-id: https://develop.svn.wordpress.org/trunk@52169 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 22:16:32 +00:00
Joe Dolson
f58d8872b3 Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.

git-svn-id: https://develop.svn.wordpress.org/trunk@52168 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 21:53:26 +00:00
Joe Dolson
2049f04b4d Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props benitolopez, hellofromTonya, peterwilsoncc, danielbachhuber, PieWP, sabernhardt, szaqal21.
Fixes #53765.

git-svn-id: https://develop.svn.wordpress.org/trunk@52167 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 20:53:08 +00:00
Joe Dolson
1fcde43588 Menus: Add audible notice on menu item add or remove.
Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu.

Props joedolson, costdev, hellofromTonya.
Fixes #53840.

git-svn-id: https://develop.svn.wordpress.org/trunk@52166 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:58:04 +00:00
Tonya Mork
1f79818913 Upgrade/Install: Deactivate the Gutenberg plugin if its version is 11.8 or lower.
Avoid a fatal error due to `WP_Theme_JSON_Schema` and potentially other classes and/or functions redeclarations when updating to WordPress 5.9 with an incompatible version of the Gutenberg plugin.

This commit uses the same strategy from 5.8. Moves the plugin deactivation code (introduced in [51266]) to a private function for reuse in 5.8, 5.9, and future major releases.

Follow-up to [51180], [51266].

Props hellofromTonya, johnbillion, jorbin.
See #54405.

git-svn-id: https://develop.svn.wordpress.org/trunk@52165 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:57:28 +00:00
Jeff Ong
df3601dff4 Twenty Twenty-Two: Import the latest changes from GitHub.
Updates `theme.json` to use v2 shape, adds styles to search and file block as well as generic text decoration. Fixes a bug in the layout of a query block pattern.

This is a follow-up to [52081]. These changes are ongoing and development continues on GitHub. To view all of the changes included in this commit, see GitHub: 99db6063be...a11fb4932a

Props desrosj, kjellr, poena.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52164 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:13:33 +00:00
Sergey Biryukov
7a82c00961 Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen:
* Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields:
 * `name_field_description`
 * `slug_field_description`
 * `parent_field_description`
 * `desc_field_description`
* Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of `parent_field_description`.
* Add documentation and a `@since` note for the new labels.

Follow-up to [52094].

Fixes #43060.

git-svn-id: https://develop.svn.wordpress.org/trunk@52163 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 16:43:29 +00:00
Jonathan Desrosiers
f55fc8bc8c External Libraries: Update the regenerator-runtime package to version 0.13.9.
Props hareesh-pillai, sourovroy, hellofromTonya.
Fixes #54027.

git-svn-id: https://develop.svn.wordpress.org/trunk@52162 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 16:33:36 +00:00
Robert Anderson
9b142dd264 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Navigation: Fix click-button size, submenu directions, scrollbars.
- Group - Fix overzealous regex when restoring inner containers
- Babel Preset: Update Babel packages to 7.16 version
- theme.json: adds a setting property that enables some other ones
- Polish metabox container.
- Fix submenu justification and spacer orientation.
- Fix Gutenberg 11.8.2 in WordPress trunk
- Strip meta tags from pasted links in Chromium
- Hide visilibility and status for navigation posts
- Navigation: Refactor and simplify setup state.
- Nav block menu switcher - decode HTML entities and utilise accessible markup pattern
- Rename fse_navigation_area to wp_navigation_area
- theme.json: adds a setting property that enables some other ones
- Revert "theme.json: adds a setting property that enables some other ones"
- Skip flaky image block test
- WordPress/gutenberg@3c935c4
- React to any errors coming up in gutenberg_migrate_menu_to_navigation_post
- Return wp error from wp_insert_post
- Fix not transforming logical assignments for packages

See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52161 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 12:47:22 +00:00
Robert Anderson
47b5b384e5 Editor: Load iframed assets in Site Editor
Configure the Site Editor to load iframed block editor assets. This fixes some
styling issues in the Site Editor.

Follows [52069].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52160 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 10:59:48 +00:00
Robert Anderson
5b811e3397 Editor: Fix fatal call to add_query_args()
It should be add_query_arg(), not add_query_args().

Follows [52145].
See #54337.
Props sabernhardt.


git-svn-id: https://develop.svn.wordpress.org/trunk@52159 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 06:17:57 +00:00
Robert Anderson
5d64794e6f Editor: Fix how the Site Editor is linked to
- Add 'Edit site' to the top admin bar.
- Link to the Template and Template Part CPTs.
- Add deep link to the Global Styles UI.

Follows [52069].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52158 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 03:42:08 +00:00
Timothy Jacobs
91c3f80355 Users: Prevent infinite loop when using capability checks during determine_current_user on multisite.
On multisite, when checking if a user has a certain capability WordPress makes an additional check to see if the user is a super admin. The `is_super_admin()` function contained a call to `wp_get_current_user()` so as the global current user object could be used if it matched the queried user id.

This would cause an infinite loop if a hook attached to the `determine_current_user` filter was itself making a permission check. For example when limiting who can use the Application Passwords feature based on their capabilities.

Since [50790] the `WP_User` instance for the current user is shared between `wp_get_current_user()` and `get_userdata()`. This means we can remove the `wp_get_current_user` call from `is_super_admin()` while still retaining the same behavior.

Props chrisvanpatten, peterwilsoncc.
Fixes #53386.


git-svn-id: https://develop.svn.wordpress.org/trunk@52157 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 01:08:35 +00:00
Robert Anderson
b609efa519 Build/Test Tools: Restore the https URL for browserify-aes
Follows [52143].
See #54337.
Props TobiasBg.


git-svn-id: https://develop.svn.wordpress.org/trunk@52156 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 00:17:23 +00:00
Robert Anderson
02ad588c99 Editor: Fix incorrect access of ID field
Now that WP_Query is set to return 'ids', accessing $matching_posts[0]->ID is
incorrect.

Props spacedmonkey.
Follows [52145].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52155 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 00:10:39 +00:00