eventsmanager

Category placeholder - count events

Mar 14th, 2013
209
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. NOTE:
  3. Paste in your theme functions.php
  4. */
  5. add_filter('em_category_output_placeholder','my_em_mod_category_event_count',1,3);
  6. function my_em_mod_category_event_count($replace, $EM_Category, $result){
  7. switch( $result ){
  8. case '#_CATEGORYEVENTCOUNT':
  9. $replace = EM_Events::count( array('category'=>$EM_Category->term_id,'scope'=>'future') );
  10. break;
  11. }
  12. return $replace;
  13. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×