PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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/controllers/FrmSimpleBlocksController.php +4 -3 6.26 → trunk View file →
@@ -22,9 +22,9 @@
22 22 );
23 23
24 24 $icon = apply_filters( 'frm_icon', 'svg' );
25 25
26 - if ( 0 === strpos( $icon, 'data:image/svg+xml;base64,' ) ) {
26 + if ( str_starts_with( $icon, 'data:image/svg+xml;base64,' ) ) {
27 27 $icon = ' ' . FrmAppHelper::get_menu_icon_class();
28 28 } else {
29 29 $icon = str_replace( 'dashicons-', '', $icon );
30 30 }
@@ -221,9 +221,9 @@
221 221 $params['id'] = $params['formId'];
222 222 unset( $params['formId'] );
223 223
224 224 // Still pass false for title and description options if nothing is set,
225 - // so a default doesn't overwrite the block option.
225 + // So a default doesn't overwrite the block option.
226 226 $params['title'] = ! empty( $params['title'] );
227 227 $params['description'] = ! empty( $params['description'] );
228 228
229 229 $form .= FrmFormsController::get_form_shortcode( $params );
@@ -230,8 +230,9 @@
230 230
231 231 if ( ! empty( $attributes['className'] ) ) {
232 232 $form = preg_replace( '/\bfrm_forms\b/', 'frm_forms ' . esc_attr( $attributes['className'] ), $form, 1 );
233 233 }
234 +
234 235 return self::maybe_remove_fade_on_load_for_block_preview( $form );
235 236 }
236 237
237 238 /**
@@ -243,9 +244,9 @@
243 244 * @return string
244 245 */
245 246 private static function maybe_remove_fade_on_load_for_block_preview( $form ) {
246 247 if ( is_callable( 'wp_is_json_request' ) && wp_is_json_request() ) {
247 - $form = str_replace( ' frm_logic_form ', ' ', $form );
248 + return str_replace( ' frm_logic_form ', ' ', $form );
248 249 }
249 250 return $form;
250 251 }
251 252 }