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

Release: WordPress 5.5 beta 1 finishing touches #23708

Merged
merged 3 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions lib/block-directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function gutenberg_enqueue_block_editor_assets_block_directory() {
* This filter can be removed when plugin support requires WordPress 5.5.0+.
*
* @see https://core.trac.wordpress.org/ticket/48654
* @see https://core.trac.wordpress.org/changeset/48295
*
* @param string $tag The `<script>` tag for the enqueued script.
* @param string $handle The script's registered handle.
Expand Down
9 changes: 8 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,11 @@ function gutenberg_extend_settings_link_color( $settings ) {

/*
* Register default patterns if not registered in Core already.
*
* This can be removed when plugin support requires WordPress 5.5.0+.
*
* @see https://core.trac.wordpress.org/ticket/50550
*/

if ( class_exists( 'WP_Block_Patterns_Registry' ) && ! WP_Block_Patterns_Registry::get_instance()->is_registered( 'text-two-columns' ) ) {
register_block_pattern( 'core/text-two-columns', gutenberg_load_block_pattern( 'text-two-columns' ) );
register_block_pattern( 'core/two-buttons', gutenberg_load_block_pattern( 'two-buttons' ) );
Expand All @@ -737,6 +740,10 @@ function gutenberg_extend_settings_link_color( $settings ) {

/*
* Register default pattern categories if not registered in Core already.
*
* This can be removed when plugin support requires WordPress 5.5.0+.
*
* @see https://core.trac.wordpress.org/ticket/50550
*/
if ( class_exists( 'WP_Block_Pattern_Categories_Registry' ) ) {
register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category', 'gutenberg' ) ) );
Expand Down
16 changes: 2 additions & 14 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ function gutenberg_add_dom_rect_polyfill( $scripts ) {
* This can be removed when plugin support requires WordPress 5.5.0+.
*
* @see https://core.trac.wordpress.org/ticket/50278
* @see https://core.trac.wordpress.org/changeset/48177
*
* @param array[] $default_categories Array of block categories.
*
Expand Down Expand Up @@ -401,6 +402,7 @@ function gutenberg_replace_default_block_categories( $default_categories ) {
* This can be removed when plugin support requires WordPress 5.5.0+.
*
* @see https://core.trac.wordpress.org/ticket/49927
* @see https://core.trac.wordpress.org/changeset/48243
*
* @param string|null $pre_render The pre-rendered content. Defaults to null.
* @param array $parsed_block The parsed block being rendered.
Expand Down Expand Up @@ -459,20 +461,6 @@ function gutenberg_render_block_with_assigned_block_context( $pre_render, $parse
}
add_filter( 'pre_render_block', 'gutenberg_render_block_with_assigned_block_context', 9, 2 );

/**
* Avoid enqueueing block assets of all registered blocks for all posts, instead
* deferring to block render mechanics to enqueue scripts, thereby ensuring only
* blocks of the content have their assets enqueued.
*
* This can be removed once minimum support for the plugin is outside the range
* of the version associated with closure of the following ticket.
*
* @see https://core.trac.wordpress.org/ticket/50328
*
* @see WP_Block::render
*/
remove_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );

/**
* Shim that hooks into `wp_update_nav_menu_item` and makes it so that nav menu
* items support a 'content' field. This field contains HTML and is used by nav
Expand Down
2 changes: 1 addition & 1 deletion lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function gutenberg_filter_oembed_result( $response, $handler, $request ) {
*
* @todo Remove once Gutenberg's minimum required WordPress version is v5.5.
* @see https://core.trac.wordpress.org/ticket/49906
* @see https://github.com/WordPress/wordpress-develop/pull/222
* @see https://core.trac.wordpress.org/changeset/47921
*
* @param WP_REST_Response $response The response object.
* @param WP_Theme $theme Theme object used to create response.
Expand Down