Make WordPress Core

Ticket #27489: taxonomy._doing_it_wrong.diff

File taxonomy._doing_it_wrong.diff, 688 bytes (added by jackreichert, 12 years ago)

doing it wrong implementation

  • wp-includes/taxonomy.php

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy.php
    index 410e762..f37c695 100644
    function get_taxonomy( $taxonomy ) {  
    220220function taxonomy_exists( $taxonomy ) {
    221221        global $wp_taxonomies;
    222222
     223    if (! is_string($taxonomy))
     224        _doing_it_wrong(__FUNCTION__, 'This function will only accept a string as a parameter.', '3.9');
     225
    223226        return isset( $wp_taxonomies[$taxonomy] );
    224227}
    225228
    function wp_check_term_hierarchy_for_loops( $parent, $term_id, $taxonomy ) {  
    34053408                wp_update_term( $loop_member, $taxonomy, array( 'parent' => 0 ) );
    34063409
    34073410        return $parent;
    3408 }
    3409  No newline at end of file
     3411}