wpseo_breadcrumb_single_link_info
Filter: wpseo_breadcrumb_single_link_info Allow developers to filter the Yoast SEO Breadcrumb link information.
Использование
add_filter( 'wpseo_breadcrumb_single_link_info', 'wp_kama_wpseo_breadcrumb_single_link_info_filter', 10, 3 ); /** * Function for `wpseo_breadcrumb_single_link_info` filter-hook. * * @param array $link_info The breadcrumb link information. * @param int $index The index of the breadcrumb in the list. * @param array $crumbs The complete list of breadcrumbs. * * @return array */ function wp_kama_wpseo_breadcrumb_single_link_info_filter( $link_info, $index, $crumbs ){ // filter... return $link_info; }
- $link_info(массив)
- The breadcrumb link information.
- $index(int)
- The index of the breadcrumb in the list.
- $crumbs(массив)
- The complete list of breadcrumbs.
Где вызывается хук
yoast/src/generators/breadcrumbs-generator.php 194
return \apply_filters( 'wpseo_breadcrumb_single_link_info', $link_info, $index, $crumbs );