Ticket #15323: 15323.patch
File 15323.patch, 1.7 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/class-wp-posts-list-table.php
214 214 ); 215 215 wp_dropdown_categories( $dropdown_options ); 216 216 } 217 218 if ( post_type_supports( $this->screen->post_type, 'post-formats' ) ) { 219 $dropdown_options = array( 220 'show_option_all' => __( 'View all formats' ), 221 'orderby' => 'name', 222 'name' => 'format', 223 'taxonomy' => 'post_format', 224 'selected' => isset( $_GET['format'] ) ? $_GET['format'] : 0, 225 'hide_if_empty' => true 226 ); 227 228 wp_dropdown_categories( $dropdown_options ); 229 } 230 217 231 do_action( 'restrict_manage_posts' ); 218 232 submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); 219 233 } -
wp-admin/includes/post.php
868 868 $posts_per_page = apply_filters( $per_page, $posts_per_page ); 869 869 $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type ); 870 870 871 $query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page'); 871 $query = compact( 'post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page' ); 872 if ( ! empty( $q['format'] ) ) { 873 $query['taxonomy'] = 'post_format'; 874 $term = get_term( $q['format'], $query['taxonomy'] ); 875 $query['term'] = $term->slug; 876 } 872 877 873 878 // Hierarchical types require special args. 874 879 if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) {