Switch language

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




get_post_type_archive_feed_link [ WordPress Function ]

get_post_type_archive_feed_link ( $post_type, $feed = '' )
Parameters:
  • (string) $post_type Post type
  • (string) $feed Optional. Feed type
Returns:
  • (string)
Defined at:



Retrieve the permalink for a post type archive feed.

Source


<?php
function get_post_type_archive_feed_link$post_type$feed '' ) {
    
$default_feed get_default_feed();
    if ( empty( 
$feed ) )
        
$feed $default_feed;

    if ( ! 
$link get_post_type_archive_link$post_type ) )
        return 
false;
    
$post_type_obj get_post_type_object$post_type );
    if ( 
$post_type_obj->rewrite['feeds'] && get_option'permalink_structure' ) ) {
        
$link trailingslashit($link);
        
$link .= 'feed/';
        if ( 
$feed != $default_feed )
            
$link .= "$feed/";
    } else {
        
$link add_query_arg'feed'$feed$link );
    }

    return 
apply_filters'post_type_archive_feed_link'$link$feed );
}
?>

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