<?php function get_term_meta_from_cache( $term_id , $key ){ if( !( $term_meta = wp_cache_get( $term_id , 'termmeta' ) ) ){ $term_meta = (array)get_term_custom( $term_id , NULL , array( 'force_query' => true , 'unfiltered' => true ) ) ; wp_cache_set( $term_id , $term_meta , 'termmeta' ); }; $results=array() ; foreach( $term_meta as $term_data ){ if( $term_data->meta_key == $key ) $results[] = $term_data->meta_value ; } ; return $results ; } ; ?>
get_term_meta_from_cache: Source code
Source code of the function get_term_meta_from_cache located in the file wp-content/plugins/zyx-term-meta/includes / term-meta-cache.php.
By the Web Warlock, Wednesday, 4/Aug/2010 9:52
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment
201 queries. 0.280 seconds. Powered by WordPress
Code is magic