WordPress.org

Make WordPress Core

Ticket #9293: 9293.patch

File 9293.patch, 1.0 KB (added by johnbillion, 6 years ago)

Refreshed patch

  • wp-includes/taxonomy.php

     
    15711571 * @uses apply_filters() Will call the 'term_id_filter' filter and pass the term 
    15721572 *      id and taxonomy id. 
    15731573 * 
    1574  * @param int $term The ID of the term 
     1574 * @param int $term_id The ID of the term 
    15751575 * @param string $taxonomy The context in which to relate the term to the object. 
    15761576 * @param array|string $args Overwrite term field values 
    15771577 * @return array|WP_Error Returns Term ID and Taxonomy Term ID 
    15781578 */ 
    1579 function wp_update_term( $term, $taxonomy, $args = array() ) { 
     1579function wp_update_term( $term_id, $taxonomy, $args = array() ) { 
    15801580        global $wpdb; 
    15811581 
    15821582        if ( ! is_taxonomy($taxonomy) ) 
    15831583                return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 
    15841584 
    1585         $term_id = (int) $term; 
     1585        $term_id = (int) $term_id; 
    15861586 
    15871587        // First, get all of the original args 
    15881588        $term = get_term ($term_id, $taxonomy, ARRAY_A);