$value ) { // ! Do it because js change data type if ( $value === 'false' ) $value = false; $atts .= esc_attr($key) . '="' . esc_attr($value) . '" '; } add_filter('etheme_output_shortcodes_inline_css', '__return_true'); add_filter( 'woocommerce_available_variation', 'etheme_available_variation_gallery', 90, 3 ); add_filter( 'sten_wc_archive_loop_available_variation', 'etheme_available_variation_gallery', 90, 3 ); add_filter( 'etheme_output_shortcodes_inline_css', function() { return true; } ); // this add variation gallery filters at loop start and remove it after loop end // if ( !$_POST['archiveVariationGallery'] ) { add_filter( 'woocommerce_product_loop_start', 'remove_et_variation_gallery_filter' ); add_filter( 'woocommerce_product_loop_end', 'add_et_variation_gallery_filter' ); // } add_filter('woocommerce_get_availability_class', 'etheme_wc_get_availability_class', 20, 2); if ( isset( $_POST[ 'content' ] ) && ! empty( $_POST[ 'content' ] ) ) { // ! Do it because js add backslash $content = esc_attr(stripslashes( $_POST[ 'content' ] )); $content = do_shortcode( $content ) . '[/' . esc_attr($_POST[ 'element' ]) . ']'; } else { $content = ''; } echo do_shortcode( '[' . esc_attr($_POST[ 'element' ]) . ' ' . $atts . ' ]' . $content ); die(); } } function et_normalize_widget_args($args){ $args = stripslashes($args); $args = json_decode( $args, true); if (!is_null($args)){ $args = str_replace('u0022', '"',$args ); } if (isset($args['before_title'])){ $args['before_title'] = html_entity_decode($args['before_title']); } if (isset($args['after_title'])){ $args['after_title'] = html_entity_decode($args['after_title']); } if (isset($args['before_widget'])){ $args['before_widget'] = html_entity_decode($args['before_widget']); } if (isset($args['after_widget'])){ $args['after_widget'] = html_entity_decode($args['after_widget']); } return $args; } // **********************************************************************// // ! Ajax holder for shortcodes/VC elements loading // **********************************************************************// if ( ! function_exists( 'et_ajax_element_holder' ) ) { function et_ajax_element_holder($element = false, $atts = array(), $extra = '', $content = false, $type = 'element', $widget = array()){ if ( ! $element ) return; if ( $content ) { $content = ''; } if ( ( is_array($widget) || is_object($widget) ) && count($widget)){ $content .= ''; } $output = '