Make WordPress Core

Ticket #10543: wp-includes-taxonomy.php.2.patch

File wp-includes-taxonomy.php.2.patch, 1.2 KB (added by miqrogroove, 15 years ago)

Moves lines to better match 2.9 style.

  • wp-includes/taxonomy.php

     
    10011001                else
    10021002                        $value = esc_attr($value);
    10031003        } else if ( 'db' == $context ) {
     1004                $value = wp_check_invalid_utf8($value, TRUE);
    10041005                $value = apply_filters("pre_term_$field", $value, $taxonomy);
    10051006                $value = apply_filters("pre_${taxonomy}_$field", $value);
    10061007                // Back compat filters
     
    13611362        if ( is_int($term) && 0 == $term )
    13621363                return new WP_Error('invalid_term_id', __('Invalid term ID'));
    13631364
    1364         if ( '' == trim($term) )
    1365                 return new WP_Error('empty_term_name', __('A name is required for this term'));
    1366 
    13671365        $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
    13681366        $args = wp_parse_args($args, $defaults);
    13691367        $args['name'] = $term;
     
    13751373        $name = stripslashes($name);
    13761374        $description = stripslashes($description);
    13771375
     1376        if ( '' == trim($name) )
     1377                return new WP_Error('empty_term_name', __('A name is required for this term'));
     1378
    13781379        if ( empty($slug) )
    13791380                $slug = sanitize_title($name);
    13801381