close_comments_for_post_types хук-фильтрWP 3.2.0

Filters the list of post types to automatically close comments for.

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

add_filter( 'close_comments_for_post_types', 'wp_kama_close_comments_for_post_types_filter' );

/**
 * Function for `close_comments_for_post_types` filter-hook.
 * 
 * @param string[] $post_types An array of post type names.
 *
 * @return string[]
 */
function wp_kama_close_comments_for_post_types_filter( $post_types ){

	// filter...
	return $post_types;
}
$post_types(string[])
An array of post type names.

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

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

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

_close_comments_for_old_posts()
close_comments_for_post_types
_close_comments_for_old_post()
close_comments_for_post_types
wp-includes/comment.php 3377
$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
wp-includes/comment.php 3422
$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );

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

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