WordPress.org

Make WordPress Core

Ticket #17955: 17955.2.diff

File 17955.2.diff, 434 bytes (added by kawauso, 3 years ago)

Just count() arrays

  • wp-includes/taxonomy.php

     
    11541154        if ( !is_array($taxonomies) ) { 
    11551155                $single_taxonomy = true; 
    11561156                $taxonomies = array($taxonomies); 
     1157        } elseif ( 1 == count( $taxonomies ) ) { 
     1158                $single_taxonomy = true; 
    11571159        } 
    11581160 
    11591161        foreach ( $taxonomies as $taxonomy ) {