45113 Commits

Author SHA1 Message Date
Jorge Costa
70213b98a7 Script Loader: Load block support styles in the head for block themes.
The dynamic block styles for layout and elements should be loaded in the head for block themes. While that should also be the case for classic themes, the current mechanism we use (render_block) does not allow us to do that, hence, this PR doesn't change anything for them and will be loaded the body.

Props oandregal, youknowriad, wpsoul.
Merges [52741] to the 5.9 branch.
Fixes #55148.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52747 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 13:07:46 +00:00
Jb Audras
00452c7b30 Themes: Allow extending WP_Theme_JSON and WP_Theme_JSON_Resolver classes.
This change updates methods visibility from `private` to `protected` and adds late static binding.

Original PRs from Gutenberg repository:
- https://github.com/WordPress/gutenberg/pull/38625
- https://github.com/WordPress/gutenberg/pull/38671

Props oandregal, Mamaduka, kapilpaul.
Merges [52744] to the 5.9 branch.
Fixes #55178.
See #55179.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52746 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 11:13:09 +00:00
Dominik Schilling
9a7e624857 Editor: Prevent front-end assets of a block from being enqueued in the block editor.
Since WordPress 5.9 you can set a view script for a block which is supposed to be only loaded on the front end. Unfortunately it's currently also loaded in the editor which can cause unexpected behaviour and also performance issues depending on the size of the scripts.
This is caused by the preloading of REST API routes via `block_editor_rest_api_preload()` which doesn't happen in an encapsulated process and so does pollute any global state like the one for scripts and styles.
Similar to the global `$post`, core now backups the globals `$wp_scripts` and `$wp_styles` and restores the backup after the preloading.

Props gziolo, ocean90.
Merges [52733] to the 5.9 branch.
Fixes #55151.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52745 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 09:09:12 +00:00
Jb Audras
b0eed4db69 Script Loader: Load block themes styles in the head section.
Previously, some logic was added to load the global stylesheet in the bottom of `<body>` for classic themes that opted-in into loading individual block styles instead of a single stylesheet for them all. At the time, block themes always loaded the global stylesheet in the `<head>`. When block themes landed in core during WordPress 5.9 this logic wasn’t updated to consider them, hence the global stylesheet loaded in the `<body>` for them. This changeset fixes this.

Props oandregal, aristath.
Merges [52738] to the 5.9 branch.
Fixes #55148.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52739 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-16 10:53:59 +00:00
Jb Audras
eb88321caf Administration: Fix a CSS issue on the Welcome Panel when the "Dashboard" heading is missing.
This change adds a CSS exception for when the "Dashboard" heading is missing or located below the Welcome Panel.

Props critterverse, sabernhardt, rolfsiebers, audrasjb.
Merges [52735] to the 5.9 branch.
Fixes #54977.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52736 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-15 18:27:05 +00:00
Jb Audras
e417119d55 Widgets: Missing markup from Widgets Group block.
This change fixes an issue in the Widgets editor: widgets group was missing a `.wp-widget-group__inner-blocks` container.

Props noisysocks, ironprogrammer.
Merges [52730] to the 5.9 branch.
Fixes #55072.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52731 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-15 10:31:46 +00:00
Peter Wilson
efe5e46bad External libraries: Update version string for hoverIntent.
Updating the version string will help invalidate caches, ensuring the new version of the library is loaded where applicable.

Follow-up to [52429].

Props david.binda, Clorith.
Merges [52673] to the 5.9 branch.
Fixes #54904.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52729 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-15 02:47:42 +00:00
Peter Wilson
3075d02e4b Editor: Only render term update notices on term screens.
Prevent blank notices from appearing when adding custom fields or terms in the post editor.

Props gadhiyaravi, Boniu91, ravipatel, sabernhardt, joedolson.
Fixes #54955. See #42937.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52728 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-15 02:43:24 +00:00
Jb Audras
93ece82f04 Twenty Twenty-One: Allow editor styles to control block margins.
This change removes some overrides that prevented site editor updates in 5.9 from controlling vertical margins via `var(--global--spacing-vertical)`.

Props stacimc, Boniu91, aristath, ironprogrammer, nidhidhandhukiya.
Merges [52726] to the 5.9 branch.
Fixes #54250.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52727 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-14 22:18:52 +00:00
Jb Audras
33244d025f Revert [52722].
This change was not intended to be backported to branch 5.9.

Unprops audrasjb.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52723 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-13 21:28:08 +00:00
Jb Audras
b9a082eb40 Twenty Fifteen: Add gradient background options using the theme color scheme.
This change implements gradient background options that fit the color scheme used in Twenty Fifteen.

Props ianbelanger, itsamoreh, pls78, audrasjb.
Fixes #49760.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52722 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-13 21:03:42 +00:00
Sergey Biryukov
0afadd5e97 Update mergeinfo for the 5.9 branch.
Follow-up to [52541], [52542], [52579], [52590], [52632], [52688], [52709], [52712], [52714], [52715].

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52720 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-12 15:10:54 +00:00
Jb Audras
46aa3820a6 Query: Check if the theme supports block-templates before calling locate_block_template() in get_query_template().
This change improves performance for classic themes by removing an unnecessary query and fixes an issue where a classic theme would show "Empty template: Index" on the frontend when an empty `(block-)templates/index.html` file exists.

Props johnbillion, ianatkins, Mamaduka, costdev, manfcarlo, dolphingg, audrasjb, madeinua, kapilpaul, rafiahmedd, SergeyBiryukov.
Merges [52697] to the 5.9 branch.
Fixes #54844.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52716 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-12 07:45:56 +00:00
Jb Audras
5a7a70a3e8 Script Loader: Prevent normalizing HTML IDs in _wp_normalize_relative_css_links().
This change fixes an issue where `_wp_normalize_relative_css_links()` was not only matching urls, but also HTML IDs.

Follow-up to [52036].

Props mahype, costdev, audrasjb, SergeyBiryukov.
Merges [52695] to the 5.9 branch.
Fixes #54922.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52715 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 22:51:16 +00:00
Jb Audras
cdf06613d9 Script Loader: Prevent normalizing HTML IDs in _wp_normalize_relative_css_links().
This change fixes an issue where `_wp_normalize_relative_css_links()` was not only matching urls, but also HTML IDs.

Follow-up to [52036].

Props mahype, costdev, audrasjb, SergeyBiryukov.
Merges [52695] to the 5.9 branch.
Fixes #54922.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52714 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 22:42:14 +00:00
Sergey Biryukov
0f343369d6 Upgrade/Install: Make sure the "Show hidden updates" button is visible and works as expected.
The [https://api.jquery.com/toggle-event/ .toggle( handler, handler )] method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9. 

This commit updates the click handler function to work with jQuery 1.9+.

Follow-up to [9441], [9543], [42785], [48323].

Props malinevskiy, Boniu91, SergeyBiryukov.
Merges [52644] to the 5.9 branch.
Fixes #54886.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52713 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 22:09:35 +00:00
Jb Audras
f86f3d6712 Editor: Remove standard post type UI for templates and template parts.
In [52158] the standard post type UI was added back for templates and template parts, because these features had been temporarily removed from the site editor in the rush to get 5.9 ready for December. Since 5.9 these features were properly added back to the site editor, the `show_ui` values for these post types should be returned back to `false`.

Follow-up to [52158].

Props manfcarlo, audrasjb.
Merges [52668] to the 5.9 branch.
Fixes #54908.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52712 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 21:36:23 +00:00
Sergey Biryukov
64ccc06c85 Twenty Twenty-Two: Fix headings consistency in Pricing table pattern.
This change fixes a consistency issue where "Pigeon" was a h3, while "Sparrow" and "Falcon" were h2. Let's treat these birds equally 🐦

Props kjellr, jffng, audrasjb.
Merges [52681] to the 5.9 branch.
Fixes #54929.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52711 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 21:28:08 +00:00
Sergey Biryukov
a091ce2d38 Twenty Twenty-Two: Optimize the assets/images/ducks.jpg image.
The new file should have a much better balance of quality and file size.

Follow-up to [52081], [52107].

Props kafleg, kjellr, jffng, kapilpaul.
Merges [52651] to the 5.9 branch.
Fixes #54911.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52710 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 21:10:19 +00:00
Sergey Biryukov
513b728a6a Twenty Twenty-Two: Update mergeinfo after [52688].
See #54944, #55103.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52709 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-11 21:08:03 +00:00
Jb Audras
5b2cd50023 Twenty Twenty-Two: Remove negative side margins on group blocks with a background.
This change fixes an issue where applying a background color to a group block aligned it to the left in the editor.

Props eddystile, audrasjb, webmandesign, sabernhardt, petaryoast, kjellr.
Merges [52679] and [52686] to the 5.9 branch.
Fixes #54944, #55103.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52688 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-07 14:56:13 +00:00
Sergey Biryukov
f0180f59ea Tests: Rename the test file and class for wp_get_global_stylesheet() tests.
This matches the name of the function being tested.

Follow-up to [52675-52677].

Merges [52682] to the 5.9 branch.
See #54782.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52683 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-05 13:23:53 +00:00
Sergey Biryukov
a5c59978a2 Themes: Fix for Classic themes using default presets.
This commit makes the presets provided by the theme via `add_theme_support()` always create CSS Custom Properties, whether or not the theme has a `theme.json` file. This way, if the theme overwrites a core preset, the core CSS variables are also overwritten and use the theme value.

Props oandregal, hellofromTonya, desrosj, costdev, pbearne, johnstonphilip, webmandesign, jorgefilipecosta, SergeyBiryukov.
Merges [52675-52677] to the 5.9 branch.
Fixes #54782.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52678 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 14:46:27 +00:00
Peter Wilson
871afd0205 Twenty Twenty-Two: Replace GitHub with .org link in Theme URI.
Theme URI is the URL of a public web page where users can find more information about the theme. For bundled themes, it should be a link to the theme’s page on the Theme Repository.

Props kafleg, audrasjb.
Merges [52658] to the 5.9 branch.
Fixes #55018.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52667 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 00:18:18 +00:00
Peter Wilson
6ecf6ee9c9 Twenty Twenty-Two: Make 404 pattern search label and button translatable.
This changes makes the Twenty Twenty-Two "hidden-404" pattern fully prepared for translation.

Props kjellr, walbo, audrasjb.
Merges [52664] to the 5.9 branch.
Fixes #54928.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52666 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 00:13:55 +00:00
Peter Wilson
f8ce6e2da0 External libraries: Update jQuery UI to 1.13.1
Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.

See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Props blogaid, linux4me2, mgol, Clorith.
Merges [52648] to the 5.9 branch.
Fixes #54902.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52665 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 00:02:28 +00:00
Peter Wilson
dd1c0af37c Upgrade: Prevent warnings upgrading cron array.
An unvisited site may have an undefined cron array, resulting in `_get_cron_array()` returning the value `false`. Previously this would trigger warning in `upgrade_590()` as the function assumed `_get_cron_array()` would alway return an array.

No database version change is required as the upgrade routine was successful on sites with a cron array during 5.9.0. On sites without a cron array, the error has already been thrown if they are running db version 51917. This fix is only required for new sites or those upgrading that have skipped 5.9.0.

Follow up to [51917].

Props chrisvanpatten, kapilpaul, SergeyBiryukov, audrasjb.
Merges [52656] and [52662] to the 5.9 branch.
Fixes #54906.
See #53940.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52663 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-02 23:24:40 +00:00
Sergey Biryukov
7c346cf7b4 Post WordPress 5.9 version bump.
The 5.9 branch is now 5.9.1-alpha.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52643 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-25 21:30:10 +00:00
Sergey Biryukov
c97dfaeeb3 WordPress 5.9.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52641 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-25 19:46:36 +00:00
Sergey Biryukov
3374dd709a Upgrade/Install: Update $_old_files for 5.9.
Props davidbaumwald, hellofromTonya, SergeyBiryukov.
Merges [52637] to the 5.9 branch.
Fixes #54894.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52638 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 18:33:06 +00:00
Sergey Biryukov
ff8f975156 Post WordPress 5.9 RC4 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52636 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 17:00:35 +00:00
Sergey Biryukov
cce7fa7273 WordPress 5.9 RC4.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52635 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 16:32:34 +00:00
Jonathan Desrosiers
acc1a8ac6c Editor: Bump editor packages to include the latest fixes.
This merges the latest package updates for the block editor to include the fix for https://github.com/WordPress/gutenberg/pull/38175.

Props hellofromTonya, mamaduka, joen, talldanwp, cbravobernal, poena.
Fixes #54487.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52634 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 16:06:10 +00:00
Jb Audras
7fe1460337 Docs: Docblock corrections for get_block_file_template().
Follow-up to [52324].

Props johnbillion, SergeyBiryukov, costdev.
Merges [52631] to the 5.9 branch.
Fixes #54879.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52632 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 15:40:39 +00:00
Dominik Schilling
693e0b0418 Tests: Revert [52617].
Following [52629], the tests no longer throw an exception.

See #54318.
See #54882.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52630 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 12:54:16 +00:00
Dominik Schilling
b91bc3631e Plugins/Themes: Allow to install/activate plugins/themes which require the WordPress version currently in development.
Twenty Twenty-Two requires WordPress 5.9 but currently can't be (re)activated in the 5.9 branch because `version_compare( '5.9-RC3-52627', '5.9', '>=' )` as used by `is_wp_version_compatible()` returns `false`. To appreciate the testing of upcoming versions any `-alpha`, `-RC`, `-beta` suffixes are now stripped off from the WordPress version before checking for compatibility.

Merges [52628] to the 5.9 branch.

Fixes #54882.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52629 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 12:49:40 +00:00
Peter Wilson
08aa0b7967 Help/About: Update Freedoms page for 5.9.
Props peterwilsoncc, audrasjb, mikeschroder.
Merges [52626] to the 5.9 branch.
Fixes #54270.



git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52627 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 10:00:07 +00:00
Robert Anderson
f3c2c3955c Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Block Editor: Mark last change as persistent on save
- Site Editor: Restore ?styles=open functionality
- Site Editor: Fix resizable box scrollbars in blocks
- Add classic menus to menu switcher

See #54487.
Props talldanwp.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52625 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 07:45:35 +00:00
Robert Anderson
0b1eb91a8d Customizer: Remove Menus panel when a theme does not support menus
By overriding check_capabilities(), we can ensure that the Menus panel
is removed if a theme does not have support for 'menus' nor 'widgets'.

This ensures that the Menus panel does not appear when using a block
theme, which is confusing to users.

See #54888.
Props hellofromTonya, costdev, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52623 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 05:39:27 +00:00
Jonathan Desrosiers
ba313057e9 Bundled Themes: Bump the versions for bundled themes for release.
This bumps the versions of the default bundled themes in preparation for release with WordPress 5.9.

The new versions are:
- Twenty Ten: 3.6
- Twenty Eleven: 4.0
- Twenty Twelve: 3.6
- Twenty Thirteen: 3.5
- Twenty Fourteen: 3.3
- Twenty Fifteen: 3.1
- Twenty Sixteen: 2.6
- Twenty Seventeen: 2.9
- Twenty Nineteen: 2.2
- Twenty Twenty: 1.9
- Twenty Twenty-One: 1.5

Props audrasjb.
Merges [52618] to the 5.9 branch
Fixes #54783.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52619 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-22 15:19:56 +00:00
Jonathan Desrosiers
eca356b8d7 Tests: Temporarily add expected exceptions to a few theme tests.
These tests are failing after [52614], which raised the minimum version of WordPress required for Twenty Twenty-Two. Since the value of `$wp_version` is still less than 5.9, these are failing.

After `$wp_version` is officially bumped to `5.9`, these should be removed.

Props hellofromTonya, Clorith.
See #54318.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52617 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 20:46:12 +00:00
Jonathan Desrosiers
b5ed49d79f Bundled Themes: Reverts [52549].
[52549] updated some default presets in use by default themes to the new format. However, this change would cause elements to lose their styling when active on an older version of WordPress.

Merges [52615] to the 5.9 branch.
See #54782.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52616 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 19:53:43 +00:00
Jonathan Desrosiers
425cffc207 Twenty Twenty-Two: update the required version.
This commit updates the required WordPress version of the 2022 default theme to 5.9 in advance of its release on January 25.

Props hellofromtonya, kjellr, desrosj.
Merges [52612] and [52613] to the 5.9 branch.
Fixes #54318.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52614 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 19:42:55 +00:00
Sergey Biryukov
e0f857ab31 Post WordPress 5.9 RC3 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52601 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 22:24:27 +00:00
Sergey Biryukov
6c54fa890a WordPress 5.9 RC3.
git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52600 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 22:04:29 +00:00
Tonya Mork
1f1a0a5ae7 Editor: @wordpress package updates.
Update packages to include these bug fixes from Gutenberg:
Navigation Block: update micromodal to 0.4.10 to fix menu close button on mobile

Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
Merges [52598] to the 5.9 branch.
See #54487.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52599 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 21:36:07 +00:00
Robert Anderson
ce2a936dba Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Stop keypresses being caught by other elements when they happen in a CustomSelectControl
- Remove color, spacing, and layout options for Template Part block
- Try: parse shortcode blocks outside the content
- Fix aria-modal attribution with multiple navs on page
- Gallery block: Remove warning notice about mobile version required
- Fix Home template description typo 
- Fix enqueueing additional styles for blocks only when rendered
- fix typo (hanle -> handle)
- SelectControl: mark the children prop as optional
- Remove warning for enqueued styles in Editor
- Add context to font style and font weight related translation strings
- Temporarily remove text decoration from Nav block
- Fix empty secondary sidebar overlapping widget editor content on mobile viewports
- Fix hiding the bottom of tablet/mobile preview in Site Editor

See #54487.
Props isabel_brison.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52596 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 03:40:37 +00:00
Tonya Mork
e23f6d9102 Editor: Explicitly load remote block patterns in the block and site editor screens.
Remote block patterns from wp.org were to be loaded through a callback hooked into the `current_screen` filter. Within 2 callbacks, i.e. `_load_remote_featured_patterns()` and `_load_remote_block_patterns()`, a guard clause bailed out early if the `$current_screen->is_block_editor` is `false`.

However, the `current_screen` filter is unreliable to detect the block editor. Why? In the block and Site Editor screens, `$current_scren->is_block_editor` is not set until after the filter is executed. Whoopsie.

This commit no longer uses the `current_screen` filter. Instead, it explicitly loads the remote block patterns by invoking both private functions (now not callbacks) directly in the screen files for the block and site editor screens.

With this change, passing `WP_Screen` object into these functions is no longer needed. As the `_load_remote_block_patterns()` function was introduced in 5.8.0, its function parameter is now deprecated and the guard clause retained for backwards compatibility.

Follow-up to [51021], [52377].

Props poena, noisysocks, peterwilsoncc, hellofromTonya, audrasjb.
Merges [52593] to the 5.9 branch.
Fixes #54806.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52594 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 22:48:05 +00:00
Tonya Mork
3a1df5b9ed Administration: Revert [51946].
Reverting changeset due to reported issue of menu being hidden after clicking on certain mobile devices.

Props dhusakovic, audrasjb, SergeyBiryukov, costdev, joedolson.
Reverts [51946] on the 5.9 branch.
See #54837, #53587.

git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52592 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 20:38:51 +00:00
Jb Audras
2fd10c8b38 Twenty Twenty-Two: Sync updates from GitHub from RC3.
This commit syncs minor changes for the default theme from its active development repository to core.

This is a follow up to [52081], [52107], [52164], [52222], [52283], [52335], [52375], [52392], [52430], and [52555]. It includes fixes to the group, cover, and template part block padding and removes unnecessary group block wrappers from many patterns.

To view the full set of changes, visit 69d5c512c6...91f8748566.

Props kjellr, richtabor, audrasjb, jffng.
Merges [52589] to the 5.9 branch.
Fixes #54318.


git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52590 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 16:01:00 +00:00