feed_content_type хук-фильтрWP 2.8.0

Filters the content type for a specific feed type.

Использование

add_filter( 'feed_content_type', 'wp_kama_feed_content_type_filter', 10, 2 );

/**
 * Function for `feed_content_type` filter-hook.
 * 
 * @param string $content_type Content type indicating the type of data that a feed contains.
 * @param string $type         Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.
 *
 * @return string
 */
function wp_kama_feed_content_type_filter( $content_type, $type ){

	// filter...
	return $content_type;
}
$content_type(строка)
Content type indicating the type of data that a feed contains.
$type(строка)
Type of feed. Possible values include 'rss', rss2', 'atom', and 'rdf'.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

feed_content_type()
feed_content_type
wp-includes/feed.php 775
return apply_filters( 'feed_content_type', $content_type, $type );

Где используется хук в WordPress

Использование не найдено.