]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-wp-screen.php
WordPress 4.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-screen.php
index 5910c7502499d66a304eda37bcb0c6b793927872..ebd20b895a7c0939484d66c38d2d44a6e0978c6c 100644 (file)
@@ -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 ) ) {