Advertisement
cipher87

Add filter to add or replace Enfold ALB shortcodes with new

Feb 12th, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. /**
  2.  *  Add filter to add or replace Enfold ALB shortcodes with new folder contents
  3.  * 
  4.  *  Note that the shortcodes must be in the same format as those in
  5.  *  enfold/config-templatebuilder/avia-shortcodes
  6.  *
  7.  *  @link http://www.kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
  8.  */
  9.  
  10. add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
  11. function avia_include_shortcode_template($paths)
  12. {
  13.     $template_url = get_stylesheet_directory();
  14.         array_unshift($paths, $template_url.'/shortcodes/');
  15.  
  16.     return $paths;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement