Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @wordpress packages #2048

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 133 additions & 124 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@wordpress/babel-preset-default": "6.4.1",
"@wordpress/custom-templated-path-webpack-plugin": "2.1.0",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/e2e-test-utils": "5.4.9",
"@wordpress/e2e-test-utils": "5.4.10",
"@wordpress/library-export-default-webpack-plugin": "2.2.0",
"@wordpress/scripts": "19.2.2",
"autoprefixer": "^9.8.8",
Expand Down Expand Up @@ -82,53 +82,53 @@
"@wordpress/api-fetch": "5.2.6",
"@wordpress/autop": "3.2.3",
"@wordpress/blob": "3.2.2",
"@wordpress/block-directory": "3.0.14",
"@wordpress/block-editor": "8.0.8",
"@wordpress/block-library": "6.0.12",
"@wordpress/block-directory": "3.0.16",
"@wordpress/block-editor": "8.0.10",
"@wordpress/block-library": "6.0.14",
"@wordpress/block-serialization-default-parser": "4.2.3",
"@wordpress/blocks": "11.1.4",
"@wordpress/components": "19.1.2",
"@wordpress/components": "19.1.4",
"@wordpress/compose": "5.0.6",
"@wordpress/core-data": "4.0.8",
"@wordpress/customize-widgets": "2.0.14",
"@wordpress/customize-widgets": "2.0.16",
"@wordpress/data": "6.1.4",
"@wordpress/data-controls": "2.2.7",
"@wordpress/date": "4.2.3",
"@wordpress/deprecated": "3.2.3",
"@wordpress/dom": "3.2.7",
"@wordpress/dom-ready": "3.2.3",
"@wordpress/edit-post": "5.0.14",
"@wordpress/edit-site": "3.0.14",
"@wordpress/edit-widgets": "3.1.9",
"@wordpress/editor": "12.0.11",
"@wordpress/edit-post": "5.0.16",
"@wordpress/edit-site": "3.0.16",
"@wordpress/edit-widgets": "3.1.11",
"@wordpress/editor": "12.0.13",
"@wordpress/element": "4.0.4",
"@wordpress/escape-html": "2.2.3",
"@wordpress/format-library": "3.0.14",
"@wordpress/format-library": "3.0.16",
"@wordpress/hooks": "3.2.2",
"@wordpress/html-entities": "3.2.3",
"@wordpress/i18n": "4.2.4",
"@wordpress/icons": "6.1.1",
"@wordpress/interface": "4.1.10",
"@wordpress/interface": "4.1.12",
"@wordpress/is-shallow-equal": "4.2.1",
"@wordpress/keyboard-shortcuts": "3.0.6",
"@wordpress/keycodes": "3.2.4",
"@wordpress/list-reusable-blocks": "3.0.12",
"@wordpress/list-reusable-blocks": "3.0.14",
"@wordpress/media-utils": "3.0.5",
"@wordpress/notices": "3.2.7",
"@wordpress/nux": "5.0.12",
"@wordpress/nux": "5.0.14",
"@wordpress/plugins": "4.0.6",
"@wordpress/primitives": "3.0.4",
"@wordpress/priority-queue": "2.2.3",
"@wordpress/redux-routine": "4.2.2",
"@wordpress/reusable-blocks": "3.0.14",
"@wordpress/reusable-blocks": "3.0.16",
"@wordpress/rich-text": "5.0.6",
"@wordpress/server-side-render": "3.0.12",
"@wordpress/server-side-render": "3.0.14",
"@wordpress/shortcode": "3.2.3",
"@wordpress/token-list": "2.2.2",
"@wordpress/url": "3.3.1",
"@wordpress/viewport": "4.0.6",
"@wordpress/warning": "2.2.2",
"@wordpress/widgets": "2.0.14",
"@wordpress/widgets": "2.0.16",
"@wordpress/wordcount": "3.2.3",
"backbone": "1.4.0",
"clipboard": "2.0.8",
Expand Down
95 changes: 34 additions & 61 deletions src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
wp_die( __( 'The theme you are currently using is not compatible with Full Site Editing.' ) );
}

// Used in the HTML title tag.
$title = __( 'Editor (beta)' );
$parent_file = 'themes.php';

// Flag that we're loading the block editor.
Expand Down Expand Up @@ -56,74 +58,45 @@ static function( $classes ) {
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context );

if ( isset( $_GET['postType'] ) && ! isset( $_GET['postId'] ) ) {

$post_type = get_post_type_object( $_GET['postType'] );

if ( ! $post_type ) {
wp_die( __( 'Invalid post type.' ) );
}
}

// Used in the HTML title tag.
$title = $post_type->labels->name;

$preload_paths = array(
'/',
'/wp/v2/types/' . $post_type->name . '?context=edit',
'/wp/v2/types?context=edit',
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( $post_type->name ) ),
);

block_editor_rest_api_preload( $preload_paths, $block_editor_context );

wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeList( "site-editor", "%s", %s );
} );',
$post_type->name,
wp_json_encode( $editor_settings )
)
);

} else {

// Used in the HTML title tag.
$title = __( 'Editor (beta)' );

$active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
$active_theme = wp_get_theme()->get_stylesheet();
$preload_paths = array(
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
'/',
'/wp/v2/types?context=edit',
'/wp/v2/taxonomies?context=edit',
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'page' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'post' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_taxonomy_items( 'category' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_taxonomy_items( 'post_tag' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'wp_template' ) ),
add_query_arg( 'context', 'edit', rest_get_route_for_post_type_items( 'wp_template_part' ) ),
'/wp/v2/settings',
'/wp/v2/themes?context=edit&status=active',
'/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
'/wp/v2/global-styles/' . $active_global_styles_id,
'/wp/v2/themes/' . $active_theme . '/global-styles',
);

block_editor_rest_api_preload( $preload_paths, $block_editor_context );
$active_global_styles_id = WP_Theme_JSON_Resolver::get_user_custom_post_type_id();
$active_theme = wp_get_theme()->get_stylesheet();
$preload_paths = array(
array( '/wp/v2/media', 'OPTIONS' ),
'/',
'/wp/v2/types?context=edit',
'/wp/v2/types/wp_template?context=edit',
'/wp/v2/types/wp_template-part?context=edit',
'/wp/v2/taxonomies?context=edit',
'/wp/v2/pages?context=edit',
'/wp/v2/categories?context=edit',
'/wp/v2/posts?context=edit',
'/wp/v2/tags?context=edit',
'/wp/v2/templates?context=edit&per_page=-1',
'/wp/v2/template-parts?context=edit&per_page=-1',
'/wp/v2/settings',
'/wp/v2/themes?context=edit&status=active',
'/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit',
'/wp/v2/global-styles/' . $active_global_styles_id,
'/wp/v2/global-styles/themes/' . $active_theme,
);

wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeEditor( "site-editor", %s );
} );',
wp_json_encode( $editor_settings )
)
);
block_editor_rest_api_preload( $preload_paths, $block_editor_context );

}
wp_add_inline_script(
'wp-edit-site',
sprintf(
'wp.domReady( function() {
wp.editSite.initializeEditor( "site-editor", %s );
} );',
wp_json_encode( $editor_settings )
)
);

// Preload server-registered block schemas.
wp_add_inline_script(
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/wp-includes/blocks/navigation/view.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '133b84f32422a9ad94c4533f85fa4e87');
<?php return array('dependencies' => array(), 'version' => '34d9f07c7910e83c264c6c4406619c5e');
2 changes: 1 addition & 1 deletion src/wp-includes/blocks/navigation/view.min.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'f3cbbfbf9b9c434c39d6f77037d5267c');
<?php return array('dependencies' => array(), 'version' => 'd5ab04a497b4f1465f1f0060b6b71ae3');
15 changes: 15 additions & 0 deletions src/wp-includes/blocks/post-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,18 @@ function register_block_core_post_comments() {
);
}
add_action( 'init', 'register_block_core_post_comments' );

/**
* Use the button block classes for the form-submit button.
*
* @param array $fields The default comment form arguments.
*
* @return array Returns the modified fields.
*/
function gutenberg_post_comments_block_form_defaults( $fields ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link" value="%4$s" />';
$fields['submit_field'] = '<p class="form-submit wp-block-button">%1$s %2$s</p>';

return $fields;
}
add_filter( 'comment_form_defaults', 'gutenberg_post_comments_block_form_defaults' );
noisysocks marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 5 additions & 1 deletion src/wp-includes/blocks/post-comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@
"link": true
}
},
"style": "wp-block-post-comments"
"style": [
"wp-block-post-comments",
"wp-block-buttons",
"wp-block-button"
]
}
Loading