wpseo_sitemap_entry

This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php.

Description

apply_filters( 'wpseo_sitemap_entry', (unknown) $url, (unknown) $term, (unknown) $term ); 

Parameters (3)

0. $url (unknown)
The url.
1. $term (string) => 'term'
The term.
2. $term (unknown)
The term.

Usage

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

Defined (3)

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

/inc/sitemaps/class-taxonomy-sitemap-provider.php  
  1. $url = apply_filters( 'wpseo_sitemap_entry', $url, 'term', $term ); 
/inc/sitemaps/class-post-type-sitemap-provider.php  
  1. $url = apply_filters( 'wpseo_sitemap_entry', $url, 'post', $post ); 
/inc/sitemaps/class-author-sitemap-provider.php  
  1. $url = apply_filters( 'wpseo_sitemap_entry', $url, 'user', $user );