Make WordPress Core

Ticket #22400: wp-delete-term.diff

File wp-delete-term.diff, 873 bytes (added by wonderboymusic, 9 years ago)
  • src/wp-includes/taxonomy.php

     
    20332033        }
    20342034
    20352035        $args = wp_parse_args($args, $defaults);
    2036         extract($args, EXTR_SKIP);
    20372036
    2038         if ( isset( $default ) ) {
    2039                 $default = (int) $default;
     2037        if ( isset( $args['default'] ) ) {
     2038                $default = (int) $args['default'];
    20402039                if ( ! term_exists($default, $taxonomy) )
    20412040                        unset($default);
    20422041        }
     
    20782077                        $terms = array($default);
    20792078                } else {
    20802079                        $terms = array_diff($terms, array($term));
    2081                         if (isset($default) && isset($force_default) && $force_default)
     2080                        if (isset($default) && isset( $args['force_default'] ) && $args['force_default'] )
    20822081                                $terms = array_merge($terms, array($default));
    20832082                }
    20842083                $terms = array_map('intval', $terms);