diff --git a/src/wp-admin/css/widgets.css b/src/wp-admin/css/widgets.css index a4d314ab80..8cdd87f5a8 100644 --- a/src/wp-admin/css/widgets.css +++ b/src/wp-admin/css/widgets.css @@ -495,6 +495,11 @@ div#widgets-right .closed .widgets-sortables { } /* Accessibility Mode */ +.widget-access-link { + float: right; + margin: -5px 0 10px 10px; +} + .widgets_access #widgets-left .widget .widget-top { cursor: auto; } @@ -793,6 +798,11 @@ ul.CodeMirror-hints { margin: 0 auto !important; max-width: 480px; } + + .widget-access-link { + float: none; + margin: 15px 0 0 0; + } } @media screen and (max-width: 320px) { diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index 6133f923c0..d4b5a9c92f 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -918,20 +918,13 @@ if ( $this->show_screen_options() ) : $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' ); - switch ( $this->base ) { - case 'widgets': - $nonce = wp_create_nonce( 'widgets-access' ); - $this->_screen_settings = '

' . __( 'Enable accessibility mode' ) . '' . __( 'Disable accessibility mode' ) . "

\n"; - break; - case 'post': - $expand = ''; - $this->_screen_settings = $expand; - break; - default: - $this->_screen_settings = ''; - break; + $this->_screen_settings = ''; + + if ( 'post' === $this->base ) { + $expand = ''; + $this->_screen_settings = $expand; } /** diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php index 7d12a27d6a..ade4fd2b4b 100644 --- a/src/wp-admin/widgets.php +++ b/src/wp-admin/widgets.php @@ -399,7 +399,12 @@ if ( current_user_can( 'customize' ) ) { __( 'Manage with Live Preview' ) ); } + +$nonce = wp_create_nonce( 'widgets-access' ); ?> +