WC_Shortcodes::shortcode_wrapper()
Shortcode Wrapper.
Метод класса: WC_Shortcodes{}
Хуков нет.
Возвращает
Строку
.
Использование
$result = WC_Shortcodes::shortcode_wrapper(;
Код WC_Shortcodes::shortcode_wrapper() WC Shortcodes::shortcode wrapper WC 9.5.1
public static function shortcode_wrapper( $function, $atts = array(), $wrapper = array( 'class' => 'woocommerce', 'before' => null, 'after' => null, ) ) { ob_start(); // @codingStandardsIgnoreStart echo empty( $wrapper['before'] ) ? '<div class="' . esc_attr( $wrapper['class'] ) . '">' : $wrapper['before']; call_user_func( $function, $atts ); echo empty( $wrapper['after'] ) ? '</div>' : $wrapper['after']; // @codingStandardsIgnoreEnd return ob_get_clean(); }