Prevent child categories from being visually promoted to the top level after Quick Edit. props ssamture. fixes #19474

git-svn-id: http://core.svn.wordpress.org/trunk@21191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-06-30 09:00:26 +00:00
parent b66f319c10
commit ab1c5db441

View File

@ -1404,14 +1404,19 @@ function wp_ajax_inline_save_tax() {
wp_die( $tag->get_error_message() ); wp_die( $tag->get_error_message() );
wp_die( __( 'Item not updated.' ) ); wp_die( __( 'Item not updated.' ) );
} }
echo $wp_list_table->single_row( $tag );
} else { } else {
if ( is_wp_error($updated) && $updated->get_error_message() ) if ( is_wp_error($updated) && $updated->get_error_message() )
wp_die( $updated->get_error_message() ); wp_die( $updated->get_error_message() );
wp_die( __( 'Item not updated.' ) ); wp_die( __( 'Item not updated.' ) );
} }
$level = 0;
$parent = $tag->parent;
while ( $parent > 0 ) {
$parent_tag = get_term( $parent, $taxonomy );
$parent = $parent_tag->parent;
$level++;
}
echo $wp_list_table->single_row( $tag, $level );
wp_die(); wp_die();
} }