Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




clean_object_term_cache [ WordPress Function ]

clean_object_term_cache ( $object_ids, $object_type )
Parameters:
  • (int|array) $object_ids Single or list of term object ID(s)
  • (array|string) $object_type The taxonomy object type
Uses:
See:
Defined at:



Removes the taxonomy relationship to terms from the cache.

Will remove the entire taxonomy relationship containing term $object_id. The term IDs have to exist within the taxonomy $object_type for the deletion to take place.

Source


<?php
function clean_object_term_cache($object_ids$object_type) {
    if ( !
is_array($object_ids) )
        
$object_ids = array($object_ids);

    foreach ( 
$object_ids as $id )
        foreach ( 
get_object_taxonomies($object_type) as $taxonomy )
            
wp_cache_delete($id"{$taxonomy}_relationships");

    
do_action('clean_object_term_cache'$object_ids$object_type);
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics