Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('em_tag_output_placeholder','my_tag_count_placeholder',1,3);
- function my_tag_count_placeholder($replace, $EM_Tag, $result){
- switch( $result ){
- case '#_TAGCOUNT':
- $replace = '0';
- $tagCount = EM_Events::count(array( 'tag'=>$EM_Tag->term_id, 'scope' => 'future' ));
- if( $tagCount > 0 ){
- $replace = $tagCount;
- }
- break;
- }
- return $replace;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement