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
This commit is contained in:
Scott Taylor 2014-05-17 14:55:14 +00:00
parent bec9993f38
commit eea7052df8
1 changed files with 9 additions and 5 deletions

View File

@ -2059,13 +2059,17 @@ 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
if ( is_taxonomy_hierarchical($taxonomy) ) { if ( is_taxonomy_hierarchical($taxonomy) ) {