wpseo_indexable_excluded_post_types
Filter: wpseo_indexable_excluded_post_types Allows excluding posts of a certain post type from being saved to the indexable table.
Использование
add_filter( 'wpseo_indexable_excluded_post_types', 'wp_kama_wpseo_indexable_excluded_post_types_filter' ); /** * Function for `wpseo_indexable_excluded_post_types` filter-hook. * * @param array $excluded_post_types The currently excluded post types that indexables will not be created for. * * @return array */ function wp_kama_wpseo_indexable_excluded_post_types_filter( $excluded_post_types ){ // filter... return $excluded_post_types; }
- $excluded_post_types(массив)
- The currently excluded post types that indexables will not be created for.
Где вызывается хук
wpseo_indexable_excluded_post_types
wpseo_indexable_excluded_post_types
yoast/src/helpers/post-type-helper.php 108
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [] );
yoast/src/deprecated/src/actions/indexables-page-action.php 82
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [ 'attachment' ] );