Make WordPress Core

Ticket #34861: core.34861.0.patch

File core.34861.0.patch, 1.2 KB (added by bordoni, 9 years ago)

PHP Code Std + Docblock changes

  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index f361c3b..7f86a53 100644
    a b function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) { 
    20052005 * @since 2.3.0
    20062006 *
    20072007 * @param string       $taxonomy Taxonomy name
    2008  * @param array|string $args     Overwrite defaults. See get_terms()
     2008 * @param array|string $args     Overwrite defaults. See {@see 'get_terms'} for details.
     2009 *
    20092010 * @return array|int|WP_Error How many terms are in $taxonomy. WP_Error if $taxonomy does not exist.
    20102011 */
    20112012function wp_count_terms( $taxonomy, $args = array() ) {
    2012         $defaults = array('hide_empty' => false);
    2013         $args = wp_parse_args($args, $defaults);
     2013        $defaults = array( 'hide_empty' => false );
     2014        $args = wp_parse_args( $args, $defaults );
    20142015
    20152016        // backwards compatibility
    2016         if ( isset($args['ignore_empty']) ) {
     2017        if ( isset( $args['ignore_empty'] ) ) {
    20172018                $args['hide_empty'] = $args['ignore_empty'];
    2018                 unset($args['ignore_empty']);
     2019                unset( $args['ignore_empty'] );
    20192020        }
    20202021
    20212022        $args['fields'] = 'count';
    20222023
    2023         return get_terms($taxonomy, $args);
     2024        return get_terms( $taxonomy, $args );
    20242025}
    20252026
    20262027/**