Make WordPress Core


Ignore:
Timestamp:
02/12/2009 08:00:29 AM (17 years ago)
Author:
azaozz
Message:

Custom taxonomies support: quick edit, delete, show in the menu

File:
1 edited

Legend:

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

    r10555 r10557  
    10841084            break;
    10851085        case 'tag' :
    1086             $updated = wp_update_term($id, 'post_tag', $_POST);
     1086            if ( !empty($_POST['taxonomy']) )
     1087                $taxonomy = $_POST['taxonomy'];
     1088            else
     1089                $taxonomy = 'post_tag';
     1090
     1091            $updated = wp_update_term($id, $taxonomy, $_POST);
    10871092            if ( $updated && !is_wp_error($updated) ) {
    1088                 $tag = get_term( $updated['term_id'], 'post_tag' );
     1093                $tag = get_term( $updated['term_id'], $taxonomy );
    10891094                if ( !$tag || is_wp_error( $tag ) )
    10901095                    die( __('Tag not updated.') );
Note: See TracChangeset for help on using the changeset viewer.