WordPress.org

Make WordPress Core

Ticket #9293: clarify_taxonomy_wp_update_term.diff

File clarify_taxonomy_wp_update_term.diff, 884 bytes (added by simonwheatley, 9 years ago)

Patch to clarify the args for wp_update_term

  • Users/simon/Projects/WordPress/site/wordpress/wp-includes/taxonomy.php

     
    15501550 * @param array|string $args Overwrite term field values
    15511551 * @return array|WP_Error Returns Term ID and Taxonomy Term ID
    15521552 */
    1553 function wp_update_term( $term, $taxonomy, $args = array() ) {
     1553function wp_update_term( $term_id, $taxonomy, $args = array() ) {
    15541554        global $wpdb;
    15551555
    15561556        if ( ! is_taxonomy($taxonomy) )
    15571557                return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
    15581558
    1559         $term_id = (int) $term;
     1559        $term_id = (int) $term_id;
    15601560
    15611561        // First, get all of the original args
    15621562        $term = get_term ($term_id, $taxonomy, ARRAY_A);