get_bloginfo_rss example

function bloginfo_rss( $show = '' ) {
    /** * Filters the bloginfo for display in RSS feeds. * * @since 2.1.0 * * @see get_bloginfo() * * @param string $rss_container RSS container for the blog information. * @param string $show The type of blog information to retrieve. */
    echo apply_filters( 'bloginfo_rss', get_bloginfo_rss( $show )$show );
}

/** * Retrieves the default feed. * * The default feed is 'rss2', unless a plugin changes it through the * {@see 'default_feed'} filter. * * @since 2.5.0 * * @return string Default feed, or for example 'rss2', 'atom', etc. */

        do_action( 'atom_comments_ns' );
    ?> > <title type="text"> <?php     if ( is_singular() ) {
        /* translators: Comments feed title. %s: Post title. */
        printf( ent2ncr( __( 'Comments on %s' ) )get_the_title_rss() );
    } elseif ( is_search() ) {
        /* translators: Comments feed title. 1: Site title, 2: Search query. */
        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) )get_bloginfo_rss( 'name' )get_search_query() );
    } else {
        /* translators: Comments feed title. %s: Site title. */
        printf( ent2ncr( __( 'Comments for %s' ) )get_wp_title_rss() );
    }
    ?> </title> <subtitle type="text"><?php bloginfo_rss( 'description' ); ?></subtitle> <updated><?php echo get_feed_build_date( 'Y-m-d\TH:i:s\Z' ); ?></updated> <?php if ( is_singular() ) : ?>
do_action( 'rss2_comments_ns' );
    ?> > <channel> <title> <?php     if ( is_singular() ) {
        /* translators: Comments feed title. %s: Post title. */
        printf( ent2ncr( __( 'Comments on: %s' ) )get_the_title_rss() );
    } elseif ( is_search() ) {
        /* translators: Comments feed title. 1: Site title, 2: Search query. */
        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) )get_bloginfo_rss( 'name' )get_search_query() );
    } else {
        /* translators: Comments feed title. %s: Site title. */
        printf( ent2ncr( __( 'Comments for %s' ) )get_wp_title_rss() );
    }
    ?> </title> <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" /> <link><?php ( is_single() ) ? the_permalink_rss() : bloginfo_rss( 'url' ); ?></link> <description><?php bloginfo_rss( 'description' ); ?></description> <lastBuildDate><?php echo get_feed_build_date( 'r' ); ?></lastBuildDate> <sy:updatePeriod>

    }

    switch ( $type ) {
        case 'html':
            $gen = '<meta name="generator" content="WordPress ' . esc_attr( get_bloginfo( 'version' ) ) . '">';
            break;
        case 'xhtml':
            $gen = '<meta name="generator" content="WordPress ' . esc_attr( get_bloginfo( 'version' ) ) . '" />';
            break;
        case 'atom':
            $gen = '<generator uri="https://wordpress.org/" version="' . esc_attr( get_bloginfo_rss( 'version' ) ) . '">WordPress</generator>';
            break;
        case 'rss2':
            $gen = '<generator>' . sanitize_url( 'https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) ) . '</generator>';
            break;
        case 'rdf':
            $gen = '<admin:generatorAgent rdf:resource="' . sanitize_url( 'https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) ) . '" />';
            break;
        case 'comment':
            $gen = '<!-- generator="WordPress/' . esc_attr( get_bloginfo( 'version' ) ) . '" -->';
            break;
        case 'export':
            

    function wxr_site_url() {
        if ( is_multisite() ) {
            // Multisite: the base URL.             return network_home_url();
        } else {
            // WordPress (single site): the site URL.             return get_bloginfo_rss( 'url' );
        }
    }

    /** * Outputs a cat_name XML tag from a given category object. * * @since 2.1.0 * * @param WP_Term $category Category Object. */
    function wxr_cat_name( $category ) {
        
Home | Imprint | This part of the site doesn't use cookies.