wpseo_sitemap_<filter>_change_freq

Filter the specific change frequency.

Description

apply_filters( 'wpseo_sitemap_<filter>_change_freq', (string) $default, (string) $url ); 

Parameters (2)

0. $default (string)
The default change frequency.
1. $url (string)
URL to filter frequency for.

Usage

To run the hook, copy the example below.
  1. $default = apply_filters( 'wpseo_sitemap_{$filter}_change_freq', $default, $url ); 
  2.  
  3. if ( !empty( $default ) ) { 
  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_<filter>_change_freq callback 
  2. function filter_wpseo_sitemap_filter_change_freq( $default, $url ) { 
  3. // make filter magic happen here... 
  4. return $default
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "wpseo_sitemap_{$filter}_change_freq", 'filter_wpseo_sitemap_filter_change_freq', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "wpseo_sitemap_{$filter}_change_freq", 'filter_wpseo_sitemap_filter_change_freq', 10, 2 ); 

Defined (1)

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

/inc/sitemaps/class-sitemaps.php  
  1. $change_freq = apply_filters( 'wpseo_sitemap_' . $filter . '_change_freq', $default, $url );