get_wp_title_rss example

/** * Filters the blog title for display of the feed title. * * @since 2.2.0 * @since 4.4.0 The `$sep` parameter was deprecated and renamed to `$deprecated`. * * @see get_wp_title_rss() * * @param string $wp_title_rss The current blog title. * @param string $deprecated Unused. */
    echo apply_filters( 'wp_title_rss', get_wp_title_rss()$deprecated );
}

/** * Retrieves the current post title for the feed. * * @since 2.0.0 * * @return string Current post title. */
function get_the_title_rss() {
    $title = get_the_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> <?php         /** This filter is documented in wp-includes/feed-rss2.php */
        echo apply_filters( 'rss_update_period', 'hourly' );
    
> <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() ) : ?> <link rel="alternate" type="<?php bloginfo_rss( 'html_type' ); ?>" href="<?php comments_link_feed(); ?>" /> <link rel="self" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link( '', 'atom' ) ); ?>" /> <id><?php echo esc_url( get_post_comments_feed_link( '', 'atom' ) ); ?></id>
Home | Imprint | This part of the site doesn't use cookies.