WordPress.org

Make WordPress Core

Changeset 21191


Ignore:
Timestamp:
06/30/12 09:00:26 (22 months ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

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

    r21071 r21191  
    14051405            wp_die( __( 'Item not updated.' ) ); 
    14061406        } 
    1407  
    1408         echo $wp_list_table->single_row( $tag ); 
    14091407    } else { 
    14101408        if ( is_wp_error($updated) && $updated->get_error_message() ) 
     
    14121410        wp_die( __( 'Item not updated.' ) ); 
    14131411    } 
    1414  
     1412    $level = 0; 
     1413    $parent = $tag->parent; 
     1414    while ( $parent > 0 ) { 
     1415        $parent_tag = get_term( $parent, $taxonomy ); 
     1416        $parent = $parent_tag->parent; 
     1417        $level++;  
     1418    } 
     1419    echo $wp_list_table->single_row( $tag, $level ); 
    14151420    wp_die(); 
    14161421} 
Note: See TracChangeset for help on using the changeset viewer.