Site URL placeholder in event formats

Feb 24th, 2019
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * This snippet replaces #_SITEURL with the URL of the site in event formats.
  4.  * For installation instructions, see here -
  5.  */
  6. function my_em_site_url_placeholder($replace, $EM_Category, $result){
  7.     switch( $result ){
  8.         case '#_SITEURL':
  9.             $replace = get_site_url();
  10.             break;
  11.     }
  12.     return $replace;
  13. }
  14. add_filter('em_event_output_placeholder','my_em_site_url_placeholder',1,3);
RAW Paste Data

Adblocker detected! Please consider disabling it...

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

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

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