Shortcode wrap for another shortcode for use within a format

Jun 22nd, 2017
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. This is an example of how you can wrap a shortcode with another shortcode, so you can use it on a formatting setting within Events Manager, since you can't include formats within a shortcode within a format as the higher format level parses everything first.
  5. For instructions on how/where to use this code, see here -
  6. */
  7. function my_em_get_categories_shortcode_wrap(){
  8.     return do_shortcode('<ul>[categories_list hide_empty=0]<li>#_CATEGORYLINK</li>[/categories_list]</ul>');
  9. }
  10. add_shortcode ( 'categories_list_wrap', 'my_em_get_categories_shortcode_wrap' );
RAW Paste Data