WordPress.org

Make WordPress Core

Ticket #14910: sanitize_key-for-taxonomies.patch

File sanitize_key-for-taxonomies.patch, 433 bytes (added by WraithKenny, 3 years ago)

Use sanitize_key in register_taxonomy for compatibilty with register_post_type

  • wp-includes/taxonomy.php

     
    346346        unset( $args['capabilities'] ); 
    347347 
    348348        $args['name'] = $taxonomy; 
     349        $object_type = sanitize_key($object_type); 
    349350        $args['object_type'] = (array) $object_type; 
    350351 
    351352        $args['labels'] = get_taxonomy_labels( (object) $args );