Make WordPress Core


Ignore:
Timestamp:
09/24/2012 08:39:53 PM (12 years ago)
Author:
ryan
Message:

The edit-tags screen ID does not contain the post_type. Fallback to post_type in the REQUEST. Fixes AJAX term addtions from edit-tags.php. fixes #21871

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/screen.php

    r21948 r21982  
    497497                if ( null === $taxonomy )
    498498                    $taxonomy = 'post_tag';
     499                // The edit-tags ID does not contain the post type. Look for it in the request.
     500                if ( null === $post_type ) {
     501                    $post_type = 'post';
     502                    if ( isset( $_REQUEST['post_type'] ) && post_type_exists( $_REQUEST['post_type'] ) )
     503                        $post_type = $_REQUEST['post_type'];
     504                }
     505
    499506                $id = 'edit-' . $taxonomy;
    500507                break;
Note: See TracChangeset for help on using the changeset viewer.