WordPress.org

Make WordPress Core

Ticket #49632: 49632.diff

File 49632.diff, 1.1 KB (added by sebastienserre, 3 months ago)
  • wp-includes/taxonomy.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    338338 *
    339339 * @global array $wp_taxonomies Registered taxonomies.
    340340 *
    341  * @param string       $taxonomy    Taxonomy key, must not exceed 32 characters.
     341 * @param string       $taxonomy    Taxonomy key, must not exceed 32 characters, lower case.
    342342 * @param array|string $object_type Object type or array of object types with which the taxonomy should be associated.
    343343 * @param array|string $args        {
    344344 *     Optional. Array or query string of arguments for registering a taxonomy.
     
    414414function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
    415415        global $wp_taxonomies;
    416416
     417        if ( ! empty( $taxonomy ) ) {
     418                $taxonomy = strtolower( $taxonomy );
     419        }
     420
    417421        if ( ! is_array( $wp_taxonomies ) ) {
    418422                $wp_taxonomies = array();
    419423        }