| 921 | | switch ( $this->base ) { |
| 922 | | case 'widgets': |
| 923 | | $nonce = wp_create_nonce( 'widgets-access' ); |
| 924 | | $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Enable accessibility mode' ) . '</a><a id="access-off" href="widgets.php?widgets-access=off&_wpnonce=' . urlencode( $nonce ) . '">' . __( 'Disable accessibility mode' ) . "</a></p>\n"; |
| 925 | | break; |
| 926 | | case 'post': |
| 927 | | $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">'; |
| 928 | | $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />'; |
| 929 | | $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></fieldset>'; |
| 930 | | $this->_screen_settings = $expand; |
| 931 | | break; |
| 932 | | default: |
| 933 | | $this->_screen_settings = ''; |
| 934 | | break; |
| 935 | | } |
| | 921 | $this->_screen_settings = ''; |
| 937 | | /** |
| 938 | | * Filters the screen settings text displayed in the Screen Options tab. |
| 939 | | * |
| 940 | | * This filter is currently only used on the Widgets screen to enable |
| 941 | | * accessibility mode. |
| 942 | | * |
| 943 | | * @since 3.0.0 |
| 944 | | * |
| 945 | | * @param string $screen_settings Screen settings. |
| 946 | | * @param WP_Screen $this WP_Screen object. |
| 947 | | */ |
| 948 | | $this->_screen_settings = apply_filters( 'screen_settings', $this->_screen_settings, $this ); |
| 949 | | |
| 950 | | if ( $this->_screen_settings || $this->_options ) { |
| 951 | | $show_screen = true; |
| | 923 | if ( 'post' === $this->base ) { |
| | 924 | $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">'; |
| | 925 | $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />'; |
| | 926 | $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></fieldset>'; |
| | 927 | $this->_screen_settings = $expand; |