Ticket #22222: 22222.4.patch
File 22222.4.patch, 4.3 KB (added by , 8 years ago) |
---|
-
src/wp-admin/edit.php
195 195 '<ul>' . 196 196 '<li>' . __('You can hide/display columns based on your needs and decide how many posts to list per screen using the Screen Options tab.') . '</li>' . 197 197 '<li>' . __('You can filter the list of posts by post status using the text links in the upper left to show All, Published, Draft, or Trashed posts. The default view is to show all posts.') . '</li>' . 198 '<li>' . __('You can view posts in a simple title list or with an excerpt . Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' .198 '<li>' . __('You can view posts in a simple title list or with an excerpt using the Screen Options tab.') . '</li>' . 199 199 '<li>' . __('You can refine the list to show only posts in a specific category or from a specific month by using the dropdown menus above the posts list. Click the Filter button after making your selection. You also can refine the list by clicking on the post author, category or tag in the posts list.') . '</li>' . 200 200 '</ul>' 201 201 ) ); -
src/wp-admin/includes/class-wp-posts-list-table.php
498 498 global $mode; 499 499 500 500 parent::pagination( $which ); 501 502 if ( 'top' === $which && ! is_post_type_hierarchical( $this->screen->post_type ) )503 $this->view_switcher( $mode );504 501 } 505 502 506 503 /** -
src/wp-admin/includes/class-wp-screen.php
969 969 */ 970 970 public function render_screen_options( $options = array() ) { 971 971 global $wp_meta_boxes; 972 global $mode; 972 973 $options = wp_parse_args( $options, array( 973 974 'wrap' => true, 974 975 ) ); … … 1035 1036 </div> 1036 1037 <?php endif; 1037 1038 1039 /** 1040 * Filter the post types that have different view mode options. 1041 * 1042 * @since 4.4.0 1043 * 1044 * @param array $view_mode_post_types Array of post types that can change view modes. 1045 */ 1046 $view_mode_post_types = apply_filters( 'view_mode_post_types', get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) ) ); 1047 if ( in_array( $this->post_type, $view_mode_post_types ) ) { ?> 1048 <div class="view-modes"> 1049 <h5><?php _e( 'View Mode' ); ?></h5> 1050 <label for="list-view-mode"> 1051 <input id="list-view-mode" type="radio" name="mode" value="list" <?php checked( 'list', $mode ); ?> /> 1052 <?php _e( 'List View' ); ?> 1053 </label> 1054 <label for="excerpt-view-mode"> 1055 <input id="excerpt-view-mode" type="radio" name="mode" value="excerpt" <?php checked( 'excerpt', $mode ); ?> /> 1056 <?php _e( 'Excerpt View' ); ?> 1057 </label> 1058 </div> 1059 <?php } 1038 1060 $this->render_screen_layout(); 1039 1061 $this->render_per_page_options(); 1040 1062 echo $this->_screen_settings; … … 1130 1152 <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]" 1131 1153 id="<?php echo esc_attr( $option ); ?>" maxlength="3" 1132 1154 value="<?php echo esc_attr( $per_page ); ?>" /> 1133 <?php endif; 1155 <?php endif; ?> 1134 1156 1135 echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?>1157 <p><?php echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?></p> 1136 1158 <input type="hidden" name="wp_screen_options[option]" value="<?php echo esc_attr( $option ); ?>" /> 1137 1159 </div> 1138 1160 <?php -
src/wp-admin/includes/misc.php
459 459 } 460 460 461 461 update_user_meta($user->ID, $option, $value); 462 wp_safe_redirect( remove_query_arg( array('pagenum', 'apage', 'paged'), wp_get_referer() ) ); 462 463 $url = remove_query_arg( array( 'pagenum', 'apage', 'paged' ), wp_get_referer() ); 464 if ( isset( $_POST['mode'] ) ) { 465 $url = add_query_arg( array( 'mode' => $_POST['mode'] ), $url ); 466 } 467 468 wp_safe_redirect( $url ); 463 469 exit; 464 470 } 465 471 }