функция
since 2.9.0
get_the_content_feed()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_the_content_feed( string $feed_type = null ): string
Описание
См. alsoget_the_content()
Оригинал (английский)
Параметры
$feed_type
string
необязательный
= null
Тип ленты. rss2 | atom | rss | rdf
Возвращаемое значение
string
Исходный код
wp-includes/feed.php:190
function get_the_content_feed( $feed_type = null ) {
if ( ! $feed_type ) {
$feed_type = get_default_feed();
}
/** This filter is documented in wp-includes/post-template.php */
$content = apply_filters( 'the_content', get_the_content() );
$content = str_replace( ']]>', ']]>', $content );
/**
* Filters the post content for use in feeds.
*
* @since 2.9.0
*
* @param string $content The current post content.
* @param string $feed_type Type of feed. Possible values include 'rss2', 'atom'.
* Default 'rss2'.
*/
return apply_filters( 'the_content_feed', $content, $feed_type );
}
История изменений
| Версия | Описание |
|---|---|
| 2.9.0 | Introduced. |

