Eliminate the use of extract() in wp_delete_term().

See #22400.


git-svn-id: https://develop.svn.wordpress.org/trunk@28466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-17 14:54:03 +00:00
parent 06c87f681a
commit ff8ae69fce

View File

@ -2059,12 +2059,16 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
} }
$args = wp_parse_args($args, $defaults); $args = wp_parse_args($args, $defaults);
extract($args, EXTR_SKIP);
if ( isset( $default ) ) { if ( isset( $args['default'] ) ) {
$default = (int) $default; $default = (int) $args['default'];
if ( ! term_exists($default, $taxonomy) ) if ( ! term_exists( $default, $taxonomy ) ) {
unset($default); unset( $default );
}
}
if ( isset( $args['force_default'] ) ) {
$force_default = $args['force_default'];
} }
// Update children to point to new parent // Update children to point to new parent