Ticket #10543: wp-includes-taxonomy.php.patch
File wp-includes-taxonomy.php.patch, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/taxonomy.php
1003 1003 // Back compat filters 1004 1004 if ( 'slug' == $field ) 1005 1005 $value = apply_filters('pre_category_nicename', $value); 1006 // DB validation 1007 $value = wp_check_invalid_utf8($value, TRUE); 1006 1008 1007 1009 } else if ( 'rss' == $context ) { 1008 1010 $value = apply_filters("term_${field}_rss", $value, $taxonomy); … … 1358 1360 if ( is_int($term) && 0 == $term ) 1359 1361 return new WP_Error('invalid_term_id', __('Invalid term ID')); 1360 1362 1361 if ( '' == trim($term) )1362 return new WP_Error('empty_term_name', __('A name is required for this term'));1363 1364 1363 $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => ''); 1365 1364 $args = wp_parse_args($args, $defaults); 1366 1365 $args['name'] = $term; … … 1368 1367 $args = sanitize_term($args, $taxonomy, 'db'); 1369 1368 extract($args, EXTR_SKIP); 1370 1369 1370 if ( '' == trim($name) ) 1371 return new WP_Error('empty_term_name', __('A name is required for this term')); 1372 1371 1373 // expected_slashed ($name) 1372 1374 $name = stripslashes($name); 1373 1375 $description = stripslashes($description);