wpseo_indexable_indexing_failed хук-событиеYoast 1.0

Fires when an indexable could not be built because of an unexpected error.

This action lets third parties observe build failures themselves.

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

add_action( 'wpseo_indexable_indexing_failed', 'wp_kama_wpseo_indexable_indexing_failed_action', 10, 4 );

/**
 * Function for `wpseo_indexable_indexing_failed` action-hook.
 * 
 * @param int|null    $object_id       The object ID of the indexable that failed to build, or null
 *                                    for id-less object types.
 * @param string      $object_type     The object type of the indexable that failed to build.
 * @param string|null $object_sub_type The object sub type of the indexable that failed to build.
 * @param Throwable   $exception       The error that caused the failure.
 *
 * @return void
 */
function wp_kama_wpseo_indexable_indexing_failed_action( $object_id, $object_type, $object_sub_type, $exception ){
	// action...
}
$object_id(int|null)
The object ID of the indexable that failed to build, or null for id-less object types.
$object_type(строка)
The object type of the indexable that failed to build.
$object_sub_type(строка|null)
The object sub type of the indexable that failed to build.
$exception(Throwable)
The error that caused the failure.

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

Indexable_Builder::build()
wpseo_indexable_indexing_failed
yoast/src/builders/indexable-builder.php 467-473
\do_action(
	'wpseo_indexable_indexing_failed',
	$indexable->object_id,
	$indexable->object_type,
	$indexable->object_sub_type,
	$exception,
);

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

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