Switch language

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




feed_content_type [ WordPress Function ]

feed_content_type ( $type = '' )
Defined at:



Return the content type for specified feed type.

Source


<?php
function feed_content_type$type '' ) {
    if ( empty(
$type) )
        
$type get_default_feed();

    
$types = array(
        
'rss'  => 'application/rss+xml',
        
'rss2' => 'application/rss+xml',
        
'rss-http'  => 'text/xml',
        
'atom' => 'application/atom+xml',
        
'rdf'  => 'application/rdf+xml'
    
);

    
$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';

    return 
apply_filters'feed_content_type'$content_type$type );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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