PluginProbe
PixCodes / trunk
PixCodes vtrunk
2.3.9 trunk 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8
← All changes | util.php +76 -1 2.3.4trunk View file →
@@ -1,6 +1,81 @@
1 1 <?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + die( '-1' );
4 +}
2 5
6 +if ( ! function_exists( 'pixcodes_shortcode_modal_allowed_html' ) ) {
7 + function pixcodes_shortcode_modal_allowed_html() {
8 + $allowed_html = wp_kses_allowed_html( 'post' );
9 +
10 + $allowed_html['button'] = array(
11 + 'type' => true,
12 + 'class' => true,
13 + );
14 + $allowed_html['form'] = array(
15 + 'id' => true,
16 + );
17 + $allowed_html['fieldset'] = array();
18 + $allowed_html['input'] = array(
19 + 'type' => true,
20 + 'id' => true,
21 + 'name' => true,
22 + 'class' => true,
23 + 'value' => true,
24 + 'rows' => true,
25 + 'placeholder' => true,
26 + 'checked' => true,
27 + 'multiple' => true,
28 + );
29 + $allowed_html['div']['data-tab'] = true;
30 + $allowed_html['li']['data-index'] = true;
31 + $allowed_html['select'] = array(
32 + 'type' => true,
33 + 'name' => true,
34 + 'class' => true,
35 + 'id' => true,
36 + 'multiple' => true,
37 + 'value' => true,
38 + 'data-options' => true,
39 + );
40 + $allowed_html['option'] = array(
41 + 'value' => true,
42 + 'selected' => true,
43 + );
44 + $allowed_html['textarea'] = array(
45 + 'type' => true,
46 + 'name' => true,
47 + 'class' => true,
48 + 'id' => true,
49 + 'rows' => true,
50 + 'placeholder' => true,
51 + );
52 +
53 + return $allowed_html;
54 + }
55 +}
56 +
57 +if ( ! function_exists( 'pixcodes_frontend_allowed_html' ) ) {
58 + function pixcodes_frontend_allowed_html() {
59 + $allowed_html = wp_kses_allowed_html( 'post' );
60 +
61 + $allowed_html['div']['data-slidertransition'] = true;
62 + $allowed_html['div']['data-arrows'] = true;
63 + $allowed_html['div']['data-bullets'] = true;
64 + $allowed_html['div']['data-autoheight'] = true;
65 + $allowed_html['div']['data-value'] = true;
66 + $allowed_html['title'] = array();
67 + $allowed_html['icon'] = array();
68 + $allowed_html['body'] = array();
69 + $allowed_html['meta'] = array(
70 + 'itemprop' => true,
71 + 'content' => true,
72 + );
73 +
74 + return $allowed_html;
75 + }
76 +}
77 +
3 78 if (!function_exists('wpgrade_remove_spaces_around_shortcodes')) {
4 79
5 80 function wpgrade_remove_spaces_around_shortcodes( $content ) {
6 81 $array = array(
@@ -36,5 +111,5 @@
36 111 $content = str_replace( array( '<p> </p>' ), '', $content );
37 112
38 113 return $content;
39 114 }
40 -}
115 +}