diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index 22da9e3b62..eb8c2ca0ec 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -1570,10 +1570,17 @@ form.upgrade .hint { background-position: bottom left; } -#screen-options-wrap h5, +#screen-options-wrap h5, /* Back-compat for old plugins */ +#screen-options-wrap legend, #contextual-help-wrap h5 { - margin: 8px 0; - font-size: 13px; + margin: 0; + padding: 8px 0; + font-size: 13px; + font-weight: 600; +} + +.ie8 #screen-options-wrap legend { + color: inherit; } .metabox-prefs label { @@ -1582,27 +1589,30 @@ form.upgrade .hint { line-height: 30px; } -.metabox-prefs label input[type=checkbox] { - margin-top: -4px; +#number-of-columns { + display: inline-block; + vertical-align: middle; + line-height: 30px; +} + +.metabox-prefs input[type=checkbox] { + margin-top: 0; margin-right: 6px; } -.metabox-prefs label input { - margin: 0 5px 0 2px; +.metabox-prefs label input, +.metabox-prefs label input[type=checkbox] { + margin: -4px 5px 0 0; } .metabox-prefs .columns-prefs label input { - margin: 0 2px; + margin: -1px 2px 0 0; } .metabox-prefs label a { display: none; } -.metabox-prefs .screen-options { - padding-top: 10px; -} - .metabox-prefs .screen-options input, .metabox-prefs .screen-options label { margin-top: 0; @@ -1619,6 +1629,10 @@ form.upgrade .hint { padding-right: 0; } +.screen-options + .screen-options { + margin-top: 10px; +} + /*------------------------------------------------------------------------------ 6.2 - Help Menu ------------------------------------------------------------------------------*/ @@ -1900,7 +1914,7 @@ html.wp-toolbar { } .columns-prefs label { - padding: 0 5px; + padding: 0 10px 0 0; } /* @todo: what is this doing here */ diff --git a/src/wp-admin/css/customize-nav-menus.css b/src/wp-admin/css/customize-nav-menus.css index ab9db57483..ebe90efdcf 100644 --- a/src/wp-admin/css/customize-nav-menus.css +++ b/src/wp-admin/css/customize-nav-menus.css @@ -349,7 +349,7 @@ display: none; background: #fff; border-top: 1px solid #ddd; - padding: 4px 15px 0; + padding: 4px 15px 15px; } .wp-customizer .metabox-prefs label { diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index 69daaf651c..a01d94be3f 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -918,9 +918,9 @@ final class WP_Screen { $this->_screen_settings = '

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

\n"; break; case 'post' : - $expand = ''; + $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . ''; $this->_screen_settings = $expand; break; default: @@ -969,110 +969,137 @@ final class WP_Screen { */ public function render_screen_options( $options = array() ) { global $wp_meta_boxes; + $options = wp_parse_args( $options, array( 'wrap' => true, ) ); - $columns = get_column_headers( $this ); - $hidden = get_hidden_columns( $this ); + $wrapper_start = $wrapper_end = $form_start = $form_end = ''; - ?> - - '; + } - if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?> -
- base ) { + $form_start = "\n\n"; + $form_end = "\n" . wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false, false ) . "\n\n"; + } - if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) { - if ( isset( $_GET['welcome'] ) ) { - $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1; - update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked ); - } else { - $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); - if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) - $welcome_checked = false; - } - echo '\n"; - } - ?> -
-
- -
- -
- $title ) { - // Can't hide these for they are special - if ( in_array( $column, $special ) ) - continue; - if ( empty( $title ) ) - continue; - - if ( 'comments' == $column ) - $title = __( 'Comments' ); - $id = "$column-hide"; - echo '\n"; - } - ?> -
-
- render_meta_boxes_preferences(); + $this->render_list_table_columns_preferences(); $this->render_screen_layout(); $this->render_per_page_options(); echo $this->_screen_settings; - ?> -
- - - + echo $form_end . $wrapper_end; + } + + /** + * Render the meta boxes preferences. + * + * @since 4.4.0 + */ + public function render_meta_boxes_preferences() { + global $wp_meta_boxes; + + if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?> +
+ + id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) { + if ( isset( $_GET['welcome'] ) ) { + $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1; + update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked ); + } else { + $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true ); + if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) ) + $welcome_checked = false; + } + echo '\n"; + } + ?> +
+
+ + $title ) { + // Can't hide these for they are special + if ( in_array( $column, $special ) ) { + continue; + } + + if ( empty( $title ) ) { + continue; + } + + if ( 'comments' == $column ) { + $title = __( 'Comments' ); + } + + $id = "$column-hide"; + echo '\n"; + } + ?> +
+ get_option('layout_columns') ) + if ( ! $this->get_option( 'layout_columns' ) ) { return; + } $screen_layout_columns = $this->get_columns(); $num = $this->get_option( 'layout_columns', 'max' ); ?> -
-
+ -
+ post_type ) ) { - /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */ + /** This filter is documented in wp-admin/includes/post.php */ $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type ); } ?> -
+
+ -
+