PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.18
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.18
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmShortcodeHelper.php +0 -16 6.276.18 View file →
@@ -18,9 +18,8 @@
18 18 * @return array
19 19 */
20 20 public static function get_shortcode_attribute_array( $text ) {
21 21 $atts = array();
22 -
23 22 if ( $text !== '' ) {
24 23 $atts = shortcode_parse_atts( $text );
25 24 }
26 25
@@ -34,9 +33,8 @@
34 33 /**
35 34 * Returns shortcodes that are shown/hidden based on the context.
36 35 *
37 36 * @since 6.16.3
38 - *
39 37 * @return array
40 38 */
41 39 public static function get_contextual_shortcodes() {
42 40 return array(
@@ -74,13 +72,11 @@
74 72 */
75 73 public static function get_contextual_codes() {
76 74 $contextual_shortcodes = self::get_contextual_shortcodes();
77 75 $result = array();
78 -
79 76 foreach ( $contextual_shortcodes as $type => $shortcodes ) {
80 77 $result[ $type ] = array_keys( $shortcodes );
81 78 }
82 -
83 79 return $result;
84 80 }
85 81
86 82 /**
@@ -102,15 +98,13 @@
102 98 'conditional_check' => false,
103 99 'foreach' => false,
104 100 )
105 101 );
106 -
107 102 if ( ( $args['conditional'] || $args['foreach'] ) && ! $args['conditional_check'] ) {
108 103 $args['conditional_check'] = true;
109 104 }
110 105
111 106 $prefix = '';
112 -
113 107 if ( $args['conditional_check'] ) {
114 108 if ( $args['conditional'] ) {
115 109 $prefix = 'if ';
116 110 } elseif ( $args['foreach'] ) {
@@ -118,15 +112,13 @@
118 112 }
119 113 }
120 114
121 115 $with_tags = $args['conditional_check'] ? 3 : 2;
122 -
123 116 if ( ! empty( $shortcodes[ $with_tags ][ $short_key ] ) ) {
124 117 $tag = str_replace( '[' . $prefix, '', $shortcodes[0][ $short_key ] );
125 118 $tag = str_replace( ']', '', $tag );
126 119 $tag = str_replace( chr( 194 ) . chr( 160 ), ' ', $tag );
127 120 $tags = preg_split( '/\s+/', $tag, 2 );
128 -
129 121 if ( is_array( $tags ) ) {
130 122 $tag = $tags[0];
131 123 }
132 124 } else {
@@ -135,16 +127,8 @@
135 127
136 128 return $tag;
137 129 }
138 130
139 - /**
140 - * @param bool $no_vars
141 - * @param string $code
142 - * @param string $replace_with
143 - * @param string $html
144 - *
145 - * @return void
146 - */
147 131 public static function remove_inline_conditions( $no_vars, $code, $replace_with, &$html ) {
148 132 if ( $no_vars ) {
149 133 $html = str_replace( '[if ' . $code . ']', '', $html );
150 134 $html = str_replace( '[/if ' . $code . ']', '', $html );