Commit Graph

649 Commits

Author SHA1 Message Date
Jb Audras
82c0591117 Editor: Change location of block support styles in wp_head.
Backports changes from https://github.com/WordPress/gutenberg/pull/39164.

Props ndiego, alexstine, cbravobernal, mamaduka.
See #55474.


git-svn-id: https://develop.svn.wordpress.org/trunk@53015 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-29 13:26:38 +00:00
David Baumwald
68cfd584ab External Libraries: Update Jcrop to version 0.9.15.
For a full list of changes, see https://github.com/tapmodo/Jcrop/compare/v0.9.12...v0.9.15.

This change also adds a comment in `script-loader.php` indicating that this library is no longer used by core.

Follow-up to [10846], [10863], [11015], [21633], [25549].

Props hareesh-pillai, karpstrucking, SergeyBiryukov.
Fixes #54035.

git-svn-id: https://develop.svn.wordpress.org/trunk@52989 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-24 20:05:40 +00:00
Jb Audras
6c270d0d17 Administration: Replace contracted verb forms for better consistency.
This changeset replaces contracted verb forms like `doesn't`, `can't`, or `isn't` with non-contracted forms like `does not`, `cannot`, or `is not`, for better consistency across the WordPress administration. It also updates some corresponding unit tests strings.

Props Presskopp, socalchristina, aandrewdixon, francina, SergeyBiryukov, JeffPaul, audrasjb, hellofromTonya.
Fixes #38913.
See #39176.


git-svn-id: https://develop.svn.wordpress.org/trunk@52978 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-22 16:23:32 +00:00
Jb Audras
6adff3d989 jquery-query
git-svn-id: https://develop.svn.wordpress.org/trunk@52844 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 18:52:20 +00:00
David Baumwald
d238f31fab Media: Add a "Copy URL to clipboard" function to the list table view.
Previously, a button was added to the modal view for a single media item in the "grid" view to copy the file URL to the user's clipboard.  This change adds a similar function to the "list" view for each media item.

Follow-up to [48232].

Props pbiron, ravipatel, alexstine, afercia.
Fixes #54426.

git-svn-id: https://develop.svn.wordpress.org/trunk@52842 602fd350-edb4-49c9-b593-d223f7449a82
2022-03-10 18:22:57 +00:00
Tonya Mork
a3cbbc419d Editor: Automatically apply global styles duotone filters to render in post editor.
Global styles duotone filters were not rendering in the post editor. This fixes that by adding `wp_global_styles_render_svg_filters` to the `in_admin_header` so it renders in the body before the editor.

Follow-up [52757].

Props ajlende, abhanonstopnewsuk.
Fixes #55190.

git-svn-id: https://develop.svn.wordpress.org/trunk@52768 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 20:43:39 +00:00
Dominik Schilling
fcd5d3b495 Script Loader: Prevent normalizing data URIs in _wp_normalize_relative_css_links().
This prevents making data URIs as in `mask-image:url('data:image/svg+xml;utf8,<svg...` relative to the WordPress installation.

Props staatic.
See #54243.
Fixes #55177.

git-svn-id: https://develop.svn.wordpress.org/trunk@52754 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-17 14:45:53 +00:00
Jorge Costa
8ec1cb83e3 Script Loader: Improvements to the load block support styles mechanism.
This commit applies feedback given to commit 52741. It changes the new function name, the file where it is located, and improves its documentation and marks.

Follow-up to [52741].
Props hellofromtonya, swissspidy, oandregal.
See #55148.

git-svn-id: https://develop.svn.wordpress.org/trunk@52743 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-16 22:18:33 +00:00
Jb Audras
6dc1e0ed3b 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.
Fixes #55148.


git-svn-id: https://develop.svn.wordpress.org/trunk@52738 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-16 10:34:20 +00:00
Jb Audras
b8f97013df 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.
Fixes #54922.


git-svn-id: https://develop.svn.wordpress.org/trunk@52695 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-08 23:39:32 +00:00
Marius L. J
831dae4296 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.
Fixes #54904.

git-svn-id: https://develop.svn.wordpress.org/trunk@52673 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 10:50:39 +00:00
Marius L. J
f2e08d36af External libraries: Update jQuery Color to 2.2.0
The NPM package for jQuery Color was updated in [50543], but a bundled version still existed within core.
This removes that bundled version, in favor of expanding the Grunt build steps to include the package from NPM instead.

Fixes #55016. See #51405.

git-svn-id: https://develop.svn.wordpress.org/trunk@52657 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 01:20:19 +00:00
Marius L. J
d6e710330f 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.
Fixes #54902.

git-svn-id: https://develop.svn.wordpress.org/trunk@52648 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-28 16:42:47 +00:00
Peter Wilson
fc6ae7b5f6 Script loader: Prevent DB errors during Multisite install.
Prevent the script loader from attempting to create nonces during the installation process for Multisite configurations.

Prior to this fix, multiple "Table does not exist" errors were thrown during installation if `MULTISITE` was defined in the `wp-config.php` file but the salt constants were not defined. Without the salts defined in PHP, WP was attempting to use the database fallbacks prior to table creation.

Props schlessera, johnbillion, hellofromTonya, audrasjb, costdev.
Fixes #54800.



git-svn-id: https://develop.svn.wordpress.org/trunk@52602 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 23:45:40 +00:00
Jorge Costa
16e0165cf0 Fix: WordPress default presets aren't loaded for all themes.
The default preset styles of WordPress (font sizes, colors, gradients) are now provided via the global stylesheet to avoid duplication of styles. This stylesheet can be found in the front-end with the name global-styles-inline-css.
The default presets are important to support old content that may use them and also patterns, that can use cross-theme styles.

Props oandregal.
Fixes #54781.

git-svn-id: https://develop.svn.wordpress.org/trunk@52547 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-10 17:27:46 +00:00
Tonya Mork
b3b302df31 Script Loader: Skip getting 'can_compress_scripts' option in script_concat_settings() during install.
When installing a multisite, there is a potential access to a non-existent database table that needs to be skipped to avoid warnings/errors. This fix checks is WordPress is not installing before getting the `'can_compress_scripts'` option.

Props schlessera.
Fixes #54634.

git-svn-id: https://develop.svn.wordpress.org/trunk@52395 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-20 23:51:35 +00:00
Robert Anderson
667fb94b79 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Image block: Set image display to grid when no alignment sent to properly align caption on resize
- Update and align template descriptions
- Site Editor - prevent loading state from showing the admin menu.
- Add client side routing for Site Editor
- Navigation: Add clearance for appender in submenus.
- Fix CSS Custom Properties for presets in the site editor
- Add/navigation blocks post processing after migration from menu items
- Allow selector ordering to ensure theme.json root selector margin takes precedence 
- Do not remove theme presets if defaults are hidden
- Format library: fix unsetting highlight color
- FSE: Fix template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity
- ColorPalette: Improving accessibility and visibility
- Update: Make the color popover on the gradient picker appear as expected
- Site Editor: Display a notice if export fails
- Fix docs and function naming for gallery block registration in PHP
- Switch to addEventListener for load event in the navigation block view script
- Fix mistake in _remove_theme_attribute_in_block_template_content
- Better synchronisation between Gutenberg and Core code
- Move the block page templates hook into compat/5.9 folder
- Moves to the template loader hooks and functions into lib/compat folder
- Refactor the gutenberg_is_fse_theme function to use wp_is_block_theme
- Site Editor: Update support doc URL in Welcome Guide
- Global Styles: Add Welcome Guide toggle
- Hide remove control point when removing would break gradient control
- Don't request the deprecated navigation areas endpoint outside of the Gutenberg plugin
- Image: Fix resizer controls being hidden in Safari when switching between alignments
- Remove Navigation Menus from WP Admin sidebar
- Site Editor: Hide the block appender in the Template Part editor
- Site Editor: Use server definition for the Template Areas
- Synchronize wp_is_block_theme and block-templates block support with Core
- E2E: Retry login again after a bad nonce request to prevent intermittent test failures 
- Fix theme requirement validation with WP 5.8
- Fix WP 5.9 check for conditionally running code
- Fix post comment form input width
- Border Style Control: Update styling for consistency with border width control
- Fix form-submit styles by adding button classes to the submit-button in post-comments block
- Site Editor: Fix edit template part link in header dropdown
- Move duotone palette to the bottom of global styles gradients
- Fix how appearanceTools works
- Move WP 5.9 wp-admin menus compatibility code to lib/compat folder
- Revert "Site Editor: Set the <title> on the list page to be same as the CPT name"
- Site Editor: Document Actions: add SR text to heading 1
- Do not register global styles CPT in WordPress 5.9
- Global Styles: Move the 'Edit colors' button to a standard menu item
- Fix styles for previews and patterns
- Site Editor: Fix failing E2E test
- Templates: Search for old template names in the parent theme too
- Remove 4 instances of 'gutenberg' text domain from WordPress core
- Fix content loss when ungrouping template parts or reusable blocks
- Simplify the RESET_BLOCK action to fix template part focus mode content loss
- [Global Styles]: Make Blocks section more distinguishable
- Only use block markup for comment form button when using a block theme
- Navigation: Fix vertical alignment of page list in modal.
- Fix: ToggleGroupControl active state
- Remove gutenberg_ prefix from @wordpress/block-library

Props ocean90, oandregal, hellofromtonya, youknowriad.
See #54487.


git-svn-id: https://develop.svn.wordpress.org/trunk@52364 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-14 01:55:28 +00:00
Tonya Mork
c882620e8b External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.

git-svn-id: https://develop.svn.wordpress.org/trunk@52285 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-30 17:16:13 +00:00
Jb Audras
9f56ce822e Script Loader: Enqueue block stylesheet only when the corresponding block is used.
Before this change, block stylesheets were enqueued although the corresponding blocks were not used in the current post, even if the `should_load_separate_core_block_assets` filter was set to `true`.

Props shimotomoki, devutpol, audrasjb.
Fixes #54457.


git-svn-id: https://develop.svn.wordpress.org/trunk@52262 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-28 21:10:08 +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
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
Weston Ruter
02a2f9c9f5 Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows.
* Prevent loading `wp-embed` script unconditionally on every page in favor of conditionally enqueueing when a post embed is detected. The `wp-embed` script is also explicitly marked as being in the footer group. Sites which currently disable post embed scripts from being enqueued via `remove_action( 'wp_head', 'wp_oembed_add_host_js' )` will continue to do so.
* Send a `ready` message from the host page to each post embed window in case the `iframe` loads before the `wp-embed` script does. When the `ready` message is received by the post embed window, it sends the same `height` message as it sends when it loads.
* Eliminate use of `grunt-include` to inject emoji script and the post embed script. Instead obtain the script contents via `file_get_contents()` (as is done elsewhere in core) and utilize `wp_print_inline_script_tag()`/`wp_get_inline_script_tag()` to construct out the script. This simplifies the logic and allows the running of src without `SCRIPT_DEBUG` enabled.
* For the embed code that users are provided to copy for embedding outside of WP, add the `secret` on the `blockquote` and `iframe`. This ensures the `blockquote` will be hidden when the `iframe` loads. The embed code in question is accessed here via `get_post_embed_html()`.

Props westonruter, swissspidy, pento, flixos90, ocean90.
Fixes #44632, #44306.


git-svn-id: https://develop.svn.wordpress.org/trunk@52132 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 02:47:10 +00:00
John Blackbourn
f60e4ba84f Docs: Add missing documentation for the $javascript parameter of the wp_inline_script_attributes filter.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52127 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 18:39:40 +00:00
Robert Anderson
f034bc832e Add Site Editor and PHP changes from Gutenberg 10.1 - 11.9
- First pass at adding the site editor from the Gutenberg plugin to
  wp-admin/site-editor.php.
- Adds miscellaneous PHP changes from Gutenberg 10.1 - 11.9.

Follows [52042].
See #54337.
Props youknowriad, aristath, hellofromtonya, gziolo.


git-svn-id: https://develop.svn.wordpress.org/trunk@52069 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-09 02:15:23 +00:00
Jorge Costa
8e30713cd5 Add: Public functions for interacting with global styles & settings.
This commit ports the public functions to interact with the global styles & settings.

See #54336.
Props oandregal.

git-svn-id: https://develop.svn.wordpress.org/trunk@52054 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 21:44:12 +00:00
Jorge Costa
60725c46ca Update theme.json classes for WordPress 5.9.
This commit ports to core the changes to the classes that deal with theme.json code.

See #54336.
Props oandregal, spacedmonkey, noisysocks, hellofromtonya, youknowriad.

git-svn-id: https://develop.svn.wordpress.org/trunk@52049 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 19:18:39 +00:00
Greg Ziółkowski
105584a5f7 Fix relative URLs in inlined block styles that involve external assets
When styles got inlined, relative URLs break. The problem was that URLs inside CSS files are relative to the stylesheet's path, and when styles get inlined that relation is lost. This patch fixes the issue by finding relative URLs which then get modified to be relative to the site's root.

Fixes #54243.
Props aristath, cdyerkes, hellofromtonya.



git-svn-id: https://develop.svn.wordpress.org/trunk@52036 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-08 13:23:44 +00:00
Anthony Burchell
8ac6425f19 Media: Remove security messaging in media upload failures.
Previously, when uploading a media item type that is not supported, the default error message claims that the reason it cannot upload is due to security reasons. This is not always true. Now the warning says that the type is not allowed, which is always true.

Props antpb, Presskopp, peterwilsoncc, desrosj, iluy, circlecube, mikeschroder.
Fixes #53626.



git-svn-id: https://develop.svn.wordpress.org/trunk@52032 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-07 23:28:48 +00:00
Sergey Biryukov
bf63e7ab46 External Libraries: Update the Iris color picker to version 1.1.1.
The latest version includes jQuery 3.x deprecation fixes:
* `$.isArray` → `Array.isArray`
* Event attachment/trigger shorthands → `.on()` and `.trigger()`

For a full list of changes in this update, see the PR on GitHub:
https://github.com/Automattic/Iris/pull/72

Follow-up to [22030], [22033], [22385], [22457], [22697], [22732], [23443], [26334], [30551], [30650], [38931], [50547].

Props Clorith, mattwiebe, Cybr.
Fixes #54224.

git-svn-id: https://develop.svn.wordpress.org/trunk@52006 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-03 19:38:33 +00:00
Sergey Biryukov
39479eb86a Coding Standards: Correct alignment in wp_enqueue_global_styles().
This fixes an `Equals sign not aligned with surrounding assignments; expected 5 spaces but found 1 space` WPCS warning.

Follow-up to [50973], [51819].

See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51944 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-28 14:09:07 +00:00
Sergey Biryukov
c043d40900 Docs: Document the usage of some globals in wp-includes/script-loader.php.
Follow-up to [44114], [44262], [49080], [50761], [51471].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@51942 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-27 18:20:58 +00:00
Sergey Biryukov
489260a45a Script Loader: Correct the number of arguments passed to the closure in enqueue_block_styles_assets().
This avoids an `Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed` PHP fatal error when registering a block style with the `should_load_separate_core_block_assets` filter enabled.

Follow-up to [51471].

Props aristath, shimon246, jrf, gziolo.
Fixes #54323.

git-svn-id: https://develop.svn.wordpress.org/trunk@51941 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-27 17:08:15 +00:00
Andrew Ozz
92ff897931 External Libraries: Update jQuery UI to 1.13.0 final.
Props Clorith, mgol, azaozz.
Fixes #52163.

git-svn-id: https://develop.svn.wordpress.org/trunk@51897 602fd350-edb4-49c9-b593-d223f7449a82
2021-10-08 18:04:08 +00:00
Jorge Costa
57ad9f16df Block editor: Cache global stylesheet by theme key.
Global styles are used in a few different contexts (front, editor, customizer, the theme directory). In the last two contexts, it's important that switching themes immediately refreshes the global stylesheet, to avoid situations in which the styles of the previous theme load with the new one. This was brought up at WordPress/gutenberg#34531 (customizer) and at meta.trac.wordpress.org/ticket/5818 (theme directory).
This commit makes sure the stylesheet is regenerated upon switching themes.

Props oandregal, dd32.
See #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@51819 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-16 18:03:04 +00:00
Andrew Ozz
088f3043a4 External Libraries: Update jQuery UI to 1.13.0-rc2.
The final release is expected at the beginning of October. Updating to rc2 now gives everybody plenty of time to test and report any issues either with UI 1.13.0 or with the WordPress implementation.

Props Clorith, mgol, azaozz.
See #52163.

git-svn-id: https://develop.svn.wordpress.org/trunk@51794 602fd350-edb4-49c9-b593-d223f7449a82
2021-09-10 00:01:24 +00:00
Sergey Biryukov
17a285a136 External Libraries: Update whatwg-fetch package to version 3.6.2.
This matches the version used in the Gutenberg project.

While WordPress core no longer depends on this polyfill as of [50934], this brings the latest updates of the library to anyone still utilizing it.

For a full list of changes in this update, see the `whatwg-fetch` GitHub:
https://github.com/github/fetch/compare/v3.0.0...v3.6.2

Follow-up to [43719], [50934].

Props hareesh-pillai, rsiddharth, desrosj.
Fixes #53929.

git-svn-id: https://develop.svn.wordpress.org/trunk@51692 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-30 13:49:28 +00:00
Tonya Mork
e83a341cc0 Coding Standards: Use static closures when not using $this.
When a closure does not use `$this`, it can be made `static` for improved performance.

Static closures are supported in PHP since PHP 5.4. ​

Props jrf, hellofromTonya, swissspidy, SergeyBiryukov.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51657 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-26 12:57:08 +00:00
Sergey Biryukov
b2be104b9d Coding Standards: Fix incorrect alignment in two comment blocks.
Tabs should only be used for indentation and not for mid-line alignment.

Props jrf.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@51551 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-05 13:10:05 +00:00
Peter Wilson
601ae4a6b2 Editor: Prevent block-editor JavaScript loading in other editors.
Add a check to `wp_add_iframed_editor_assets_html()` confirming the edit post screen is using the block-editor before including block-editor specific JavaScript. For the classic and other editors the function returns early without any output.

Props swissspidy, desrosj.
Fixes #53696.



git-svn-id: https://develop.svn.wordpress.org/trunk@51540 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-04 05:09:08 +00:00
Sergey Biryukov
a5de731f9e Code Modernization: Pass correct default value to new DateTime() in wp_default_packages_inline_scripts().
This fixes a "Deprecated: `DateTime::__construct()`: Passing null to parameter #1 (`$datetime`) of type string is deprecated" warning on PHP 8.1.

Follow-up to [49083].

See #53635.

git-svn-id: https://develop.svn.wordpress.org/trunk@51533 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-03 12:03:41 +00:00
Sergey Biryukov
3a189c93e1 Upgrade/Install: Avoid creating nonce during installation.
This avoids a "Table `wp_options` doesn't exist" database error when trying to create a nonce for password reset button.

When installing and using database-saved salts, `wp_create_nonce()` causes database errors as `wp_salt()` attempts to insert into the not-yet-created options table. Since authentication is not available during installation, we can safely skip creating a nonce.

Follow-up to [39684], [50129].

Props schlessera, swissspidy, sanketchodavadiya, hellofromTonya, SergeyBiryukov.
Fixes #53830.

git-svn-id: https://develop.svn.wordpress.org/trunk@51525 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-02 16:37:57 +00:00
Greg Ziółkowski
211d94b710 Editor: Conditionally load registered styles for block variations
In WordPress 5.8 we added the ability to only load styles for blocks when these blocks are rendered. However, these optimizations left out block-styles that get added using the register_block_style() function/API.

Props aristath.
Fixes #53616.



git-svn-id: https://develop.svn.wordpress.org/trunk@51471 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-22 08:36:11 +00:00
Jonathan Desrosiers
09bbc174c0 External Libraries: Correct the underscore version used when registering.
The correct version is `1.13.1`.

Follow up to [50650], [50778].

Props david.binda.
Fixes #53713.

git-svn-id: https://develop.svn.wordpress.org/trunk@51469 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-21 12:32:57 +00:00
Jonathan Desrosiers
ca214a3b4c External Libraries: Correct the jquery-form version used when registering.
The correct version is `4.3.0`.

Follow up to [50546].

Props david.binda.
Fixes #53714.

git-svn-id: https://develop.svn.wordpress.org/trunk@51468 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-21 12:19:26 +00:00
Jonathan Desrosiers
0e08acda70 External Libraries: Correct the hoverIntent version used when registering.
Follow up to [50521].

Props david.binda.
Fixes #53715.

git-svn-id: https://develop.svn.wordpress.org/trunk@51467 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-21 12:16:35 +00:00
Sergey Biryukov
c7be2d875e Docs: Some documentation improvements for wp_check_widget_editor_deps():
* Add missing short description for the function.
* Correct function names in `_doing_it_wrong()` calls.
* Document the usage of `$wp_scripts` and `$wp_styles` globals.
* Update syntax for multi-line comment per the documentation standards.

Follow-up to [51387], [51388].

See #53437, #53569.

git-svn-id: https://develop.svn.wordpress.org/trunk@51390 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 10:49:15 +00:00
Robert Anderson
5d9c398669 Editor: Merge conflicting wp.editor objects into single, non-conflicting object
The `wp-editor` script (`@wordpress/editor` npm package) is exposed as
`window.wp.editor` in WP Admin.  This causes problems, though, as many older
scripts expect to see the older `editor` script available at `window.wp.editor`.

The solution is to export all the members of the older `window.wp.editor` module
in the newer module to maintain backwards compatibility.

See #53437.
Props zieladam, spacedmonkey, TimothyBlynJacobs, andraganescu.


git-svn-id: https://develop.svn.wordpress.org/trunk@51387 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-09 01:09:08 +00:00
Dominik Schilling
a0c4143f06 Script Loader: Update jQuery version to 3.6.0 following the update in [50520].
Props audrasjb.
See #52707.

git-svn-id: https://develop.svn.wordpress.org/trunk@51380 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-08 07:18:05 +00:00
Jonathan Desrosiers
8477f505be Editor: Ensure global styles are loaded in the footer when loading core assets individually.
This fixes the logic in `wp_enqueue_global_styles()` to ensure that global styles are loaded in the footer when a site opts-in to loading Core block assets individually.

This fixes a bug where styles defined in `themes.json` are not respected.

Props walbo, nosolosw, mcsf, aristath, desrosj.
Fixes #53494.

git-svn-id: https://develop.svn.wordpress.org/trunk@51309 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-02 18:46:58 +00:00
Aaron Jorbin
3c1ab395dd Docs: Further Improve documentation for wp_should_load_separate_core_block_assets().
In [51256], the documentation was improved, this further improves it. As scripts are not yet a part of what this function does, they are not mentioned explicitly. Assets is used so that the docs don't need a lot of improvements when scripts do come into play..

Props desrosj, SergeyBiryukov, Jorbin.
See #53505.



git-svn-id: https://develop.svn.wordpress.org/trunk@51263 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-29 18:44:45 +00:00