X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..refs/tags/wordpress-4.5:/wp-admin/includes/class-wp-screen.php diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index 5910c750..ebd20b89 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -304,6 +304,7 @@ final class WP_Screen { } break; case 'edit-tags' : + case 'term' : if ( null === $post_type && is_object_in_taxonomy( 'post', $taxonomy ? $taxonomy : 'post_tag' ) ) $post_type = 'post'; break; @@ -322,6 +323,7 @@ final class WP_Screen { $id .= '-' . $post_type; break; case 'edit-tags' : + case 'term' : if ( null === $taxonomy ) $taxonomy = 'post_tag'; // The edit-tags ID does not contain the post type. Look for it in the request. @@ -693,7 +695,7 @@ final class WP_Screen { * Default 'Filter items list'. * @type string $heading_pagination Screen reader text for the pagination heading. * Default 'Items list navigation'. - * @type string heading_list Screen reader text for the items list heading. + * @type string $heading_list Screen reader text for the items list heading. * Default 'Items list'. * } */ @@ -1201,6 +1203,8 @@ final class WP_Screen { return; } + $view_mode_post_types = get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) ); + /** * Filter the post types that have different view mode options. * @@ -1209,7 +1213,6 @@ final class WP_Screen { * @param array $view_mode_post_types Array of post types that can change view modes. * Default hierarchical post types with show_ui on. */ - $view_mode_post_types = get_post_types( array( 'hierarchical' => false, 'show_ui' => true ) ); $view_mode_post_types = apply_filters( 'view_mode_post_types', $view_mode_post_types ); if ( ! in_array( $this->post_type, $view_mode_post_types ) ) {