Action hook 'clean_object_term_cache'

in WP Core File wp-includes/taxonomy.php at line 3648

View Source

clean_object_term_cache

Action Hook
Description
Fires after the object term cache has been cleaned.

Hook Information

File Location wp-includes/taxonomy.php View on GitHub
Hook Type Action
Line Number 3648

Hook Parameters

Type Name Description
array $object_ids An array of object IDs.
string $object_type Object type.

Usage Examples

Basic Usage
<?php
// Hook into clean_object_term_cache
add_action('clean_object_term_cache', 'my_custom_function', 10, 2);

function my_custom_function($object_ids, $object_type) {
    // Your custom code here
}

Source Code Context

wp-includes/taxonomy.php:3648 - How this hook is used in WordPress core
<?php
3643  	 * @since 2.5.0
3644  	 *
3645  	 * @param array  $object_ids An array of object IDs.
3646  	 * @param string $object_type Object type.
3647  	 */
3648  	do_action( 'clean_object_term_cache', $object_ids, $object_type );
3649  }
3650  
3651  /**
3652   * Removes all of the term IDs from the cache.
3653   *

PHP Documentation

<?php
/**
	 * Fires after the object term cache has been cleaned.
	 *
	 * @since 2.5.0
	 *
	 * @param array  $object_ids An array of object IDs.
	 * @param string $object_type Object type.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.