Completed
Push — master ( 9a0984...263488 )
by Stephanie
11:38 queued 05:45
created
classes/controllers/FrmXMLController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -360,14 +360,14 @@
 block discarded – undo
360 360
 	}
361 361
 
362 362
 	/**
363
-	* Get the fields that should be included in the CSV export
364
-	*
365
-	* @since 2.0.19
366
-	*
367
-	* @param int $form_id
368
-	* @param object $form
369
-	* @return array $csv_fields
370
-	*/
363
+	 * Get the fields that should be included in the CSV export
364
+	 *
365
+	 * @since 2.0.19
366
+	 *
367
+	 * @param int $form_id
368
+	 * @param object $form
369
+	 * @return array $csv_fields
370
+	 */
371 371
 	private static function get_fields_for_csv_export( $form_id, $form ) {
372 372
 		$csv_fields = FrmField::get_all_for_form( $form_id, '', 'include', 'include' );
373 373
 		$no_export_fields = FrmField::no_save_fields();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		) );
111 111
 
112 112
 		$file_type = strtolower( pathinfo( $_FILES['frm_import_file']['name'], PATHINFO_EXTENSION ) );
113
-		if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) {
113
+		if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) {
114 114
 			// allow other file types to be imported
115 115
 			do_action( 'frm_before_import_' . $file_type );
116 116
 			return;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		foreach ( $type as $tb_type ) {
203 203
 			$where = array();
204 204
 			$join = '';
205
-			$table = $tables[ $tb_type ];
205
+			$table = $tables[$tb_type];
206 206
 
207 207
 			$select = $table . '.id';
208 208
 			$query_vars = array();
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 							$table . '.parent_form_id' => $args['ids'],
218 218
 						);
219 219
 					} else {
220
-						$where[ $table . '.status !' ] = 'draft';
220
+						$where[$table . '.status !'] = 'draft';
221 221
 					}
222 222
 					break;
223 223
 				case 'actions':
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 				case 'items':
231 231
 					//$join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)";
232 232
 					if ( $args['ids'] ) {
233
-						$where[ $table . '.form_id' ] = $args['ids'];
233
+						$where[$table . '.form_id'] = $args['ids'];
234 234
 					}
235 235
 					break;
236 236
 				case 'styles':
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 					}
272 272
 			}
273 273
 
274
-			$records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select );
274
+			$records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select );
275 275
 			unset( $tb_type );
276 276
 		}
277 277
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 		$no_export_fields = FrmField::no_save_fields();
374 374
 		foreach ( $csv_fields as $k => $f ) {
375 375
 			if ( in_array( $f->type, $no_export_fields ) ) {
376
-				unset( $csv_fields[ $k ] );
376
+				unset( $csv_fields[$k] );
377 377
 			}
378 378
 		}
379 379
 
Please login to merge, or discard this patch.
classes/controllers/FrmHooksController.php 1 patch
Indentation   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -2,86 +2,86 @@  discard block
 block discarded – undo
2 2
 
3 3
 class FrmHooksController {
4 4
 
5
-    /**
6
-     * Trigger plugin-wide hook loading
7
-     */
8
-    public static function trigger_load_hook( $hooks = 'load_hooks' ) {
9
-        $controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
10
-
11
-        $trigger_hooks = $hooks;
12
-        $hooks = (array) $hooks;
13
-
14
-        if ( 'load_hooks' == $trigger_hooks ) {
15
-            if ( is_admin() ) {
16
-                $hooks[] = 'load_admin_hooks';
17
-                if ( defined( 'DOING_AJAX' ) ) {
18
-                    $hooks[] = 'load_ajax_hooks';
19
-                    $hooks[] = 'load_form_hooks';
20
-                }
21
-            }
22
-
23
-            if ( is_multisite() ) {
24
-                $hooks[] = 'load_multisite_hooks';
25
-            }
26
-        } else {
27
-            // Make sure the hooks are only triggered once
28
-            add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
29
-        }
30
-        unset( $trigger_hooks );
31
-
32
-        // Instansiate Controllers
33
-        foreach ( $controllers as $c ) {
34
-            foreach ( $hooks as $hook ) {
5
+	/**
6
+	 * Trigger plugin-wide hook loading
7
+	 */
8
+	public static function trigger_load_hook( $hooks = 'load_hooks' ) {
9
+		$controllers = apply_filters( 'frm_load_controllers', array( 'FrmHooksController' ) );
10
+
11
+		$trigger_hooks = $hooks;
12
+		$hooks = (array) $hooks;
13
+
14
+		if ( 'load_hooks' == $trigger_hooks ) {
15
+			if ( is_admin() ) {
16
+				$hooks[] = 'load_admin_hooks';
17
+				if ( defined( 'DOING_AJAX' ) ) {
18
+					$hooks[] = 'load_ajax_hooks';
19
+					$hooks[] = 'load_form_hooks';
20
+				}
21
+			}
22
+
23
+			if ( is_multisite() ) {
24
+				$hooks[] = 'load_multisite_hooks';
25
+			}
26
+		} else {
27
+			// Make sure the hooks are only triggered once
28
+			add_filter( 'frm' . str_replace( 'load', '', $trigger_hooks ) . '_loaded', '__return_true' );
29
+		}
30
+		unset( $trigger_hooks );
31
+
32
+		// Instansiate Controllers
33
+		foreach ( $controllers as $c ) {
34
+			foreach ( $hooks as $hook ) {
35 35
 				call_user_func( array( $c, $hook ) );
36 36
 				unset( $hook );
37
-            }
37
+			}
38 38
 			unset( $c );
39
-        }
39
+		}
40 40
 
41
-    }
41
+	}
42 42
 
43
-    public static function trigger_load_form_hooks() {
44
-        self::trigger_load_hook( 'load_form_hooks' );
45
-    }
43
+	public static function trigger_load_form_hooks() {
44
+		self::trigger_load_hook( 'load_form_hooks' );
45
+	}
46 46
 
47 47
 	public static function load_hooks() {
48 48
 		add_action( 'rest_api_init', 'FrmAppController::create_rest_routes', 0 );
49
-        add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
49
+		add_action( 'plugins_loaded', 'FrmAppController::load_lang' );
50 50
 		add_filter( 'widget_text', 'do_shortcode' );
51 51
 
52
-        // Entries controller
53
-        add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
54
-        add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
52
+		// Entries controller
53
+		add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 10, 0 );
54
+		add_action( 'frm_after_entry_processed', 'FrmEntriesController::delete_entry_after_save', 100 );
55 55
 
56
-        // Form Actions Controller
57
-        add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
56
+		// Form Actions Controller
57
+		add_action( 'init', 'FrmFormActionsController::register_post_types', 1 );
58 58
 		add_action( 'frm_after_create_entry', 'FrmFormActionsController::trigger_create_actions', 20, 3 );
59 59
 
60
-        // Forms Controller
61
-        add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
60
+		// Forms Controller
61
+		add_action( 'widgets_init', 'FrmFormsController::register_widgets' );
62 62
 		add_action( 'init', 'FrmFormsController::front_head' );
63
-        add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
64
-        add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
65
-        add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
63
+		add_filter( 'frm_content', 'FrmFormsController::filter_content', 10, 3 );
64
+		add_filter( 'frm_replace_content_shortcodes', 'FrmFormsController::replace_content_shortcodes', 20, 3 );
65
+		add_action( 'admin_bar_init', 'FrmFormsController::admin_bar_css' );
66 66
 		add_action( 'wp_footer', 'FrmFormsController::footer_js', 1, 0 );
67 67
 
68 68
 		add_action( 'wp_scheduled_delete', 'FrmForm::scheduled_delete' );
69 69
 
70
-        // Form Shortcodes
71
-        add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
70
+		// Form Shortcodes
71
+		add_shortcode( 'formidable', 'FrmFormsController::get_form_shortcode' );
72 72
 
73
-        // Styles Controller
74
-        add_action( 'init', 'FrmStylesController::register_post_types', 0 );
75
-        add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
76
-        add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
77
-        add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
78
-    }
73
+		// Styles Controller
74
+		add_action( 'init', 'FrmStylesController::register_post_types', 0 );
75
+		add_filter( 'frm_get_style_opts', 'FrmStylesController::get_style_opts' );
76
+		add_filter( 'frm_add_form_style_class', 'FrmStylesController::get_form_style_class', 10, 2 );
77
+		add_filter( 'frm_show_entry_styles', 'FrmStylesController::show_entry_styles' );
78
+	}
79 79
 
80 80
 	public static function load_admin_hooks() {
81
-        add_action( 'admin_menu', 'FrmAppController::menu', 1 );
81
+		add_action( 'admin_menu', 'FrmAppController::menu', 1 );
82 82
 		add_filter( 'admin_body_class', 'FrmAppController::add_admin_class', 999 );
83
-        add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
84
-        add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
83
+		add_action( 'admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style' );
84
+		add_action( 'admin_notices', 'FrmAppController::pro_get_started_headline' );
85 85
 		add_action( 'admin_init', 'FrmAppController::admin_init', 11 );
86 86
 		add_filter( 'plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link' );
87 87
 		add_filter( 'admin_footer_text', 'FrmAppController::set_footer_text' );
@@ -90,112 +90,112 @@  discard block
 block discarded – undo
90 90
 		add_action( 'admin_menu', 'FrmAddonsController::menu', 100 );
91 91
 		add_filter( 'upgrader_pre_download', 'FrmAddonsController::add_shorten_edd_filename_filter', 10, 4 );
92 92
 
93
-        // Entries Controller
94
-        add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
95
-        add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
96
-        add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
97
-        add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
98
-        add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
99
-
100
-        // Form Actions Controller
101
-        if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
102
-            add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
103
-        }
104
-        add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
105
-
106
-        // Forms Controller
107
-        add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
108
-        add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
109
-
110
-        add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
-        add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
93
+		// Entries Controller
94
+		add_action( 'admin_menu', 'FrmEntriesController::menu', 12 );
95
+		add_filter( 'contextual_help', 'FrmEntriesController::contextual_help', 10, 3 );
96
+		add_filter( 'set-screen-option', 'FrmEntriesController::save_per_page', 10, 3 );
97
+		add_filter( 'update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5 );
98
+		add_action( 'updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4 );
99
+
100
+		// Form Actions Controller
101
+		if ( FrmAppHelper::is_admin_page( 'formidable' ) ) {
102
+			add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' );
103
+		}
104
+		add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 );
105
+
106
+		// Forms Controller
107
+		add_action( 'admin_menu', 'FrmFormsController::menu', 10 );
108
+		add_action( 'admin_head-toplevel_page_formidable', 'FrmFormsController::head' );
109
+
110
+		add_filter( 'set-screen-option', 'FrmFormsController::save_per_page', 10, 3 );
111
+		add_action( 'admin_footer', 'FrmFormsController::insert_form_popup' );
112 112
 		add_action( 'media_buttons', 'FrmFormsController::insert_form_button' );
113 113
 
114
-        // Forms Model
115
-        add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
114
+		// Forms Model
115
+		add_action( 'frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2 );
116 116
 
117
-        // Settings Controller
118
-        add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
119
-        add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
117
+		// Settings Controller
118
+		add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
119
+		add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
120 120
 		add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' );
121 121
 
122
-        // Styles Controller
123
-        add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
124
-        add_action( 'admin_init', 'FrmStylesController::admin_init' );
122
+		// Styles Controller
123
+		add_action( 'admin_menu', 'FrmStylesController::menu', 14 );
124
+		add_action( 'admin_init', 'FrmStylesController::admin_init' );
125 125
 
126
-        // XML Controller
127
-        add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
128
-    }
126
+		// XML Controller
127
+		add_action( 'admin_menu', 'FrmXMLController::menu', 41 );
128
+	}
129 129
 
130 130
 	public static function load_ajax_hooks() {
131 131
 		add_action( 'wp_ajax_frm_install', 'FrmAppController::ajax_install' );
132
-        add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
133
-        add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
132
+		add_action( 'wp_ajax_frm_uninstall', 'FrmAppController::uninstall' );
133
+		add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
134 134
 
135 135
 		// Addons
136 136
 		add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
137 137
 		add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
138 138
 		add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' );
139 139
 
140
-        // Fields Controller
141
-        add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
142
-        add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
143
-        add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
144
-        add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
145
-        add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
146
-        add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
147
-        add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
148
-        add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
149
-        add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
150
-
151
-        // Form Actions Controller
152
-        add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
153
-        add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
154
-
155
-        // Forms Controller
140
+		// Fields Controller
141
+		add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
142
+		add_action( 'wp_ajax_frm_insert_field', 'FrmFieldsController::create' );
143
+		add_action( 'wp_ajax_frm_update_ajax_option', 'FrmFieldsController::update_ajax_option' );
144
+		add_action( 'wp_ajax_frm_duplicate_field', 'FrmFieldsController::duplicate' );
145
+		add_action( 'wp_ajax_frm_delete_field', 'FrmFieldsController::destroy' );
146
+		add_action( 'wp_ajax_frm_add_field_option', 'FrmFieldsController::add_option' );
147
+		add_action( 'wp_ajax_frm_import_choices', 'FrmFieldsController::import_choices' );
148
+		add_action( 'wp_ajax_frm_import_options', 'FrmFieldsController::import_options' );
149
+		add_action( 'wp_ajax_frm_update_field_order', 'FrmFieldsController::update_order' );
150
+
151
+		// Form Actions Controller
152
+		add_action( 'wp_ajax_frm_add_form_action', 'FrmFormActionsController::add_form_action' );
153
+		add_action( 'wp_ajax_frm_form_action_fill', 'FrmFormActionsController::fill_action' );
154
+
155
+		// Forms Controller
156 156
 		add_action( 'wp_ajax_frm_create_from_template', 'FrmFormsController::_create_from_template' );
157 157
 		add_action( 'wp_ajax_frm_save_form', 'FrmFormsController::route' );
158
-        add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
159
-        add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
160
-        add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
161
-        add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
162
-
163
-        // Styles Controller
164
-        add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
165
-        add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
166
-        add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
167
-        add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
158
+		add_action( 'wp_ajax_frm_get_default_html', 'FrmFormsController::get_email_html' );
159
+		add_action( 'wp_ajax_frm_get_shortcode_opts', 'FrmFormsController::get_shortcode_opts' );
160
+		add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
161
+		add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
162
+
163
+		// Styles Controller
164
+		add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
165
+		add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
166
+		add_action( 'wp_ajax_frmpro_load_css', 'FrmStylesController::load_css' );
167
+		add_action( 'wp_ajax_nopriv_frmpro_load_css', 'FrmStylesController::load_css' );
168 168
 		add_action( 'wp_ajax_frmpro_css', 'FrmStylesController::load_saved_css' );
169 169
 		add_action( 'wp_ajax_nopriv_frmpro_css', 'FrmStylesController::load_saved_css' );
170 170
 
171
-        // XML Controller
171
+		// XML Controller
172 172
 		add_action( 'wp_ajax_frm_entries_csv', 'FrmXMLController::csv' );
173 173
 		add_action( 'wp_ajax_nopriv_frm_entries_csv', 'FrmXMLController::csv' );
174
-        add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
175
-    }
174
+		add_action( 'wp_ajax_frm_export_xml', 'FrmXMLController::export_xml' );
175
+	}
176 176
 
177 177
 	public static function load_form_hooks() {
178
-        // Fields Controller
179
-        add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
180
-        add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
181
-        add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
182
-        add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
178
+		// Fields Controller
179
+		add_filter( 'frm_field_type', 'FrmFieldsController::change_type' );
180
+		add_action( 'frm_field_input_html', 'FrmFieldsController::input_html' );
181
+		add_filter( 'frm_field_value_saved', 'FrmFieldsController::check_value', 50, 3 );
182
+		add_filter( 'frm_field_label_seen', 'FrmFieldsController::check_label' );
183 183
 
184 184
 		// Forms Controller
185 185
 		add_filter( 'frm_form_classes', 'FrmFormsController::form_classes' );
186 186
 
187
-        // Styles Controller
188
-        add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
189
-    }
187
+		// Styles Controller
188
+		add_filter( 'frm_use_important_width', 'FrmStylesController::important_style', 10, 2 );
189
+	}
190 190
 
191 191
 	public static function load_view_hooks() {
192
-        // Hooks go here when a view is loaded
193
-    }
192
+		// Hooks go here when a view is loaded
193
+	}
194 194
 
195 195
 	public static function load_multisite_hooks() {
196 196
 		add_action( 'wpmu_upgrade_site', 'FrmAppController::network_upgrade_site' );
197 197
 
198
-        // drop tables when mu site is deleted
199
-        add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
200
-    }
198
+		// drop tables when mu site is deleted
199
+		add_filter( 'wpmu_drop_tables', 'FrmAppController::drop_tables' );
200
+	}
201 201
 }
Please login to merge, or discard this patch.
classes/views/xml/xml.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 <?php
8 8
 foreach ( $type as $tb_type ) {
9 9
 
10
-	if ( ! isset( $tables[ $tb_type ] ) ) {
10
+	if ( ! isset( $tables[$tb_type] ) ) {
11 11
 		do_action( 'frm_xml_import_' . $tb_type, $args );
12 12
 		continue;
13 13
 	}
14 14
 
15 15
 	//no records
16
-	if ( ! isset( $records[ $tb_type ] ) ) {
16
+	if ( ! isset( $records[$tb_type] ) ) {
17 17
 		continue;
18 18
 	}
19 19
 
20
-	$item_ids = $records[ $tb_type ];
20
+	$item_ids = $records[$tb_type];
21 21
 	if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) {
22 22
 		include( dirname( __FILE__ ) . '/posts_xml.php' );
23 23
 	} elseif ( file_exists( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ) ) {
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		include( FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php' );
27 27
 	}
28 28
 
29
-	unset( $item_ids, $records[ $tb_type ], $tb_type );
29
+	unset( $item_ids, $records[$tb_type], $tb_type );
30 30
 }
31 31
 
32 32
 ?>
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field_links.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 				} else {
80 80
 					$field_label = '<i class="' . esc_attr( FrmFormsHelper::get_field_link_icon( $field_type ) ) . ' frm_animate_bg"></i>';
81 81
 					$field_label .= ' <span>' . FrmFormsHelper::get_field_link_name( $field_type ) . '</span>';
82
-                    ?>
82
+					?>
83 83
 					<li class="frmbutton button <?php echo esc_attr( $no_allow_class . ' frm_t' . str_replace( '|', '-', $field_key ) ) ?>" id="<?php echo esc_attr( $field_key ) ?>">
84 84
 						<?php echo FrmAppHelper::kses( apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ), array( 'a', 'i', 'span' ) ) ?>
85 85
 					</li>
Please login to merge, or discard this patch.
classes/views/frm-forms/form.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php wp_nonce_field('frm_save_form_nonce', 'frm_save_form'); ?>
1
+<?php wp_nonce_field( 'frm_save_form_nonce', 'frm_save_form' ); ?>
2 2
 <input type="hidden" name="status" value="<?php echo esc_attr( $values['status'] ); ?>" />
3 3
 <input type="hidden" name="new_status" value="" />
4 4
 
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	    <input type="text" name="name" value="<?php echo esc_attr( $form->name ); ?>" id="title" placeholder="<?php esc_attr_e( 'Enter title here' ) ?>" />
10 10
 	</div>
11 11
 
12
-    <div class="frm_no_fields <?php echo ( isset($values['fields']) && ! empty($values['fields']) ) ? 'frm_hidden' : ''; ?>">
12
+    <div class="frm_no_fields <?php echo ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) ? 'frm_hidden' : ''; ?>">
13 13
 	    <div class="alignleft sketch1">
14 14
 			<img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/sketch_arrow1.png' ); ?>" alt="" />
15 15
 	    </div>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 if ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) {
47 47
 	$values['count'] = 0;
48 48
 	foreach ( $values['fields'] as $field ) {
49
-		$values['count']++;
49
+		$values['count'] ++;
50 50
 		FrmFieldsController::load_single_field( $field, $values );
51 51
 		unset( $field );
52 52
 	}
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 </ul>
56 56
 
57 57
 <p>
58
-	<?php $page_action = FrmAppHelper::get_param('frm_action'); ?>
58
+	<?php $page_action = FrmAppHelper::get_param( 'frm_action' ); ?>
59 59
 	<button class="frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary frm_button_submit" type="button"><?php echo esc_html( ( $page_action == 'edit' || $page_action == 'update' ) ? __( 'Update', 'formidable' ) : __( 'Create', 'formidable' ) ); ?></button>
60 60
 </p>
61 61
 
Please login to merge, or discard this patch.
classes/views/frm-forms/sidebar-settings.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 	<div id="frm-fixed">
4 4
     <?php
5 5
 
6
-    if ( ! isset($hide_preview) || ! $hide_preview ) {
6
+	if ( ! isset($hide_preview) || ! $hide_preview ) {
7 7
 		include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_publish_box.php' );
8
-    }
8
+	}
9 9
 	?>
10 10
 
11 11
 	<div id="frm_set_height_ele"></div>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	<div id="frm-fixed">
4 4
     <?php
5 5
 
6
-    if ( ! isset($hide_preview) || ! $hide_preview ) {
6
+    if ( ! isset( $hide_preview ) || ! $hide_preview ) {
7 7
 		include( FrmAppHelper::plugin_path() . '/classes/views/frm-forms/_publish_box.php' );
8 8
     }
9 9
 	?>
Please login to merge, or discard this patch.
classes/views/frm-forms/add_field.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
 				<a href="javascript:void(0);" id="other_button_<?php echo esc_attr( $field['id'] ); ?>" data-opttype="other" data-ftype="<?php echo esc_attr( $field['type'] ) ?>" class="button frm_cb_button frm_add_opt<?php echo ( in_array( $field['type'], array( 'radio', 'select' ) ) && $field['other'] == true ? ' frm_hidden' : '' ); ?>"><?php esc_html_e( 'Add "Other"', 'formidable' ) ?></a>
72 72
                 <input type="hidden" value="<?php echo esc_attr( $field['other'] ); ?>" id="other_input_<?php echo esc_attr( $field['id'] ); ?>" name="field_options[other_<?php echo esc_attr( $field['id'] ); ?>]">
73 73
             <?php
74
-            }
74
+			}
75 75
 
76 76
 			if ( ! isset( $field['post_field'] ) || $field['post_field'] != 'post_category' ) {
77
-            ?>
77
+			?>
78 78
 			<a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=frm_import_choices&field_id=' . $field['id'] . '&TB_iframe=1' ) ) ?>" title="<?php echo esc_attr( FrmAppHelper::truncate( strip_tags( str_replace( '"', '&quot;', $field['name'] ) ), 20 ) . ' ' . __( 'Field Choices', 'formidable' ) ); ?>" class="thickbox frm_orange">
79 79
 				<?php esc_html_e( 'Bulk Edit Options', 'formidable' ); ?>
80 80
 			</a>
81 81
             <?php } ?>
82 82
         </div>
83 83
 <?php
84
-    }
84
+	}
85 85
 ?>
86 86
     </div>
87 87
 <?php
@@ -124,22 +124,22 @@  discard block
 block discarded – undo
124 124
 						<?php esc_html_e( 'Required', 'formidable' ); ?>
125 125
 					</label>
126 126
                 <?php
127
-                }
127
+				}
128 128
 
129 129
 				if ( $display['unique'] ) {
130
-                    if ( ! isset( $field['unique'] ) ) {
131
-                        $field['unique'] = false;
132
-                    }
130
+					if ( ! isset( $field['unique'] ) ) {
131
+						$field['unique'] = false;
132
+					}
133 133
 					?>
134 134
                 <label for="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Unique: Do not allow the same response multiple times. For example, if one user enters \'Joe\', then no one else will be allowed to enter the same name.', 'formidable' ) ?>"><input type="checkbox" name="field_options[unique_<?php echo esc_attr( $field['id'] ) ?>]" id="frm_uniq_field_<?php echo esc_attr( $field['id'] ) ?>" value="1" <?php checked( $field['unique'], 1 ); ?> class="frm_mark_unique" />
135 135
 					<?php esc_html_e( 'Unique', 'formidable' ); ?>
136 136
 				</label>
137 137
                 <?php
138
-                }
138
+				}
139 139
 
140 140
 				if ( $display['read_only'] ) {
141
-                    if ( ! isset( $field['read_only'] ) ) {
142
-                        $field['read_only'] = false;
141
+					if ( ! isset( $field['read_only'] ) ) {
142
+						$field['read_only'] = false;
143 143
 					}
144 144
 					?>
145 145
 				<label for="frm_read_only_field_<?php echo esc_attr( $field['id'] ) ?>" class="frm_inline_label frm_help" title="<?php esc_attr_e( 'Read Only: Show this field but do not allow the field value to be edited from the front-end.', 'formidable' ) ?>" >
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 				<?php
150 150
 				}
151 151
 
152
-                do_action( 'frm_field_options_form_top', $field, $display, $values );
152
+				do_action( 'frm_field_options_form_top', $field, $display, $values );
153 153
 
154 154
 				if ( $display['required'] ) {
155 155
 				?>
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 						</td>
198 198
 					</tr>
199 199
 				<?php
200
-                }
200
+				}
201 201
 
202 202
 				// Field Size
203 203
 				if ( $display['size'] ) {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 				do_action( 'frm_field_options_form', $field, $display, $values );
278 278
 
279 279
 				if ( $display['required'] || $display['invalid'] || $display['unique'] || $display['conf_field'] ) {
280
-                ?>
280
+				?>
281 281
 					<tr class="frm_validation_msg <?php echo ( $display['invalid'] || $field['required'] || FrmField::is_option_true( $field, 'unique' ) || FrmField::is_option_true( $field, 'conf_field' ) ) ? '' : 'frm_hidden'; ?>">
282 282
 					<td colspan="2">
283 283
                     <div class="menu-settings">
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                             <input type="text" name="field_options[blank_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['blank'] ); ?>" />
292 292
                         </p>
293 293
                         <?php
294
-                        }
294
+						}
295 295
 
296 296
 						if ( $display['invalid'] ) {
297 297
 							$hidden = FrmField::is_field_type( $field, 'text' ) && ! FrmField::is_option_true( $field, 'format' );
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
                             <input type="text" name="field_options[unique_msg_<?php echo esc_attr( $field['id'] ) ?>]" value="<?php echo esc_attr( $field['unique_msg'] ); ?>" />
311 311
                         </p>
312 312
                         <?php
313
-                        }
313
+						}
314 314
 
315 315
 						if ( $display['conf_field'] ) {
316 316
 						?>
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/field-captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 $frm_settings = FrmAppHelper::get_settings();
3 3
 if ( empty( $frm_settings->pubkey ) ) { ?>
4
-    <div class="howto frm_no_captcha_text"><?php printf(__( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Secret Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>') ?></div>
4
+    <div class="howto frm_no_captcha_text"><?php printf( __( 'Your captcha will not appear on your form until you %1$sset up%2$s the Site and Secret Keys', 'formidable' ), '<a href="?page=formidable-settings">', '</a>' ) ?></div>
5 5
 <?php } ?>
6 6
 <img src="<?php echo esc_url( FrmAppHelper::plugin_url() . '/images/recaptcha.png' ) ?>" class="recaptcha_placeholder" alt="reCaptcha"/>
7 7
 <input type="hidden" name="<?php echo esc_attr( $field_name ) ?>" value="1" />
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/field-multiple.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 		'type'       => $field['type'],
8 8
 	) );
9 9
 } else {
10
-    do_action( 'frm_add_multiple_opts_labels', $field ); ?>
10
+	do_action( 'frm_add_multiple_opts_labels', $field ); ?>
11 11
     <ul id="frm_field_<?php echo esc_attr( $field['id'] ) ?>_opts" class="frm_sortable_field_opts frm_clear<?php echo ( count( $field['options'] ) > 10 ) ? ' frm_field_opts_list' : ''; ?>">
12 12
 		<?php FrmFieldsHelper::show_single_option( $field ); ?>
13 13
     </ul>
Please login to merge, or discard this patch.