Block Editor: Update @wordpress dependencies.

Changes of note:

- Includes the new Annotations API package.
- `wp-polyfill-ecmascript.js` is renamed to `wp-polyfill.js`.
- `strip_dynamic_blocks()` has been removed in favor of `excerpt_remove_blocks()`.
- The PHP block parser is now syncing from the `block-serialization-default-parser` package.
- `do_blocks()` uses the new parser.
- The `do_block` filter has been removed from `do_blocks()`, in favor of a `render_block` filter in `render_block()`.

Also, a little cleanup to `render_block()`. Always normalize `$block['attrs’]` to array in `’render_block’` filter.
Props pento, azaozz.

Merges [43884] and [43888] to trunk.

See #45145, #45190, #45264, #45282.
Built from https://develop.svn.wordpress.org/trunk@44261


git-svn-id: http://core.svn.wordpress.org/trunk@44091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj
2018-12-17 04:52:00 +00:00
parent bbe9a37b6c
commit 9d7aa3436e
94 changed files with 15151 additions and 4884 deletions

View File

@@ -85,7 +85,7 @@ function wp_default_packages_vendor( &$scripts ) {
'wp-polyfill-formdata',
'wp-polyfill-node-contains',
'wp-polyfill-element-closest',
'wp-polyfill-ecmascript',
'wp-polyfill',
);
foreach ( $vendor_scripts as $handle => $dependencies ) {
@@ -99,7 +99,7 @@ function wp_default_packages_vendor( &$scripts ) {
$scripts->add( $handle, $path, $dependencies, false, 1 );
}
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill-ecmascript' ) );
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill' ) );
did_action( 'init' ) && $scripts->add_data(
'wp-polyfill',
'data',
@@ -166,6 +166,13 @@ function wp_default_packages_scripts( &$scripts ) {
$packages_dependencies = array(
'api-fetch' => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n', 'wp-url' ),
'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ),
'annotations' => array(
'wp-data',
'wp-hooks',
'wp-i18n',
'wp-polyfill',
'wp-rich-text',
),
'autop' => array( 'wp-polyfill' ),
'blob' => array( 'wp-polyfill' ),
'blocks' => array(
@@ -259,7 +266,6 @@ function wp_default_packages_scripts( &$scripts ) {
'wp-compose',
'wp-core-data',
'wp-data',
'wp-deprecated',
'wp-dom-ready',
'wp-editor',
'wp-element',
@@ -334,7 +340,7 @@ function wp_default_packages_scripts( &$scripts ) {
'lodash',
'wp-a11y',
'wp-data',
'wp-polyfill-ecmascript',
'wp-polyfill',
),
'nux' => array(
'wp-element',