Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




feed_links [ WordPress Function ]

feed_links ( $args = array() )
Parameters:
  • (array) $args Optional arguments.
Defined at:



Display the links to the general feeds.

Source


<?php
function feed_links$args = array() ) {
    if ( !
current_theme_supports('automatic-feed-links') )
        return;

    
$defaults = array(
        
/* translators: Separator between blog name and feed type in feed links */
        
'separator'    => _x('&raquo;''feed link'),
        
/* translators: 1: blog title, 2: separator (raquo) */
        
'feedtitle'    => __('%1$s %2$s Feed'),
        
/* translators: %s: blog title, 2: separator (raquo) */
        
'comstitle'    => __('%1$s %2$s Comments Feed'),
    );

    
$args wp_parse_args$args$defaults );

    echo 
'<link rel="alternate" type="' feed_content_type() . '" title="' esc_attr(sprintf$args['feedtitle'], get_bloginfo('name'), $args['separator'] )) . '" href="' get_feed_link() . "\" />\n";
    echo 
'<link rel="alternate" type="' feed_content_type() . '" title="' esc_attr(sprintf$args['comstitle'], get_bloginfo('name'), $args['separator'] )) . '" href="' get_feed_link'comments_' get_default_feed() ) . "\" />\n";
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics