diff --git wp-admin/includes/class-wp-posts-list-table.php wp-admin/includes/class-wp-posts-list-table.php
index 0c0231b..256b646 100644
|
|
class WP_Posts_List_Table extends WP_List_Table { |
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 | ); |
| 226 | |
| 227 | wp_dropdown_categories( $dropdown_options ); |
| 228 | } |
| 229 | |
217 | 230 | do_action( 'restrict_manage_posts' ); |
218 | 231 | submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); |
219 | 232 | } |
diff --git wp-admin/includes/post.php wp-admin/includes/post.php
index e4866ad..3579087 100644
|
|
function wp_edit_posts_query( $q = false ) { |
860 | 860 | $posts_per_page = apply_filters( $per_page, $posts_per_page ); |
861 | 861 | $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type ); |
862 | 862 | |
863 | | $query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page'); |
| 863 | $query = compact( 'post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page' ); |
| 864 | if ( ! empty( $q['format'] ) ) { |
| 865 | $query['taxonomy'] = 'post_format'; |
| 866 | $term = get_term( $q['format'], $query['taxonomy'] ); |
| 867 | $query['term'] = $term->slug; |
| 868 | } |
864 | 869 | |
865 | 870 | // Hierarchical types require special args. |
866 | 871 | if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) { |