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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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