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

Filter: wpseo_should_save_indexable Allow developers to enable / disable saving the indexable when the indexable is updated. Warning: overriding the intended action may cause problems when moving from a staging to a production environment because indexable permalinks may get set incorrectly.

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

add_filter( 'wpseo_should_save_indexable', 'wp_kama_wpseo_should_save_indexable_filter', 10, 2 );

/**
 * Function for `wpseo_should_save_indexable` filter-hook.
 * 
 * @param bool      $intend_to_save True if YoastSEO intends to save the indexable.
 * @param Indexable $indexable      The indexable to be saved.
 *
 * @return bool
 */
function wp_kama_wpseo_should_save_indexable_filter( $intend_to_save, $indexable ){

	// filter...
	return $intend_to_save;
}
$intend_to_save(true|false)
True if YoastSEO intends to save the indexable.
$indexable(Indexable)
The indexable to be saved.

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

Indexable_Builder::save_indexable()
wpseo_should_save_indexable
yoast/src/builders/indexable-builder.php 290
$intend_to_save = \apply_filters( 'wpseo_should_save_indexable', $intend_to_save, $indexable );

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

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