From 41b456eca98a92a2aeed4f47dd0a672d2481c4a6 Mon Sep 17 00:00:00 2001 From: noisysocks Date: Thu, 24 Sep 2020 03:00:08 +0000 Subject: [PATCH] Editor: Hide Screen Options tab from block editor The block editor provides its own interface for managing screen options, so we can safely hide Screen Options tab found in the top right of the page. Props aduth. See #46157. Built from https://develop.svn.wordpress.org/trunk@49040 git-svn-id: http://core.svn.wordpress.org/trunk@48802 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-blocks.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php index 3e4fd40e7f..03f80700ba 100644 --- a/wp-admin/edit-form-blocks.php +++ b/wp-admin/edit-form-blocks.php @@ -32,6 +32,11 @@ $current_screen->is_block_editor( true ); */ remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); +/* + * Block editor implements its own Options menu for toggling Document Panels. + */ +add_filter( 'screen_options_show_screen', '__return_false' ); + wp_enqueue_script( 'heartbeat' ); wp_enqueue_script( 'wp-edit-post' ); wp_enqueue_script( 'wp-format-library' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 181fbf4aeb..e83e62f68d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49039'; +$wp_version = '5.6-alpha-49040'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.