wpseo_breadcrumb_single_link

Filter: 'wpseo_breadcrumb_single_link' - Allow changing of each link being put out by the Yoast SEO breadcrumbs class.

Description

apply_filters( 'wpseo_breadcrumb_single_link', (unknown) $link_output, (unknown) $link ); 

Parameters (2)

0. $link_output (unknown)
The link output.
1. $link (unknown)
The link.

Usage

To run the hook, copy the example below.
  1. $link_output = apply_filters( 'wpseo_breadcrumb_single_link', $link_output, $link ); 
  2.  
  3. if ( !empty( $link_output ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpseo_breadcrumb_single_link callback 
  2. function filter_wpseo_breadcrumb_single_link( $link_output, $link ) { 
  3. // make filter magic happen here... 
  4. return $link_output
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpseo_breadcrumb_single_link', 'filter_wpseo_breadcrumb_single_link', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpseo_breadcrumb_single_link', 'filter_wpseo_breadcrumb_single_link', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/frontend/class-breadcrumbs.php  
  1. return apply_filters( 'wpseo_breadcrumb_single_link', $link_output, $link );