PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.07.01
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.07.01
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/models/FrmMigrate.php +20 -280 6.26 → 4.07.01 View file →
@@ -3,27 +3,11 @@
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5
6 6 class FrmMigrate {
7 -
8 - /**
9 - * @var string
10 - */
11 7 public $fields;
12 -
13 - /**
14 - * @var string
15 - */
16 8 public $forms;
17 -
18 - /**
19 - * @var string
20 - */
21 9 public $entries;
22 -
23 - /**
24 - * @var string
25 - */
26 10 public $entry_metas;
27 11
28 12 public function __construct() {
29 13 global $wpdb;
@@ -32,11 +16,8 @@
32 16 $this->entries = $wpdb->prefix . 'frm_items';
33 17 $this->entry_metas = $wpdb->prefix . 'frm_item_metas';
34 18 }
35 19
36 - /**
37 - * @return void
38 - */
39 20 public function upgrade() {
40 21 do_action( 'frm_before_install' );
41 22
42 23 global $wpdb, $frm_vars;
@@ -54,29 +35,22 @@
54 35 if ( $needs_upgrade ) {
55 36 // update rewrite rules for views and other custom post types
56 37 flush_rewrite_rules();
57 38
58 - require_once ABSPATH . 'wp-admin/includes/upgrade.php';
39 + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
59 40
60 41 $old_db_version = get_option( 'frm_db_version' );
61 42
62 43 $this->create_tables();
63 44 $this->migrate_data( $old_db_version );
64 - $this->check_that_tables_exist();
65 45
66 - // SAVE DB VERSION.
46 + /***** SAVE DB VERSION *****/
67 47 update_option( 'frm_db_version', FrmAppHelper::plugin_version() . '-' . FrmAppHelper::$db_version );
68 48
69 49 if ( ! $old_db_version ) {
70 50 $this->maybe_create_contact_form();
71 -
72 - if ( false === get_option( 'frm_first_activation' ) ) {
73 - update_option( 'frm_first_activation', time(), false );
74 - }
75 -
76 - $this->update_settings_for_new_install();
77 51 }
78 - }//end if
52 + }
79 53
80 54 do_action( 'frm_after_install' );
81 55
82 56 $frm_vars['doing_upgrade'] = false;
@@ -89,60 +63,10 @@
89 63 $frm_style->update( 'default' );
90 64 }
91 65 }
92 66
93 - /**
94 - * Updates some settings for new installs.
95 - *
96 - * @since 6.23
97 - *
98 - * @return void
99 - */
100 - private function update_settings_for_new_install() {
101 - $settings = FrmAppHelper::get_settings();
102 -
103 - $settings->denylist_check = 1;
104 - $settings->installed_after_welcome_tour_update = 1;
105 - $settings->store();
106 - }
107 -
108 - /**
109 - * If we fail to create the database tables, add an inbox notice.
110 - * This informs the user that they need to correct the issue and try again.
111 - *
112 - * @since 6.19
113 - *
114 - * @return void
115 - */
116 - private function check_that_tables_exist() {
117 - // Check the DB that the table $this->forms exists.
118 - global $wpdb;
119 - $exists = $wpdb->get_results( $wpdb->prepare( 'SHOW TABLES LIKE %s', $this->forms ) );
120 -
121 - if ( $exists ) {
122 - $inbox = new FrmInbox();
123 - $inbox->dismiss( 'failed-to-create-tables' );
124 - return;
125 - }
126 -
127 - $message = array(
128 - 'key' => 'failed-to-create-tables',
129 - 'subject' => 'Something went wrong setting up the database',
130 - 'message' => 'For steps to continue, see our <a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">documentation</a>. If you need assistance, we recommend that you reach out to your hosting provider. Then <a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_add_tables=1' ) ) . '">click here</a> to try again.',
131 - 'cta' => '<a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">Learn More</a>',
132 - 'type' => 'error',
133 - );
134 -
135 - $inbox = new FrmInbox();
136 - $inbox->add_message( $message );
137 - }
138 -
139 - /**
140 - * @return string
141 - */
142 67 public function collation() {
143 68 global $wpdb;
144 -
145 69 if ( ! $wpdb->has_cap( 'collation' ) ) {
146 70 return '';
147 71 }
148 72
@@ -148,11 +72,8 @@
148 72
149 73 return $wpdb->get_charset_collate();
150 74 }
151 75
152 - /**
153 - * @return void
154 - */
155 76 private function create_tables() {
156 77 $charset_collate = $this->collation();
157 78 $sql = array();
158 79
@@ -232,88 +153,16 @@
232 153 if ( function_exists( 'dbDelta' ) ) {
233 154 dbDelta( $q . $charset_collate . ';' );
234 155 } else {
235 156 global $wpdb;
236 - $wpdb->query( $q . $charset_collate ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
157 + $wpdb->query( $q . $charset_collate ); // WPCS: unprepared SQL ok.
237 158 }
238 159 unset( $q );
239 160 }
240 -
241 - $this->add_composite_indexes_for_entries();
242 161 }
243 162
244 - /**
245 - * These indexes help optimize database queries for entries.
246 - *
247 - * @since 6.6
248 - * @since 6.16.3 idx_form_id_is_draft was also added to frm_items.
249 - * @since 6.17 idx_form_id_type was also added to frm_fields.
250 - *
251 - * @return void
252 - */
253 - private function add_composite_indexes_for_entries() {
254 - global $wpdb;
255 -
256 - $table_name = "{$wpdb->prefix}frm_items";
257 - $index_name = 'idx_is_draft_created_at';
258 -
259 - if ( ! self::index_exists( $table_name, $index_name ) ) {
260 - $wpdb->query( "CREATE INDEX idx_is_draft_created_at ON `{$wpdb->prefix}frm_items` (is_draft, created_at)" );
261 - }
262 -
263 - $table_name = "{$wpdb->prefix}frm_item_metas";
264 - $index_name = 'idx_field_id_item_id';
265 -
266 - if ( ! self::index_exists( $table_name, $index_name ) ) {
267 - $wpdb->query( "CREATE INDEX idx_field_id_item_id ON `{$wpdb->prefix}frm_item_metas` (field_id, item_id)" );
268 - }
269 -
270 - $table_name = "{$wpdb->prefix}frm_items";
271 - $index_name = 'idx_form_id_is_draft';
272 -
273 - if ( ! self::index_exists( $table_name, $index_name ) ) {
274 - $wpdb->query( "CREATE INDEX idx_form_id_is_draft ON `{$wpdb->prefix}frm_items` (form_id, is_draft)" );
275 - }
276 -
277 - $table_name = "{$wpdb->prefix}frm_fields";
278 - $index_name = 'idx_form_id_type';
279 -
280 - if ( ! self::index_exists( $table_name, $index_name ) ) {
281 - $wpdb->query( "CREATE INDEX idx_form_id_type ON `{$wpdb->prefix}frm_fields` (form_id, type(30))" );
282 - }
283 - }
284 -
285 - /**
286 - * Check that an index exists in a database table before trying to add it (which results in an error).
287 - *
288 - * @since 6.6
289 - *
290 - * @param string $table_name
291 - * @param string $index_name
292 - *
293 - * @return bool
294 - */
295 - private static function index_exists( $table_name, $index_name ) {
296 - global $wpdb;
297 - $row = $wpdb->get_row(
298 - $wpdb->prepare(
299 - 'SELECT 1 FROM information_schema.statistics
300 - WHERE table_schema = database()
301 - AND table_name = %s
302 - AND index_name = %s
303 - LIMIT 1',
304 - array( $table_name, $index_name )
305 - )
306 - );
307 - return (bool) $row;
308 - }
309 -
310 - /**
311 - * @return void
312 - */
313 163 private function maybe_create_contact_form() {
314 164 $form_exists = FrmForm::get_id_by_key( 'contact-form' );
315 -
316 165 if ( ! $form_exists ) {
317 166 $this->add_default_template();
318 167 }
319 168 }
@@ -321,37 +170,32 @@
321 170 /**
322 171 * Create the default contact form
323 172 *
324 173 * @since 3.06
325 - *
326 - * @return void
327 174 */
328 175 private function add_default_template() {
329 - if ( FrmXMLHelper::check_if_libxml_disable_entity_loader_exists() ) {
176 + if ( ! function_exists( 'libxml_disable_entity_loader' ) ) {
330 177 // XML import is not enabled on your server.
331 178 return;
332 179 }
333 180
334 181 $set_err = libxml_use_internal_errors( true );
335 - $loader = FrmXMLHelper::maybe_libxml_disable_entity_loader( true );
182 + $loader = libxml_disable_entity_loader( true );
336 183
337 184 $file = FrmAppHelper::plugin_path() . '/classes/views/xml/default-templates.xml';
338 185 FrmXMLHelper::import_xml( $file );
339 186
340 187 libxml_use_internal_errors( $set_err );
341 - FrmXMLHelper::maybe_libxml_disable_entity_loader( $loader );
188 + libxml_disable_entity_loader( $loader );
342 189 }
343 190
344 191 /**
345 192 * @param int|string $old_db_version
346 - *
347 - * @return void
348 193 */
349 194 private function migrate_data( $old_db_version ) {
350 195 if ( ! $old_db_version ) {
351 196 $old_db_version = get_option( 'frm_db_version' );
352 197 }
353 -
354 198 if ( strpos( $old_db_version, '-' ) ) {
355 199 $last_upgrade = explode( '-', $old_db_version );
356 200 $old_db_version = (int) $last_upgrade[1];
357 201 }
@@ -360,10 +204,9 @@
360 204 // bail if we don't know the previous version
361 205 return;
362 206 }
363 207
364 - $migrations = array( 16, 11, 16, 17, 23, 25, 86, 90, 97, 98, 101, 104 );
365 -
208 + $migrations = array( 16, 11, 16, 17, 23, 25, 86, 90, 97 );
366 209 foreach ( $migrations as $migration ) {
367 210 if ( FrmAppHelper::$db_version >= $migration && $old_db_version < $migration ) {
368 211 $function_name = 'migrate_to_' . $migration;
369 212 $this->$function_name();
@@ -378,12 +221,12 @@
378 221 }
379 222
380 223 global $wpdb, $wp_roles;
381 224
382 - $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->fields ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
383 - $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->forms ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
384 - $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->entries ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
385 - $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->entry_metas ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
225 + $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->fields ); // WPCS: unprepared SQL ok.
226 + $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->forms ); // WPCS: unprepared SQL ok.
227 + $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->entries ); // WPCS: unprepared SQL ok.
228 + $wpdb->query( 'DROP TABLE IF EXISTS ' . $this->entry_metas ); // WPCS: unprepared SQL ok.
386 229
387 230 delete_option( 'frm_options' );
388 231 delete_option( 'frm_db_version' );
389 232 delete_option( 'frm_install_running' );
@@ -390,15 +233,12 @@
390 233 delete_option( 'frm_lite_settings_upgrade' );
391 234 delete_option( 'frm-usage-uuid' );
392 235 delete_option( 'frm_inbox' );
393 236 delete_option( 'frmpro_css' );
394 - delete_option( FrmOnboardingWizardController::REDIRECT_STATUS_OPTION );
395 - delete_option( FrmEmailSummaryHelper::$option_name );
396 237
397 238 // Delete roles.
398 239 $frm_roles = FrmAppHelper::frm_capabilities();
399 240 $roles = get_editable_roles();
400 -
401 241 foreach ( $frm_roles as $frm_role => $frm_role_description ) {
402 242 foreach ( $roles as $role => $details ) {
403 243 $wp_roles->remove_cap( $role, $frm_role );
404 244 unset( $role, $details );
@@ -413,9 +253,8 @@
413 253 remove_action( 'before_delete_post', 'FrmProDisplaysController::before_delete_post' );
414 254 remove_action( 'deleted_post', 'FrmProEntriesController::delete_entry' );
415 255
416 256 $post_ids = $wpdb->get_col( $wpdb->prepare( 'SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type in (%s, %s, %s)', FrmFormActionsController::$action_post_type, FrmStylesController::$post_type, 'frm_display' ) );
417 -
418 257 foreach ( $post_ids as $post_id ) {
419 258 // Delete's each post.
420 259 wp_delete_post( $post_id, true );
421 260 }
@@ -424,9 +263,8 @@
424 263 // delete transients
425 264 delete_transient( 'frmpro_css' );
426 265 delete_transient( 'frm_options' );
427 266 delete_transient( 'frmpro_options' );
428 - delete_transient( FrmOnboardingWizardController::TRANSIENT_NAME );
429 267
430 268 $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->options . ' WHERE option_name LIKE %s OR option_name LIKE %s', '_transient_timeout_frm_form_fields_%', '_transient_frm_form_fields_%' ) );
431 269
432 270 do_action( 'frm_after_uninstall' );
@@ -434,65 +272,11 @@
434 272 return true;
435 273 }
436 274
437 275 /**
438 - * In older versions of Lite, it's possible we've saved the wrong location ID.
439 - * So force it to get valid values again.
440 - *
441 - * @since 6.25
442 - *
443 - * @return void
444 - */
445 - private function migrate_to_104() {
446 - if ( FrmSquareLiteConnectHelper::get_merchant_id( 'test' ) ) {
447 - FrmSquareLiteConnectHelper::get_location_id( true, 'test' );
448 - }
449 -
450 - if ( FrmSquareLiteConnectHelper::get_merchant_id( 'live' ) ) {
451 - FrmSquareLiteConnectHelper::get_location_id( true, 'live' );
452 - }
453 - }
454 -
455 - /**
456 - * Disables summary email for multisite (not the main site) if recipient setting isn't changed.
457 - *
458 - * @since 6.8
459 - *
460 - * @return void
461 - */
462 - private function migrate_to_101() {
463 - if ( ! is_multisite() || get_main_site_id() === get_current_blog_id() ) {
464 - return;
465 - }
466 -
467 - $frm_settings = FrmAppHelper::get_settings();
468 -
469 - if ( empty( $frm_settings->summary_emails ) || '[admin_email]' !== $frm_settings->summary_emails_recipients ) {
470 - // User changed it.
471 - return;
472 - }
473 -
474 - $frm_settings->summary_emails = 0;
475 - $frm_settings->store();
476 - }
477 -
478 - /**
479 - * Clear frmpro_css transient.
480 - *
481 - * @since 4.10.02
482 - *
483 - * @return void
484 - */
485 - private function migrate_to_98() {
486 - delete_transient( 'frmpro_css' );
487 - }
488 -
489 - /**
490 276 * Move default_blank and clear_on_focus to placeholder.
491 277 *
492 278 * @since 4.0
493 - *
494 - * @return void
495 279 */
496 280 private function migrate_to_97() {
497 281 $this->migrate_to_placeholder( 'clear_on_focus' );
498 282 $this->migrate_to_placeholder( 'default_blank' );
@@ -501,12 +285,8 @@
501 285 /**
502 286 * Move clear_on_focus or default_blank to placeholder.
503 287 *
504 288 * @since 4.0
505 - *
506 - * @param string $type Field option key to migrate.
507 - *
508 - * @return void
509 289 */
510 290 private function migrate_to_placeholder( $type = 'clear_on_focus' ) {
511 291 $query = array(
512 292 'field_options like' => '"' . $type . '";s:1:"1";',
@@ -517,9 +297,8 @@
517 297 foreach ( $fields as $field ) {
518 298 FrmAppHelper::unserialize_or_decode( $field->field_options );
519 299 FrmAppHelper::unserialize_or_decode( $field->options );
520 300 $update_values = FrmXMLHelper::migrate_field_placeholder( $field, $type );
521 -
522 301 if ( empty( $update_values ) ) {
523 302 continue;
524 303 }
525 304
@@ -528,17 +307,14 @@
528 307 }
529 308 }
530 309
531 310 /**
532 - * Delete unneeded default templates
311 + * Delete uneeded default templates
533 312 *
534 313 * @since 3.06
535 - *
536 - * @return void
537 314 */
538 315 private function migrate_to_90() {
539 316 $form = FrmForm::getOne( 'contact' );
540 -
541 317 if ( $form && $form->default_template == 1 ) {
542 318 FrmForm::destroy( 'contact' );
543 319 }
544 320 }
@@ -546,18 +322,16 @@
546 322 /**
547 323 * Reverse migration 17 -- Divide by 9
548 324 *
549 325 * @since 3.0.05
550 - *
551 - * @return void
552 326 */
553 327 private function migrate_to_86() {
554 328
555 329 $fields = $this->get_fields_with_size();
556 330
557 - foreach ( $fields as $f ) {
331 + foreach ( (array) $fields as $f ) {
558 332 FrmAppHelper::unserialize_or_decode( $f->field_options );
559 - $size = $f->field_options['size'];
333 + $size = $f->field_options['size'];
560 334 $this->maybe_convert_migrated_size( $size );
561 335
562 336 if ( $size === $f->field_options['size'] ) {
563 337 continue;
@@ -569,9 +343,8 @@
569 343 }
570 344
571 345 // reverse the extra size changes in widgets
572 346 $widgets = get_option( 'widget_frm_show_form' );
573 -
574 347 if ( empty( $widgets ) ) {
575 348 return;
576 349 }
577 350
@@ -577,11 +350,8 @@
577 350
578 351 $this->revert_widget_field_size();
579 352 }
580 353
581 - /**
582 - * @return array
583 - */
584 354 private function get_fields_with_size() {
585 355 $field_types = array(
586 356 'textarea',
587 357 'text',
@@ -609,20 +379,16 @@
609 379 /**
610 380 * Reverse the extra size changes in widgets
611 381 *
612 382 * @since 3.0.05
613 - *
614 - * @return void
615 383 */
616 384 private function revert_widget_field_size() {
617 385 $widgets = get_option( 'widget_frm_show_form' );
618 -
619 386 if ( empty( $widgets ) ) {
620 387 return;
621 388 }
622 389
623 390 FrmAppHelper::unserialize_or_decode( $widgets );
624 -
625 391 foreach ( $widgets as $k => $widget ) {
626 392 if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) {
627 393 continue;
628 394 }
@@ -635,22 +401,16 @@
635 401 /**
636 402 * Divide by 9 to reverse the multiplication
637 403 *
638 404 * @since 3.0.05
639 - *
640 - * @param string $size Size string to maybe convert, passed by reference.
641 - *
642 - * @return void
643 405 */
644 406 private function maybe_convert_migrated_size( &$size ) {
645 407 $has_px_size = ! empty( $size ) && strpos( $size, 'px' );
646 -
647 408 if ( ! $has_px_size ) {
648 409 return;
649 410 }
650 411
651 412 $int_size = str_replace( 'px', '', $size );
652 -
653 413 if ( ! is_numeric( $int_size ) || (int) $int_size < 900 ) {
654 414 return;
655 415 }
656 416
@@ -663,22 +423,19 @@
663 423 * Migrate old styling settings. If sites are using the old
664 424 * default 400px field width, switch it to 100%
665 425 *
666 426 * @since 2.0.4
667 - *
668 - * @return void
669 427 */
670 428 private function migrate_to_25() {
671 429 // get the style that was created with the style migration
672 430 $frm_style = new FrmStyle();
673 431 $styles = $frm_style->get_all( 'post_date', 'ASC', 1 );
674 -
675 432 if ( empty( $styles ) ) {
676 433 return;
677 434 }
678 435
679 436 foreach ( $styles as $style ) {
680 - if ( $style->post_content['field_width'] === '400px' ) {
437 + if ( $style->post_content['field_width'] == '400px' ) {
681 438 $style->post_content['field_width'] = '100%';
682 439 $frm_style->save( (array) $style );
683 440
684 441 return;
@@ -690,24 +447,19 @@
690 447 * Check if the parent_form_id columns exists.
691 448 * If not, try and add it again
692 449 *
693 450 * @since 2.0.2
694 - *
695 - * @return void
696 451 */
697 452 private function migrate_to_23() {
698 453 global $wpdb;
699 - $exists = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $this->forms . ' LIKE "parent_form_id"' ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
700 -
454 + $exists = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $this->forms . ' LIKE "parent_form_id"' ); // WPCS: unprepared SQL ok.
701 455 if ( empty( $exists ) ) {
702 - $wpdb->query( 'ALTER TABLE ' . $this->forms . ' ADD parent_form_id int(11) default 0' ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
456 + $wpdb->query( 'ALTER TABLE ' . $this->forms . ' ADD parent_form_id int(11) default 0' ); // WPCS: unprepared SQL ok.
703 457 }
704 458 }
705 459
706 460 /**
707 461 * Change field size from character to pixel -- Multiply by 9
708 - *
709 - * @return void
710 462 */
711 463 private function migrate_to_17() {
712 464 $fields = $this->get_fields_with_size();
713 465
@@ -712,9 +464,8 @@
712 464 $fields = $this->get_fields_with_size();
713 465
714 466 foreach ( $fields as $f ) {
715 467 FrmAppHelper::unserialize_or_decode( $f->field_options );
716 -
717 468 if ( empty( $f->field_options['size'] ) || ! is_numeric( $f->field_options['size'] ) ) {
718 469 continue;
719 470 }
720 471
@@ -728,20 +479,16 @@
728 479 }
729 480
730 481 /**
731 482 * Change the characters in widgets to pixels
732 - *
733 - * @return void
734 483 */
735 484 private function adjust_widget_size() {
736 485 $widgets = get_option( 'widget_frm_show_form' );
737 -
738 486 if ( empty( $widgets ) ) {
739 487 return;
740 488 }
741 489
742 490 FrmAppHelper::unserialize_or_decode( $widgets );
743 -
744 491 foreach ( $widgets as $k => $widget ) {
745 492 if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) {
746 493 continue;
747 494 }
@@ -749,17 +496,12 @@
749 496 }
750 497 update_option( 'widget_frm_show_form', $widgets );
751 498 }
752 499
753 - /**
754 - * @param string $size
755 - *
756 - * @return void
757 - */
758 500 private function convert_character_to_px( &$size ) {
759 501 $pixel_conversion = 9;
760 502
761 - $size = round( $pixel_conversion * (int) $size );
503 + $size = round( $pixel_conversion * (int) $size );
762 504 $size .= 'px';
763 505 }
764 506
765 507 /**
@@ -829,13 +571,11 @@
829 571 unset( $sending, $img );
830 572
831 573 $new_default_html = FrmFormsHelper::get_default_html( 'submit' );
832 574 $draft_link = FrmFormsHelper::get_draft_link();
833 -
834 575 foreach ( $forms as $form ) {
835 576 FrmAppHelper::unserialize_or_decode( $form->options );
836 -
837 - if ( empty( $form->options['submit_html'] ) ) {
577 + if ( ! isset( $form->options['submit_html'] ) || empty( $form->options['submit_html'] ) ) {
838 578 continue;
839 579 }
840 580
841 581 if ( $form->options['submit_html'] != $new_default_html && $form->options['submit_html'] == $old_default_html ) {