Filter hook 'wp_sitemaps_taxonomies_pre_url_list'

in WP Core File wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php at line 84

View Source

wp_sitemaps_taxonomies_pre_url_list

Filter Hook
Description
Filters the taxonomies URL list before it is generated. Returning a non-null value will effectively short-circuit the generation, returning that value instead.

Hook Information

File Location wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php View on GitHub
Hook Type Filter
Line Number 84

Hook Parameters

Type Name Description
array[]|null $url_list The URL list. Default null.
string $taxonomy Taxonomy name.
int $page_num Page of results.

Usage Examples

Basic Usage
<?php
// Hook into wp_sitemaps_taxonomies_pre_url_list
add_filter('wp_sitemaps_taxonomies_pre_url_list', 'my_custom_filter', 10, 3);

function my_custom_filter($url_list, $taxonomy, $page_num) {
    // Your custom filtering logic here
    return $url_list;
}

Source Code Context

wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php:84 - How this hook is used in WordPress core
<?php
  79  		 *
  80  		 * @param array[]|null $url_list The URL list. Default null.
  81  		 * @param string       $taxonomy Taxonomy name.
  82  		 * @param int          $page_num Page of results.
  83  		 */
  84  		$url_list = apply_filters(
  85  			'wp_sitemaps_taxonomies_pre_url_list',
  86  			null,
  87  			$taxonomy,
  88  			$page_num
  89  		);

PHP Documentation

<?php
/**
		 * Filters the taxonomies URL list before it is generated.
		 *
		 * Returning a non-null value will effectively short-circuit the generation,
		 * returning that value instead.
		 *
		 * @since 5.5.0
		 *
		 * @param array[]|null $url_list The URL list. Default null.
		 * @param string       $taxonomy Taxonomy name.
		 * @param int          $page_num Page of results.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php
Related Hooks

Related hooks will be displayed here in future updates.