wpseo_should_save_indexable хук-фильтр . Yoast 1.0
Filter: 'wpseo_override_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', 'filter_function_name_3035', 10, 2 ); function filter_function_name_3035( $indexable, $intend_to_save ){ // filter... return $indexable; }
- $indexable(Indexable)
- The indexable to be saved.
- $intend_to_save(true/false)
- True if YoastSEO intends to save the indexable.
Где вызывается хук
wpseo_should_save_indexable
yoast/src/builders/indexable-builder.php 298
$intend_to_save = \apply_filters( 'wpseo_should_save_indexable', $intend_to_save, $indexable );