PluginProbe
Swatchly – Product Variation Swatches for WooCommerce / trunk
Swatchly – Product Variation Swatches for WooCommerce vtrunk
1.4.16 1.4.15 1.4.14 trunk 1.0.5 1.0.7 1.0.9 1.1.0 1.1.1 1.1.2 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 49 releases
swatchly / includes / Compatibility / Elementor.php

Elementor.php in Swatchly – Product Variation Swatches for WooCommerce trunk, at includes/Compatibility/Elementor.php

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Swatchly\Compatibility;
3
4 class Elementor {
5 /**
6 * Constructor.
7 */
8 public function __construct() {
9 if( is_plugin_active('elementor/elementor.php') ){
10 // for related products
11 add_filter('wp_kses_allowed_html', array( $this, 'related_products_compatibility' ), 10, 2);
12 }
13 }
14
15 public function related_products_compatibility( $allowedposttags, $context ){
16 $allowedposttags['form'] = array(
17 'id' => true,
18 'name' => true,
19 'class' => true,
20 'data-*' => true,
21 'current-image' => true
22 );
23
24 $allowedposttags['select'] = array(
25 'id' => true,
26 'name' => true,
27 'class' => true,
28 'data-*' => true,
29 );
30
31 $allowedposttags['option'] = array(
32 'id' => true,
33 'name' => true,
34 'class' => true,
35 'data-*' => true,
36 'value' => true
37 );
38
39 return $allowedposttags;
40 }
41 }
42