eventsmanager

Custom Category Placeholder (parsing other shortcodes)

Oct 3rd, 2018
240
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Changes the default booking status being searched for on booking admin tables, and can be extended to change other default features.
  4.  * For installation instructions, see here - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  5.  */
  6. function my_em_placeholder_mod($replace, $EM_Category, $result){
  7.     switch( $result ){
  8.         case '#_CATEGORYDESCRIPTION':
  9.             $replace = do_shortcode($EM_Category->description);
  10.             break;
  11.     }
  12.     return $replace;
  13. }
  14. add_filter('em_category_output_placeholder','my_em_placeholder_mod',1,3);
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.

×