Make WordPress Core

Ticket #18785: 18785.7.diff

File 18785.7.diff, 511 bytes (added by ryan, 13 years ago)

post_type must be registered for the taxonomy.

  • wp-admin/includes/screen.php

     
    466466                                        break;
    467467                        }
    468468                }
    469  
     469
     470                // The post_type must be registed for the taxonomy.
     471                if ( $taxonomy && $post_type ) {
     472                        if ( ! in_array( $taxonomy , get_object_taxonomies( $post_type ) ) )
     473                                $post_type = '';
     474                }
     475
    470476                switch ( $base ) {
    471477                        case 'post' :
    472478                                if ( ! $post_type )