Use taxnow to determine the taxonomy for GET and POST requests in edit-tags.php. Props nacin. fixes #19131

git-svn-id: https://develop.svn.wordpress.org/trunk@19253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2011-11-11 15:44:16 +00:00
parent 56c8b5dad5
commit 3ff917e415
1 changed files with 2 additions and 8 deletions

View File

@ -9,16 +9,10 @@
/** WordPress Administration Bootstrap */
require_once('./admin.php');
if ( ! isset( $_GET['taxonomy'] ) )
$taxonomy = 'post_tag';
elseif ( in_array( $_GET['taxonomy'], get_taxonomies() ) )
$taxonomy = sanitize_key( $_GET['taxonomy'] );
else
if ( ! $taxnow )
wp_die( __( 'Invalid taxonomy' ) );
$_GET['taxonomy'] = $taxonomy;
$tax = get_taxonomy( $taxonomy );
$tax = get_taxonomy( $taxnow );
if ( ! $tax )
wp_die( __( 'Invalid taxonomy' ) );