get_previous_post_excluded_terms хук-фильтрWP 4.4.0

Filters the IDs of terms excluded from adjacent post queries.

Это один из вариантов динамического хука get_(adjacent)_post_excluded_terms

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

add_filter( 'get_previous_post_excluded_terms', 'wp_kama_get_previous_post_excluded_terms_filter' );

/**
 * Function for `get_previous_post_excluded_terms` filter-hook.
 * 
 * @param array|string $excluded_terms Array of excluded term IDs. Empty string if none were provided.
 *
 * @return array|string
 */
function wp_kama_get_previous_post_excluded_terms_filter( $excluded_terms ){

	// filter...
	return $excluded_terms;
}
$excluded_terms(массив|строка)
Array of excluded term IDs. Empty string if none were provided.

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

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

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

get_adjacent_post()
get_previous_post_excluded_terms
wp-includes/link-template.php 1836
$excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms );

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

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