get_category_feed_link example

if ( $show_category_feed ) {
            $term = get_queried_object();

            if ( $term ) {
                $title = sprintf(
                    $args['cattitle'],
                    get_bloginfo( 'name' ),
                    $args['separator'],
                    $term->name
                );

                $href = get_category_feed_link( $term->term_id );
            }
        }
    } elseif ( is_tag() ) {
        /** * Filters whether to display the tag feed link. * * @since 6.1.0 * * @param bool $show Whether to display the tag feed link. Default true. */
        $show_tag_feed = apply_filters( 'feed_links_extra_show_tag_feed', true );

        
$cats = get_categories( array( 'get' => 'all' ) );
        if ( $cats ) {
            foreach ( $cats as $cat ) {
                $struct                        = array();
                $struct['categoryId']          = $cat->term_id;
                $struct['parentId']            = $cat->parent;
                $struct['description']         = $cat->name;
                $struct['categoryDescription'] = $cat->description;
                $struct['categoryName']        = $cat->name;
                $struct['htmlUrl']             = esc_html( get_category_link( $cat->term_id ) );
                $struct['rssUrl']              = esc_html( get_category_feed_link( $cat->term_id, 'rss2' ) );

                $categories_struct[] = $struct;
            }
        }

        return $categories_struct;
    }

    /** * Uploads a file, following your settings. * * Adapted from a patch by Johann Richard. * * @link http://mycvs.org/archives/2004/06/30/file-upload-to-wordpress-in-ecto/ * * @since 1.5.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param array $args { * Method arguments. Note: arguments must be ordered as documented. * * @type int $0 Blog ID (unused). * @type string $1 Username. * @type string $2 Password. * @type array $3 Data. * } * @return array|IXR_Error */

function get_category_rss_link($display = false, $cat_id = 1) {
    _deprecated_function( __FUNCTION__, '2.5.0', 'get_category_feed_link()' );

    $link = get_category_feed_link($cat_id, 'rss2');

    if ( $display )
        echo $link;
    return $link;
}

/** * Print/Return link to author RSS feed. * * @since 1.2.0 * @deprecated 2.5.0 Use get_author_feed_link() * @see get_author_feed_link() * * @param bool $display * @param int $author_id * @return string */
Home | Imprint | This part of the site doesn't use cookies.