From eea7052df893d61fa9380a331915708d54209e27 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 17 May 2014 14:55:14 +0000 Subject: [PATCH] Eliminate the use of `extract()` in `wp_delete_term()`. See #22400. Built from https://develop.svn.wordpress.org/trunk@28466 git-svn-id: http://core.svn.wordpress.org/trunk@28293 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index c47c85ccaa..f70f119210 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -2059,12 +2059,16 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) { } $args = wp_parse_args($args, $defaults); - extract($args, EXTR_SKIP); - if ( isset( $default ) ) { - $default = (int) $default; - if ( ! term_exists($default, $taxonomy) ) - unset($default); + if ( isset( $args['default'] ) ) { + $default = (int) $args['default']; + if ( ! term_exists( $default, $taxonomy ) ) { + unset( $default ); + } + } + + if ( isset( $args['force_default'] ) ) { + $force_default = $args['force_default']; } // Update children to point to new parent