Make WordPress Core


Ignore:
Timestamp:
02/07/2012 06:06:12 PM (12 years ago)
Author:
nacin
Message:

Allow localized commas to be used as tag separators. see #7897.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r19720 r19853  
    303303                continue;
    304304            if ( is_taxonomy_hierarchical( $tax_name ) ) {
    305                 $tax_input[$tax_name] = array_map( 'absint', $terms );
     305                $tax_input[ $tax_name ] = array_map( 'absint', $terms );
    306306            } else {
    307                 $tax_input[$tax_name] = preg_replace( '/\s*,\s*/', ',', rtrim( trim($terms), ' ,' ) );
    308                 $tax_input[$tax_name] = explode(',', $tax_input[$tax_name]);
     307                $comma = _x( ',', 'tag delimiter' );
     308                if ( ',' !== $comma )
     309                    $terms = str_replace( $comma, ',', $terms );
     310                $tax_input[ $tax_name ] = explode( ',', trim( $terms, " \n\t\r\0\x0B," ) );
    309311            }
    310312        }
Note: See TracChangeset for help on using the changeset viewer.