Ticket #35057: 35057.1.diff
File 35057.1.diff, 1.8 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/screen.php
57 57 58 58 $hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' ); 59 59 60 if ( ! $hidden ) { 60 $use_defaults = ! is_array( $hidden ); 61 62 if ( $use_defaults ) { 61 63 $hidden = array(); 62 64 63 65 /** … … 78 80 * 79 81 * @param array $hidden An array of hidden columns. 80 82 * @param WP_Screen $screen WP_Screen object of the current screen. 83 * @param bool $use_defaults Whether to show the default meta boxes. 84 * Default true. 81 85 */ 82 return apply_filters( 'hidden_columns', $hidden, $screen );86 return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults ); 83 87 } 84 88 85 89 /** … … 131 135 * @return array Hidden Meta Boxes 132 136 */ 133 137 function get_hidden_meta_boxes( $screen ) { 134 if ( is_string( $screen ) ) 138 if ( is_string( $screen ) ) { 135 139 $screen = convert_to_screen( $screen ); 140 } 136 141 137 $hidden = get_user_option( "metaboxhidden_{$screen->id}");142 $hidden = get_user_option( 'metaboxhidden_' . $screen->id ); 138 143 139 144 $use_defaults = ! is_array( $hidden ); 140 145 … … 142 147 if ( $use_defaults ) { 143 148 $hidden = array(); 144 149 if ( 'post' == $screen->base ) { 145 if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type ) 150 if ( 'post' == $screen->post_type || 'page' == $screen->post_type || 'attachment' == $screen->post_type ) { 146 151 $hidden = array('slugdiv', 'trackbacksdiv', 'postcustom', 'postexcerpt', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv'); 147 else152 } else { 148 153 $hidden = array( 'slugdiv' ); 154 } 149 155 } 150 156 151 157 /**