Block Editor: Update the WordPress Packages from Gutenberg 5.2.
Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. git-svn-id: https://develop.svn.wordpress.org/trunk@44808 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
716eea408b
commit
79a3abcb2a
File diff suppressed because it is too large
Load Diff
80
package.json
80
package.json
|
@ -13,8 +13,8 @@
|
|||
"author": "The WordPress Contributors",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"devDependencies": {
|
||||
"@wordpress/custom-templated-path-webpack-plugin": "1.1.6",
|
||||
"@wordpress/library-export-default-webpack-plugin": "1.0.5",
|
||||
"@wordpress/custom-templated-path-webpack-plugin": "1.2.0",
|
||||
"@wordpress/library-export-default-webpack-plugin": "1.1.0",
|
||||
"autoprefixer": "9.4.7",
|
||||
"check-node-version": "3.2.0",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
|
@ -54,43 +54,45 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "7.2.5",
|
||||
"@wordpress/a11y": "^2.0.2",
|
||||
"@wordpress/annotations": "1.0.8",
|
||||
"@wordpress/api-fetch": "^2.2.8",
|
||||
"@wordpress/autop": "^2.0.2",
|
||||
"@wordpress/blob": "^2.1.0",
|
||||
"@wordpress/block-library": "2.2.16",
|
||||
"@wordpress/block-serialization-default-parser": "^2.0.5",
|
||||
"@wordpress/blocks": "^6.0.7",
|
||||
"@wordpress/components": "7.0.8",
|
||||
"@wordpress/compose": "^3.0.1",
|
||||
"@wordpress/core-data": "^2.0.17",
|
||||
"@wordpress/data": "^4.2.1",
|
||||
"@wordpress/date": "^3.0.1",
|
||||
"@wordpress/deprecated": "^2.0.5",
|
||||
"@wordpress/dom": "^2.0.8",
|
||||
"@wordpress/dom-ready": "^2.0.2",
|
||||
"@wordpress/edit-post": "3.1.11",
|
||||
"@wordpress/editor": "9.0.11",
|
||||
"@wordpress/element": "^2.1.9",
|
||||
"@wordpress/escape-html": "^1.0.1",
|
||||
"@wordpress/format-library": "1.2.14",
|
||||
"@wordpress/hooks": "^2.0.5",
|
||||
"@wordpress/html-entities": "^2.0.4",
|
||||
"@wordpress/i18n": "^3.1.1",
|
||||
"@wordpress/is-shallow-equal": "^1.1.5",
|
||||
"@wordpress/keycodes": "^2.0.6",
|
||||
"@wordpress/list-reusable-blocks": "1.1.21",
|
||||
"@wordpress/notices": "^1.1.3",
|
||||
"@wordpress/nux": "3.0.9",
|
||||
"@wordpress/plugins": "^2.0.11",
|
||||
"@wordpress/redux-routine": "^3.0.4",
|
||||
"@wordpress/rich-text": "3.0.7",
|
||||
"@wordpress/shortcode": "^2.0.2",
|
||||
"@wordpress/token-list": "^1.1.0",
|
||||
"@wordpress/url": "^2.3.3",
|
||||
"@wordpress/viewport": "^2.1.1",
|
||||
"@wordpress/wordcount": "^2.0.3",
|
||||
"@wordpress/a11y": "^2.1.0",
|
||||
"@wordpress/annotations": "^1.1.0",
|
||||
"@wordpress/api-fetch": "^3.0.0",
|
||||
"@wordpress/autop": "^2.1.0",
|
||||
"@wordpress/blob": "^2.2.0",
|
||||
"@wordpress/block-editor": "^1.0.0",
|
||||
"@wordpress/block-library": "^2.3.0",
|
||||
"@wordpress/block-serialization-default-parser": "^3.0.0",
|
||||
"@wordpress/blocks": "^6.1.0",
|
||||
"@wordpress/components": "^7.1.0",
|
||||
"@wordpress/compose": "^3.1.0",
|
||||
"@wordpress/core-data": "^2.1.0",
|
||||
"@wordpress/data": "^4.3.0",
|
||||
"@wordpress/date": "^3.1.0",
|
||||
"@wordpress/deprecated": "^2.1.0",
|
||||
"@wordpress/dom": "^2.1.0",
|
||||
"@wordpress/dom-ready": "^2.1.0",
|
||||
"@wordpress/edit-post": "^3.2.0",
|
||||
"@wordpress/editor": "^9.1.0",
|
||||
"@wordpress/element": "^2.2.0",
|
||||
"@wordpress/escape-html": "^1.1.0",
|
||||
"@wordpress/format-library": "^1.3.0",
|
||||
"@wordpress/hooks": "^2.1.0",
|
||||
"@wordpress/html-entities": "^2.1.0",
|
||||
"@wordpress/i18n": "^3.2.0",
|
||||
"@wordpress/is-shallow-equal": "^1.2.0",
|
||||
"@wordpress/keycodes": "^2.1.0",
|
||||
"@wordpress/list-reusable-blocks": "^1.2.0",
|
||||
"@wordpress/notices": "^1.2.0",
|
||||
"@wordpress/nux": "^3.1.0",
|
||||
"@wordpress/plugins": "^2.1.0",
|
||||
"@wordpress/priority-queue": "^1.0.0",
|
||||
"@wordpress/redux-routine": "^3.1.0",
|
||||
"@wordpress/rich-text": "^3.1.0",
|
||||
"@wordpress/shortcode": "^2.1.0",
|
||||
"@wordpress/token-list": "^1.2.0",
|
||||
"@wordpress/url": "^2.4.0",
|
||||
"@wordpress/viewport": "^2.2.0",
|
||||
"@wordpress/wordcount": "^2.1.0",
|
||||
"backbone": "1.3.3",
|
||||
"element-closest": "^2.0.2",
|
||||
"formdata-polyfill": "3.0.13",
|
||||
|
|
|
@ -48,6 +48,7 @@ $preload_paths = array(
|
|||
sprintf( '/wp/v2/types/%s?context=edit', $post_type ),
|
||||
sprintf( '/wp/v2/users/me?post_type=%s&context=edit', $post_type ),
|
||||
array( '/wp/v2/media', 'OPTIONS' ),
|
||||
array( '/wp/v2/blocks', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -117,6 +117,9 @@ function render_block_core_latest_comments( $attributes = array() ) {
|
|||
}
|
||||
|
||||
$class = 'wp-block-latest-comments';
|
||||
if ( ! empty( $attributes['className'] ) ) {
|
||||
$class .= ' ' . $attributes['className'];
|
||||
}
|
||||
if ( isset( $attributes['align'] ) ) {
|
||||
$class .= " align{$attributes['align']}";
|
||||
}
|
||||
|
|
|
@ -14,38 +14,37 @@
|
|||
*/
|
||||
function render_block_core_latest_posts( $attributes ) {
|
||||
$args = array(
|
||||
'numberposts' => $attributes['postsToShow'],
|
||||
'post_status' => 'publish',
|
||||
'order' => $attributes['order'],
|
||||
'orderby' => $attributes['orderBy'],
|
||||
'posts_per_page' => $attributes['postsToShow'],
|
||||
'post_status' => 'publish',
|
||||
'order' => $attributes['order'],
|
||||
'orderby' => $attributes['orderBy'],
|
||||
'suppress_filters' => false,
|
||||
);
|
||||
|
||||
if ( isset( $attributes['categories'] ) ) {
|
||||
$args['category'] = $attributes['categories'];
|
||||
}
|
||||
|
||||
$recent_posts = wp_get_recent_posts( $args );
|
||||
$recent_posts = get_posts( $args );
|
||||
|
||||
$list_items_markup = '';
|
||||
|
||||
foreach ( $recent_posts as $post ) {
|
||||
$post_id = $post['ID'];
|
||||
|
||||
$title = get_the_title( $post_id );
|
||||
$title = get_the_title( $post );
|
||||
if ( ! $title ) {
|
||||
$title = __( '(Untitled)' );
|
||||
}
|
||||
$list_items_markup .= sprintf(
|
||||
'<li><a href="%1$s">%2$s</a>',
|
||||
esc_url( get_permalink( $post_id ) ),
|
||||
esc_html( $title )
|
||||
esc_url( get_permalink( $post ) ),
|
||||
$title
|
||||
);
|
||||
|
||||
if ( isset( $attributes['displayPostDate'] ) && $attributes['displayPostDate'] ) {
|
||||
$list_items_markup .= sprintf(
|
||||
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
|
||||
esc_attr( get_the_date( 'c', $post_id ) ),
|
||||
esc_html( get_the_date( '', $post_id ) )
|
||||
esc_attr( get_the_date( 'c', $post ) ),
|
||||
esc_html( get_the_date( '', $post ) )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -224,47 +224,49 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
$suffix = wp_scripts_get_suffix();
|
||||
|
||||
$packages_versions = array(
|
||||
'api-fetch' => '2.2.8',
|
||||
'a11y' => '2.0.2',
|
||||
'annotations' => '1.0.8',
|
||||
'autop' => '2.0.2',
|
||||
'blob' => '2.1.0',
|
||||
'block-library' => '2.2.16',
|
||||
'block-serialization-default-parser' => '2.0.5',
|
||||
'blocks' => '6.0.6',
|
||||
'components' => '7.0.8',
|
||||
'compose' => '3.0.1',
|
||||
'core-data' => '2.0.17',
|
||||
'data' => '4.2.1',
|
||||
'date' => '3.0.1',
|
||||
'deprecated' => '2.0.5',
|
||||
'dom' => '2.0.8',
|
||||
'dom-ready' => '2.0.2',
|
||||
'edit-post' => '3.1.11',
|
||||
'editor' => '9.0.11',
|
||||
'element' => '2.1.9',
|
||||
'escape-html' => '1.0.1',
|
||||
'format-library' => '1.2.14',
|
||||
'hooks' => '2.0.5',
|
||||
'html-entities' => '2.0.4',
|
||||
'i18n' => '3.1.1',
|
||||
'is-shallow-equal' => '1.1.5',
|
||||
'keycodes' => '2.0.6',
|
||||
'list-reusable-blocks' => '1.1.21',
|
||||
'notices' => '1.1.3',
|
||||
'nux' => '3.0.9',
|
||||
'plugins' => '2.0.10',
|
||||
'redux-routine' => '3.0.4',
|
||||
'rich-text' => '3.0.7',
|
||||
'shortcode' => '2.0.2',
|
||||
'token-list' => '1.1.0',
|
||||
'url' => '2.3.3',
|
||||
'viewport' => '2.1.1',
|
||||
'wordcount' => '2.0.3',
|
||||
'a11y' => '2.1.0',
|
||||
'annotations' => '1.1.0',
|
||||
'api-fetch' => '3.0.0',
|
||||
'autop' => '2.1.0',
|
||||
'blob' => '2.2.0',
|
||||
'block-editor' => '1.0.0',
|
||||
'block-library' => '2.3.0',
|
||||
'block-serialization-default-parser' => '3.0.0',
|
||||
'blocks' => '6.1.0',
|
||||
'components' => '7.1.0',
|
||||
'compose' => '3.1.0',
|
||||
'core-data' => '2.1.0',
|
||||
'data' => '4.3.0',
|
||||
'date' => '3.1.0',
|
||||
'deprecated' => '2.1.0',
|
||||
'dom' => '2.1.0',
|
||||
'dom-ready' => '2.1.0',
|
||||
'edit-post' => '3.2.0',
|
||||
'editor' => '9.1.0',
|
||||
'element' => '2.2.0',
|
||||
'escape-html' => '1.1.0',
|
||||
'format-library' => '1.3.0',
|
||||
'hooks' => '2.1.0',
|
||||
'html-entities' => '2.1.0',
|
||||
'i18n' => '3.2.0',
|
||||
'is-shallow-equal' => '1.2.0',
|
||||
'keycodes' => '2.1.0',
|
||||
'list-reusable-blocks' => '1.2.0',
|
||||
'notices' => '1.2.0',
|
||||
'nux' => '3.1.0',
|
||||
'plugins' => '2.1.0',
|
||||
'priority-queue' => '1.0.0',
|
||||
'redux-routine' => '3.1.0',
|
||||
'rich-text' => '3.1.0',
|
||||
'shortcode' => '2.1.0',
|
||||
'token-list' => '1.2.0',
|
||||
'url' => '2.4.0',
|
||||
'viewport' => '2.2.0',
|
||||
'wordcount' => '2.1.0',
|
||||
);
|
||||
|
||||
$packages_dependencies = array(
|
||||
'api-fetch' => array( 'wp-polyfill', 'wp-hooks', 'wp-i18n', 'wp-url' ),
|
||||
'api-fetch' => array( 'wp-polyfill', 'wp-i18n', 'wp-url' ),
|
||||
'a11y' => array( 'wp-dom-ready', 'wp-polyfill' ),
|
||||
'annotations' => array(
|
||||
'wp-data',
|
||||
|
@ -296,6 +298,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'wp-api-fetch',
|
||||
'wp-autop',
|
||||
'wp-blob',
|
||||
'wp-block-editor',
|
||||
'wp-blocks',
|
||||
'wp-components',
|
||||
'wp-compose',
|
||||
|
@ -313,6 +316,15 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'wp-rich-text',
|
||||
),
|
||||
'block-serialization-default-parser' => array(),
|
||||
'block-editor' => array(
|
||||
'lodash',
|
||||
'wp-blocks',
|
||||
'wp-compose',
|
||||
'wp-components',
|
||||
'wp-data',
|
||||
'wp-element',
|
||||
'wp-i18n',
|
||||
),
|
||||
'components' => array(
|
||||
'lodash',
|
||||
'moment',
|
||||
|
@ -336,18 +348,26 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'wp-is-shallow-equal',
|
||||
'wp-polyfill',
|
||||
),
|
||||
'core-data' => array( 'wp-data', 'wp-api-fetch', 'wp-polyfill', 'wp-url', 'lodash' ),
|
||||
'core-data' => array(
|
||||
'lodash',
|
||||
'wp-api-fetch',
|
||||
'wp-data',
|
||||
'wp-deprecated',
|
||||
'wp-polyfill',
|
||||
'wp-url',
|
||||
),
|
||||
'data' => array(
|
||||
'lodash',
|
||||
'wp-compose',
|
||||
'wp-element',
|
||||
'wp-is-shallow-equal',
|
||||
'wp-polyfill',
|
||||
'wp-priority-queue',
|
||||
'wp-redux-routine',
|
||||
),
|
||||
'date' => array( 'moment', 'wp-polyfill' ),
|
||||
'deprecated' => array( 'wp-polyfill', 'wp-hooks' ),
|
||||
'dom' => array( 'lodash', 'wp-polyfill', 'wp-tinymce' ),
|
||||
'dom' => array( 'lodash', 'wp-polyfill' ),
|
||||
'dom-ready' => array( 'wp-polyfill' ),
|
||||
'edit-post' => array(
|
||||
'jquery',
|
||||
|
@ -357,6 +377,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'media-views',
|
||||
'wp-a11y',
|
||||
'wp-api-fetch',
|
||||
'wp-block-editor',
|
||||
'wp-block-library',
|
||||
'wp-blocks',
|
||||
'wp-components',
|
||||
|
@ -377,11 +398,11 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'wp-viewport',
|
||||
),
|
||||
'editor' => array(
|
||||
'jquery',
|
||||
'lodash',
|
||||
'wp-a11y',
|
||||
'wp-api-fetch',
|
||||
'wp-blob',
|
||||
'wp-block-editor',
|
||||
'wp-blocks',
|
||||
'wp-components',
|
||||
'wp-compose',
|
||||
|
@ -399,7 +420,6 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'wp-notices',
|
||||
'wp-nux',
|
||||
'wp-polyfill',
|
||||
'wp-tinymce',
|
||||
'wp-token-list',
|
||||
'wp-url',
|
||||
'wp-viewport',
|
||||
|
@ -410,7 +430,6 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'escape-html' => array( 'wp-polyfill' ),
|
||||
'format-library' => array(
|
||||
'wp-components',
|
||||
'wp-dom',
|
||||
'wp-editor',
|
||||
'wp-element',
|
||||
'wp-i18n',
|
||||
|
@ -450,6 +469,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
'lodash',
|
||||
),
|
||||
'plugins' => array( 'lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill' ),
|
||||
'priority-queue' => array(),
|
||||
'redux-routine' => array( 'wp-polyfill' ),
|
||||
'rich-text' => array(
|
||||
'lodash',
|
||||
|
@ -467,6 +487,7 @@ function wp_default_packages_scripts( &$scripts ) {
|
|||
$package_translations = array(
|
||||
'api-fetch',
|
||||
'blocks',
|
||||
'block-editor',
|
||||
'block-library',
|
||||
'components',
|
||||
'edit-post',
|
||||
|
@ -528,6 +549,7 @@ function wp_default_packages_inline_scripts( &$scripts ) {
|
|||
' wp.data',
|
||||
' .use( wp.data.plugins.persistence, { storageKey: storageKey } )',
|
||||
' .use( wp.data.plugins.controls );',
|
||||
' wp.data.plugins.persistence.__unstableMigrate( { storageKey: storageKey } );',
|
||||
'} )();',
|
||||
)
|
||||
)
|
||||
|
|
|
@ -253,10 +253,14 @@ require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
|
|||
require( ABSPATH . WPINC . '/blocks.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/archives.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/block.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/calendar.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/categories.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/rss.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/search.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/shortcode.php' );
|
||||
require( ABSPATH . WPINC . '/blocks/tag-cloud.php' );
|
||||
|
||||
$GLOBALS['wp_embed'] = new WP_Embed();
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
|
|||
'autop',
|
||||
'blob',
|
||||
'blocks',
|
||||
'block-editor',
|
||||
'block-library',
|
||||
'block-serialization-default-parser',
|
||||
'components',
|
||||
|
@ -86,6 +87,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
|
|||
'notices',
|
||||
'nux',
|
||||
'plugins',
|
||||
'priority-queue',
|
||||
'redux-routine',
|
||||
'rich-text',
|
||||
'shortcode',
|
||||
|
@ -126,10 +128,14 @@ module.exports = function( env = { environment: 'production', watch: false, buil
|
|||
'block-serialization-default-parser/parser.php': 'wp-includes/class-wp-block-parser.php',
|
||||
'block-library/src/archives/index.php': 'wp-includes/blocks/archives.php',
|
||||
'block-library/src/block/index.php': 'wp-includes/blocks/block.php',
|
||||
'block-library/src/calendar/index.php': 'wp-includes/blocks/calendar.php',
|
||||
'block-library/src/categories/index.php': 'wp-includes/blocks/categories.php',
|
||||
'block-library/src/latest-comments/index.php': 'wp-includes/blocks/latest-comments.php',
|
||||
'block-library/src/latest-posts/index.php': 'wp-includes/blocks/latest-posts.php',
|
||||
'block-library/src/rss/index.php': 'wp-includes/blocks/rss.php',
|
||||
'block-library/src/search/index.php': 'wp-includes/blocks/search.php',
|
||||
'block-library/src/shortcode/index.php': 'wp-includes/blocks/shortcode.php',
|
||||
'block-library/src/tag-cloud/index.php': 'wp-includes/blocks/tag-cloud.php',
|
||||
};
|
||||
|
||||
const externals = {
|
||||
|
|
Loading…
Reference in New Issue