wpseo_should_build_and_save_user_indexable хук-фильтрYoast 1.0

Filter: Include or exclude a user from being build and saved as an indexable. Return an Author_Not_Built_Exception when the indexable should not be build, with an appropriate message telling why it should not be built. Return null if the indexable should be build.

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

add_filter( 'wpseo_should_build_and_save_user_indexable', 'wp_kama_wpseo_should_build_and_save_user_indexable_filter', 10, 2 );

/**
 * Function for `wpseo_should_build_and_save_user_indexable` filter-hook.
 * 
 * @param Author_Not_Built_Exception|null $exception An exception if the indexable is not being built, `null` if the indexable should be built.
 * @param string                          $user_id   The ID of the user that should or should not be excluded.
 *
 * @return Author_Not_Built_Exception|null
 */
function wp_kama_wpseo_should_build_and_save_user_indexable_filter( $exception, $user_id ){

	// filter...
	return $exception;
}
$exception(Author_Not_Built_Exception|null)
An exception if the indexable is not being built, null if the indexable should be built.
$user_id(строка)
The ID of the user that should or should not be excluded.

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

Indexable_Author_Builder::check_if_user_should_be_indexed()
wpseo_should_build_and_save_user_indexable
yoast/src/builders/indexable-author-builder.php 230
return \apply_filters( 'wpseo_should_build_and_save_user_indexable', $exception, $user_id );

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

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