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

git-svn-id: https://develop.svn.wordpress.org/trunk@21191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2012-06-30 09:00:26 +00:00
parent 29d657c8a0
commit 5268552d72
1 changed files with 8 additions and 3 deletions

View File

@ -1404,14 +1404,19 @@ function wp_ajax_inline_save_tax() {
wp_die( $tag->get_error_message() );
wp_die( __( 'Item not updated.' ) );
}
echo $wp_list_table->single_row( $tag );
} else {
if ( is_wp_error($updated) && $updated->get_error_message() )
wp_die( $updated->get_error_message() );
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();
}