WordPress.org

Make WordPress Core

Ticket #25503: 25503-patch.diff

File 25503-patch.diff, 1.4 KB (added by ben.moody, 8 years ago)
  • wp-includes/category.php

    From f447b7caf23c5a5bee473ed046fe75e38cf0d21d Mon Sep 17 00:00:00 2001
    From: BENJAMIN MOODY <hireme@benjaminmoody.com>
    Date: Sun, 6 Oct 2013 17:41:55 -0400
    Subject: [PATCH] Comments for wp-includes/category.php filters
    
    ---
     wp-includes/category.php | 20 ++++++++++++++++++--
     1 file changed, 18 insertions(+), 2 deletions(-)
    
    diff --git a/wp-includes/category.php b/wp-includes/category.php
    index 1bddce3..44e61e9 100644
    a b function get_all_category_ids() { 
    3939function get_categories( $args = '' ) {
    4040        $defaults = array( 'taxonomy' => 'category' );
    4141        $args = wp_parse_args( $args, $defaults );
    42 
     42       
     43        /**
     44         * Filter the taxonomy used to retrieve terms when calling get_categories
     45         *
     46         * @since 2.7
     47         *
     48         * @param string $args['taxonomy'] taxonomy to retrieve terms from
     49         * @param array $args array of args being passed to get_terms() function
     50         */
    4351        $taxonomy = apply_filters( 'get_categories_taxonomy', $args['taxonomy'], $args );
    4452
    4553        // Back compat
    function get_tags( $args = '' ) { 
    262270                $return = array();
    263271                return $return;
    264272        }
    265 
     273       
     274        /**
     275         * Filter the array of term objects returned for 'post_tag' taxonomy
     276         *
     277         * @since 2.3
     278         *
     279         * @param array $tags Array of 'post_tag' term objects
     280         * @param array $args Array of args passed to get_terms() function
     281         */
    266282        $tags = apply_filters( 'get_tags', $tags, $args );
    267283        return $tags;
    268284}