wpseo_indexable_included_post_types
Filter: wpseo_indexable_included_post_types Allow developers to specify which post types will be shown in the indexables overview cards.
Использование
add_filter( 'wpseo_indexable_included_post_types', 'wp_kama_wpseo_indexable_included_post_types_filter', 10, 2 ); /** * Function for `wpseo_indexable_included_post_types` filter-hook. * * @param array $included_post_types The currently included post types. * @param $string * * @return array */ function wp_kama_wpseo_indexable_included_post_types_filter( $included_post_types, $string ){ // filter... return $included_post_types; }
- $included_post_types(массив)
- The currently included post types.
- $string
- -
Где вызывается хук
wpseo_indexable_included_post_types
yoast/src/deprecated/src/actions/indexables-page-action.php 90
$included_post_types = \apply_filters_deprecated( 'wpseo_indexable_included_post_types', [ [ 'post', 'page' ] ], 'Yoast SEO 20.4' );