Make WordPress Core


Ignore:
Timestamp:
02/05/2008 06:47:27 AM (17 years ago)
Author:
ryan
Message:

Trailing whitespace cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r6660 r6726  
    3232 * @subpackage Taxonomy
    3333 * @since 2.3
    34  * 
     34 *
    3535 * @uses $wp_taxonomies
    3636 *
     
    8181 * @subpackage Taxonomy
    8282 * @since 2.3
    83  * 
     83 *
    8484 * @uses $wp_taxonomies
    8585 *
     
    140140 * @since 2.3
    141141 * @uses $wp_taxonomies Inserts new taxonomy object into the list
    142  * 
     142 *
    143143 * @param string $taxonomy Name of taxonomy object
    144144 * @param string $object_type Name of the object type for the taxonomy object.
     
    276276        }
    277277    }
    278    
     278
    279279    $_term = apply_filters('get_term', $_term, $taxonomy);
    280280    $_term = apply_filters("get_$taxonomy", $_term, $taxonomy);
     
    363363 *
    364364 * Will return an empty array if $term does not exist in $taxonomy.
    365  * 
     365 *
    366366 * @package WordPress
    367367 * @subpackage Taxonomy
     
    397397/**
    398398 * get_term_field() - Get sanitized Term field
    399  * 
     399 *
    400400 * Does checks for $term, based on the $taxonomy. The function is for
    401401 * contextual reasons and for simplicity of usage. See sanitize_term_field() for
     
    434434 * Return value is sanitize_term() and usage is for sanitizing the term
    435435 * for editing. Function is for contextual and simplicity.
    436  * 
     436 *
    437437 * @package WordPress
    438438 * @subpackage Taxonomy
     
    630630        if( $offset )
    631631            $number = 'LIMIT ' . $offset . ',' . $number;
    632         else 
     632        else
    633633            $number = 'LIMIT ' . $number;
    634        
     634
    635635    } else
    636636        $number = '';
     
    810810        if ( 'slug' == $field )
    811811            $value = apply_filters('pre_category_nicename', $value);
    812            
     812
    813813    } else if ( 'rss' == $context ) {
    814814        $value = apply_filters("term_${field}_rss", $value, $taxonomy);
     
    10331033    else if ( 'ids' == $fields )
    10341034        $select_this = 't.term_id';
    1035     else if ( 'names' == $fields ) 
     1035    else if ( 'names' == $fields )
    10361036        $select_this = 't.name';
    10371037    else if ( 'all_with_object_id' == $fields )
     
    11761176/**
    11771177 * wp_set_object_terms() - Create Term and Taxonomy Relationships
    1178  * 
     1178 *
    11791179 * Relates an object (post, link etc) to a term and taxonomy type. Creates the term and taxonomy
    11801180 * relationship if it doesn't already exist. Creates a term if it doesn't exist (using the slug).
     
    12141214        if ( !strlen(trim($term)) )
    12151215            continue;
    1216        
     1216
    12171217        if ( !$id = is_term($term, $taxonomy) )
    12181218            $id = wp_insert_term($term, $taxonomy);
     
    12441244/**
    12451245 * wp_unique_term_slug() - Will make slug unique, if it isn't already
    1246  * 
     1246 *
    12471247 * The $slug has to be unique global to every taxonomy, meaning that one taxonomy
    12481248 * term can't have a matching slug with another taxonomy term. Each slug has to be
     
    12541254 * If that still doesn't return an unique slug, then it try to append a number until
    12551255 * it finds a number that is truely unique.
    1256  * 
     1256 *
    12571257 * The only purpose for $term is for appending a parent, if one exists.
    12581258 *
     
    14211421function wp_defer_term_counting($defer=NULL) {
    14221422    static $_defer = false;
    1423    
     1423
    14241424    if ( is_bool($defer) ) {
    14251425        $_defer = $defer;
     
    14281428            wp_update_term_count( NULL, NULL, true );
    14291429    }
    1430    
     1430
    14311431    return $_defer;
    14321432}
     
    14341434/**
    14351435 * wp_update_term_count() - Updates the amount of terms in taxonomy
    1436  * 
     1436 *
    14371437 * If there is a taxonomy callback applyed, then it will be called for updating the count.
    14381438 *
     
    14711471        return true;
    14721472    }
    1473    
     1473
    14741474    return wp_update_term_count_now( $terms, $taxonomy );
    14751475}
     
    16011601 *
    16021602 * It should be noted that update_object_term_cache() is very time extensive.
    1603  * It is advised that the function is not called very often or at least not 
     1603 * It is advised that the function is not called very often or at least not
    16041604 * for a lot of terms that exist in a lot of taxonomies. The amount of time
    16051605 * increases for each term and it also increases for each taxonomy the term
     
    16131613 * @param string|array $object_ids Single or list of term object ID(s)
    16141614 * @param string $object_type The taxonomy object type
    1615  * @return null|bool Null value is given with empty $object_ids. False if 
     1615 * @return null|bool Null value is given with empty $object_ids. False if
    16161616 */
    16171617function update_object_term_cache($object_ids, $object_type) {
     
    17201720/**
    17211721 * _get_term_children() - Get array of child terms
    1722  * 
     1722 *
    17231723 * If $terms is an array of objects, then objects will returned from the function.
    17241724 * If $terms is an array of IDs, then an array of ids of children will be returned.
     
    17761776/**
    17771777 * _pad_term_counts() - Add count of children to parent count
    1778  * 
     1778 *
    17791779 * Recalculates term counts by including items from child terms.
    17801780 * Assumes all relevant children are already in the $terms argument
     
    18271827    }
    18281828
    1829     // Transfer the touched cells 
     1829    // Transfer the touched cells
    18301830    foreach ( (array) $term_items as $id => $items )
    18311831        if ( isset($terms_by_id[$id]) )
     
    18391839/**
    18401840 * _update_post_term_count() - Will update term count based on posts
    1841  * 
     1841 *
    18421842 * Private function for the default callback for post_tag and category taxonomies.
    18431843 *
Note: See TracChangeset for help on using the changeset viewer.