feed_content_type

Definition:
function feed_content_type( $type = '' ) {}

Return the content type for specified feed type.

Parameters

  • $type

Defined filters

  • feed_content_type
    apply_filters( 'feed_content_type', $content_type, $type )

Source code

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 );

}

1052

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: