Make WordPress Core

Changeset 29588


Ignore:
Timestamp:
08/24/2014 05:56:25 PM (10 years ago)
Author:
nacin
Message:

Screen: Move editor scrolling screen option to the proper place.

see [29336], see #28328.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/screen.php

    r29336 r29588  
    968968        $show_screen = ! empty( $wp_meta_boxes[ $this->id ] ) || $columns || $this->get_option( 'per_page' );
    969969
    970         switch ( $this->id ) {
     970        switch ( $this->base ) {
    971971            case 'widgets':
    972972                $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
     973                break;
     974            case 'post' :
     975                $expand = '<div class="editor-expand hidden"><label for="editor-expand-toggle">';
     976                $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />';
     977                $expand .= __( 'Expand the editor to match the window height.' ) . '</label></div>';
     978                $this->_screen_settings = $expand;
    973979                break;
    974980            default:
     
    11111117            endfor; ?>
    11121118        </div>
    1113         <div class="editor-expand hidden">
    1114             <label for="editor-expand-toggle">
    1115             <input type="checkbox" id="editor-expand-toggle" <?php checked( get_user_setting( 'editor_expand', 'on' ) === 'on' ); ?> />
    1116             <?php _e( 'Expand the editor to match the window height.' ); ?></label>
    1117         </div>
    11181119        <?php
    11191120    }
Note: See TracChangeset for help on using the changeset viewer.