feed_links_extra_show_post_comments_feed хук-фильтрWP 6.1.0

Filters whether to display the post comments feed link.

This filter allows to enable or disable the feed link for a singular post in a way that is independent of feed_links_show_comments_feed (which controls the global comments feed). The result of that filter is accepted as a parameter.

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

add_filter( 'feed_links_extra_show_post_comments_feed', 'wp_kama_feed_links_extra_show_post_comments_filter' );

/**
 * Function for `feed_links_extra_show_post_comments_feed` filter-hook.
 * 
 * @param bool $show_comments_feed Whether to display the post comments feed link.
 *
 * @return bool
 */
function wp_kama_feed_links_extra_show_post_comments_filter( $show_comments_feed ){

	// filter...
	return $show_comments_feed;
}
$show_comments_feed(true|false)
Whether to display the post comments feed link.
По умолчанию: {@see 'feed_links_show_comments_feed'} filter result

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

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

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

feed_links_extra()
feed_links_extra_show_post_comments_feed
wp-includes/general-template.php 3183
$show_post_comments_feed = apply_filters( 'feed_links_extra_show_post_comments_feed', $show_comments_feed );

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

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