Commit Graph

2328 Commits

Author SHA1 Message Date
desrosj
866abfda9f External Libraries: Update the Moment library to version 2.29.4.
This is a minor bug fix release.

Props dilipbheda.
Fixes #56031.
Built from https://develop.svn.wordpress.org/trunk@53725


git-svn-id: http://core.svn.wordpress.org/trunk@53284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-19 19:43:25 +00:00
desrosj
3ff86728e5 External Libraries: Update the Moment library to version 2.29.3.
This is a minor bug fix release.

Props dilipbheda.
Fixes #56031.
Built from https://develop.svn.wordpress.org/trunk@53662


git-svn-id: http://core.svn.wordpress.org/trunk@53221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:21:26 +00:00
desrosj
2ab810d14c External Libraries: Update the Underscore library to version 1.13.4.
This is a minor documentation and bug fix release.

Props christinavoudouris, dilipbheda.
Fixes #56030.
Built from https://develop.svn.wordpress.org/trunk@53660


git-svn-id: http://core.svn.wordpress.org/trunk@53219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-07-05 15:01:25 +00:00
Sergey Biryukov
01d172b581 General: Replace all esc_url_raw() calls in core with sanitize_url().
This aims to improve performance by calling `sanitize_url()` directly, instead of the `esc_url_raw()` wrapper. As of WordPress 6.1, `sanitize_url()` is the recommended function for sanitizing a URL for database or redirect usage.

Follow-up to [11383], [13096], [51597], [53452].

Props benjgrolleau, peterwilsoncc, SergeyBiryukov.
Fixes #55852.
Built from https://develop.svn.wordpress.org/trunk@53455


git-svn-id: http://core.svn.wordpress.org/trunk@53044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-01 18:14:10 +00:00
Sergey Biryukov
9c76c77398 Docs: Remove @return void from various DocBlocks.
Per the documentation standards, it should not be used outside of the default bundled themes.

Follow-up to [38767], [47055], [49697], [50956], [51003], [52069], [53255].

See #54729.
Built from https://develop.svn.wordpress.org/trunk@53331


git-svn-id: http://core.svn.wordpress.org/trunk@52920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:13:08 +00:00
Peter Wilson
eebb76a64f Install: Prevent DB errors caused by web fonts API.
Bypass checking `theme.json` for web fonts during the installation of WordPress.

During installation the active theme is considered to be Twenty Twenty-Two (the default theme). As a block theme this prompts a database call when the web fonts API checks the `theme.json` settings, this triggers a database error during installation as the database tables do not exist.

Props chouby, costdev, peterwilsoncc, sergeybiryukov.
Fixes #55632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 03:50:14 +00:00
desrosj
e942432883 External Libraries: Update the underscore library to version 1.13.3.
This is a minor bug fix release.

Fixes #55547.
Built from https://develop.svn.wordpress.org/trunk@53296


git-svn-id: http://core.svn.wordpress.org/trunk@52885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-27 14:39:21 +00:00
hellofromTonya
8b50004388 Themes: Remove 'gutenberg' as translation context in _wp_theme_json_webfonts_handler().
Follow-up to [53282].

Props kebbet.

See #55567, #46370.
Built from https://develop.svn.wordpress.org/trunk@53288


git-svn-id: http://core.svn.wordpress.org/trunk@52877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 15:37:09 +00:00
hellofromTonya
053b9bbd71 Themes: Add internal-only theme.json's webfonts handler (stopgap).
Adds `_wp_theme_json_webfonts_handler()` for handling `fontFace` declarations in a theme's `theme.json` file to generate the `@font-face` styles for both the editor and front-end.

Design notes:
* It is not a public API, but rather an internal, Core-only handler.
* It is a stopgap implementation that will be replaced when the public Webfonts API is introduced in Core.
* The code design is intentional, albeit funky, with the purpose of avoiding backwards-compatibility issues when the public Webfonts API is introduced in Core.
   * It hides the inter-workings.
   * Does not exposing API ins and outs for external consumption.
   * Only works for `theme.json`.
   * Does not provide registration or enqueuing access for plugins.

For more context on the decision to include this stopgap and the Webfonts API, see:
* Core's PR 40493 https://github.com/WordPress/gutenberg/pull/40493
* Gutenberg's tracking issue 40472 https://github.com/WordPress/gutenberg/issues/40472

Props aristath, hellofromTonya, peterwilsoncc, costdev, jffng, zieladam, gziolo, bph, jonoaldersonwp, desrosj.

See #55567, #46370.
Built from https://develop.svn.wordpress.org/trunk@53282


git-svn-id: http://core.svn.wordpress.org/trunk@52871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-26 14:48:09 +00:00
audrasjb
6ef5625ac2 Docs: Docs: Use third-person singular verbs for function descriptions in wp-includes/blocks.php and wp-includes/script-loader.php, per the documentation standards.
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 14:09:11 +00:00
audrasjb
4d3dbe477a Editor: Move wp_enqueue_block_style() to wp-includes/script-loader.php, for better consistency.
As a result of [52741] and [52743], `wp_enqueue_block_support_styles()` was moved to `wp-includes/script-loader.php`. However, `wp_enqueue_block_style()` was still defined in `wp-includes/blocks.php`. This changeset also moves `wp_enqueue_block_support_styles()` to `wp-includes/script-loader.php` for better consistency.

Follow-up to [52741], [52743].

Props SergeyBiryukov, mukesh27, audrasjb.
Fixes #55182.
See #55148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-20 13:53:16 +00:00
desrosj
f448f54be5 Script Loader: Specify the version of the clipboard library included when registering.
For external libraries, the current version included with WordPress should be specified when registering scripts.

Props elifvish.
Fixes #55565.
Built from https://develop.svn.wordpress.org/trunk@53173


git-svn-id: http://core.svn.wordpress.org/trunk@52762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-13 15:58:08 +00:00
desrosj
43ca7ac938 External Libraries: Update polyfill libraries.
This updates two polyfill libraries to their latest versions.

- `polyfill-library` from `3.105.0` to `4.0.0`.
- `formdata-polyfill` from `4.0.0` to `4.0.10`.

This will affect the following script handles:
- `wp-polyfill-formdata`
- `wp-polyfill-node-contains`
- `wp-polyfill-dom-rect`

These polyfills are no longer used by WordPress Core, but are kept up to date as a courtesy for any plugins or themes still requiring them.

See #55547.
Built from https://develop.svn.wordpress.org/trunk@53165


git-svn-id: http://core.svn.wordpress.org/trunk@52754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 17:35:27 +00:00
desrosj
35005412d0 External Libraries: Update some external libraries.
This updates three external libraries to their latest versions:

- `backbone` from `1.4.0` to `1.4.1`.
- `underscore` from `1.13.1` to `1.13.2`.
- `clipboard` from `2.0.8` to `2.0.10`.

These are all minor updates containing bug fixes and documentation improvements.

See #55547.
Built from https://develop.svn.wordpress.org/trunk@53164


git-svn-id: http://core.svn.wordpress.org/trunk@52753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 17:17:22 +00:00
desrosj
e15e2d78bf External Libraries: Update moment to version 2.29.2.
See #55547.
Built from https://develop.svn.wordpress.org/trunk@53163


git-svn-id: http://core.svn.wordpress.org/trunk@52752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 16:52:23 +00:00
gziolo
1882e40a8a Editor: Use block settings to pass assets for the iframed editor
Backports changes applied in Gutenberg in https://github.com/WordPress/gutenberg/pull/37193.

Props zieladam.
See #55505.
Follow-up for [53157].


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


git-svn-id: http://core.svn.wordpress.org/trunk@52749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-12 16:02:19 +00:00
gziolo
29254bd90a Build: Enable React Fast Refresh for block development
Brings the same functionality introduced in the Gutenberg plugin with https://github.com/WordPress/gutenberg/pull/28273. In effect, it brings React Fast Refresh support to WordPress core for block development with `@wordpress/scripts`.

Props walbo, antonvlasenko.
See #51750, #55505.
Follow-up [53135].


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


git-svn-id: http://core.svn.wordpress.org/trunk@52729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 16:10:22 +00:00
Peter Wilson
cf4f9c9e61 Plugins: Update item count when plugin deleted.
Update the item count, "N items", on the plugin list when a plugin is deleted. This matches the live updating of various other counts on the screen.

Props mitogh, costdev, azouamauriac, swissspidy, kebbet.
Fixes #55316.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-11 04:51:11 +00:00
Peter Wilson
35913a6309 Script loader: Add wp-a11y as dependency of wp-ajax-response.
Ensure `wp.a11y.speak()` is available when called in `wp-ajax-response`.

Follow up to [52170].

Props afercia.
Fixes #55544.
See #42937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-08 06:00:08 +00:00
Sergey Biryukov
9fb5112732 Docs: Add missing description for $pagenow global in various functions.
See #54729, #55499.
Built from https://develop.svn.wordpress.org/trunk@53060


git-svn-id: http://core.svn.wordpress.org/trunk@52649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-04 18:26:06 +00:00
audrasjb
2f0cb02d07 Customizer: Accessibility fixes following [53024].
This changeset fixes a few issues spotted after [53024].

- Remove target blank on HelpHub link
- Remove duplicate information in `aria-label`
- Small i18n fixes

Follow-up to [53024].

Props joedolson, audrasjb, pbiron.
Fixes #54939.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 19:57:16 +00:00
audrasjb
fff6998023 Customizer: When a block theme is active, add an information about Site Editor in the Customizer.
This change adds an information notice to the customizer when a block theme is active and the customizer is also available (for example when a plugin activates it), to encourage people to use the Site Editor for the best full site customization experience.

Props ironprogrammer, antonvlasenko, Clorith, audrasjb, psmits1567, tobifjellner, costdev, webcommsat.
Fixes #54939.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 19:10:14 +00:00
audrasjb
25fafd4c44 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 13:28:08 +00:00
davidbaumwald
31dede34c1 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.
Built from https://develop.svn.wordpress.org/trunk@52989


git-svn-id: http://core.svn.wordpress.org/trunk@52578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-24 20:07:05 +00:00
audrasjb
223cda987f 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-22 16:25:03 +00:00
audrasjb
95d72f2207 jquery-query
Built from https://develop.svn.wordpress.org/trunk@52844


git-svn-id: http://core.svn.wordpress.org/trunk@52433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 18:54:02 +00:00
davidbaumwald
658f4e9367 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.
Built from https://develop.svn.wordpress.org/trunk@52842


git-svn-id: http://core.svn.wordpress.org/trunk@52431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-10 18:24:03 +00:00
hellofromTonya
76207c890b 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.
Built from https://develop.svn.wordpress.org/trunk@52768


git-svn-id: http://core.svn.wordpress.org/trunk@52357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-17 20:45:00 +00:00
Dominik Schilling
f42e80b077 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.
Built from https://develop.svn.wordpress.org/trunk@52754


git-svn-id: http://core.svn.wordpress.org/trunk@52343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-17 14:47:04 +00:00
jorgefilipecosta
cb3e78b0c3 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.
Built from https://develop.svn.wordpress.org/trunk@52743


git-svn-id: http://core.svn.wordpress.org/trunk@52332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-16 22:20:01 +00:00
audrasjb
8f5f8b19c5 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-16 10:36:02 +00:00
audrasjb
f76b77b7c3 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-08 23:41:00 +00:00
Clorith
2d20fd7cc1 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.
Built from https://develop.svn.wordpress.org/trunk@52673


git-svn-id: http://core.svn.wordpress.org/trunk@52262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 10:52:08 +00:00
Clorith
d09e18c5cf 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.
Built from https://develop.svn.wordpress.org/trunk@52657


git-svn-id: http://core.svn.wordpress.org/trunk@52246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 01:22:04 +00:00
Clorith
7ea33988e9 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.
Built from https://develop.svn.wordpress.org/trunk@52648


git-svn-id: http://core.svn.wordpress.org/trunk@52237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-28 16:44:05 +00:00
Peter Wilson
f7151a6f3a 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-18 23:47:01 +00:00
jorgefilipecosta
6d30d2a5d6 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.
Built from https://develop.svn.wordpress.org/trunk@52547


git-svn-id: http://core.svn.wordpress.org/trunk@52137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 17:29:03 +00:00
hellofromTonya
a3dedd1d4d 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.
Built from https://develop.svn.wordpress.org/trunk@52395


git-svn-id: http://core.svn.wordpress.org/trunk@51987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 23:53:01 +00:00
noisysocks
935058d178 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 01:57:26 +00:00
hellofromTonya
5c414db9ad 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.
Built from https://develop.svn.wordpress.org/trunk@52285


git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:18:01 +00:00
audrasjb
dc853cb0e9 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-28 21:12:06 +00:00
Adam Silverstein
09b9af2c76 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 20:01:00 +00:00
desrosj
230fa090e8 External Libraries: Update the regenerator-runtime package to version 0.13.9.
Props hareesh-pillai, sourovroy, hellofromTonya.
Fixes #54027.
Built from https://develop.svn.wordpress.org/trunk@52162


git-svn-id: http://core.svn.wordpress.org/trunk@51754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 16:35:13 +00:00
Weston Ruter
9038612705 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-11 02:49:18 +00:00
John Blackbourn
62fc5121f2 Docs: Add missing documentation for the $javascript parameter of the wp_inline_script_attributes filter.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-10 18:41:03 +00:00
noisysocks
c421e9b34a 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-09 02:17:17 +00:00
jorgefilipecosta
d8fe393934 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.
Built from https://develop.svn.wordpress.org/trunk@52054


git-svn-id: http://core.svn.wordpress.org/trunk@51646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 21:45:58 +00:00
jorgefilipecosta
065c639a2a 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.
Built from https://develop.svn.wordpress.org/trunk@52049


git-svn-id: http://core.svn.wordpress.org/trunk@51641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 19:19:58 +00:00
gziolo
b519028ab2 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-08 13:24:58 +00:00
antpb
c1f6817cad 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-07 23:29:56 +00:00