LLMS_Shortcodes::shortcode_wrapper( $function, $atts = array(), $wrapper = array('class' => 'lifterlms', 'before' => null, 'after' => null) )
Creates a wrapper for shortcode.
Contents
Return Return
(string)
Source Source
File: includes/shortcodes/class.llms.shortcodes.php
*/ public static function shortcode_wrapper( $function, $atts = array(), $wrapper = array( 'class' => 'lifterlms', 'before' => null, 'after' => null, ) ) { ob_start(); $before = empty( $wrapper['before'] ) ? '<div class="' . esc_attr( $wrapper['class'] ) . '">' : $wrapper['before']; $after = empty( $wrapper['after'] ) ? '</div>' : $wrapper['after']; echo $before; call_user_func( $function, $atts ); echo $after; return ob_get_clean();
Expand full source code Collapse full source code View on GitHub