Completed
Branch uploads (22f1aa)
by Stephanie
03:44
created
classes/controllers/FrmSettingsController.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -2,78 +2,78 @@
 block discarded – undo
2 2
 
3 3
 class FrmSettingsController {
4 4
 
5
-    public static function menu() {
5
+	public static function menu() {
6 6
 		// Make sure admins can see the menu items
7 7
 		FrmAppHelper::force_capability( 'frm_change_settings' );
8 8
 
9
-        add_submenu_page( 'formidable', 'Formidable | ' . __( 'Global Settings', 'formidable' ), __( 'Global Settings', 'formidable' ), 'frm_change_settings', 'formidable-settings', 'FrmSettingsController::route' );
10
-    }
9
+		add_submenu_page( 'formidable', 'Formidable | ' . __( 'Global Settings', 'formidable' ), __( 'Global Settings', 'formidable' ), 'frm_change_settings', 'formidable-settings', 'FrmSettingsController::route' );
10
+	}
11 11
 
12
-    public static function license_box() {
12
+	public static function license_box() {
13 13
 		$a = FrmAppHelper::simple_get( 't', 'sanitize_title', 'general_settings' );
14
-        include( FrmAppHelper::plugin_path() . '/classes/views/frm-settings/license_box.php' );
15
-    }
14
+		include( FrmAppHelper::plugin_path() . '/classes/views/frm-settings/license_box.php' );
15
+	}
16 16
 
17
-    public static function display_form( $errors = array(), $message = '' ) {
18
-        global $frm_vars;
17
+	public static function display_form( $errors = array(), $message = '' ) {
18
+		global $frm_vars;
19 19
 
20
-        $frm_settings = FrmAppHelper::get_settings();
21
-        $frm_roles = FrmAppHelper::frm_capabilities();
20
+		$frm_settings = FrmAppHelper::get_settings();
21
+		$frm_roles = FrmAppHelper::frm_capabilities();
22 22
 
23
-        $uploads = wp_upload_dir();
24
-        $target_path = $uploads['basedir'] . '/formidable/css';
23
+		$uploads = wp_upload_dir();
24
+		$target_path = $uploads['basedir'] . '/formidable/css';
25 25
 
26 26
 		$sections = array();
27 27
 		if ( apply_filters( 'frm_include_addon_page', false ) ) {
28 28
 			$sections['licenses'] = array( 'class' => 'FrmAddonsController', 'function' => 'show_addons' );
29 29
 		}
30
-        $sections = apply_filters( 'frm_add_settings_section', $sections );
30
+		$sections = apply_filters( 'frm_add_settings_section', $sections );
31 31
 
32
-        $captcha_lang = FrmAppHelper::locales( 'captcha' );
32
+		$captcha_lang = FrmAppHelper::locales( 'captcha' );
33 33
 
34
-        require( FrmAppHelper::plugin_path() . '/classes/views/frm-settings/form.php' );
35
-    }
34
+		require( FrmAppHelper::plugin_path() . '/classes/views/frm-settings/form.php' );
35
+	}
36 36
 
37
-    public static function process_form( $stop_load = false ) {
38
-        global $frm_vars;
37
+	public static function process_form( $stop_load = false ) {
38
+		global $frm_vars;
39 39
 
40
-        $frm_settings = FrmAppHelper::get_settings();
40
+		$frm_settings = FrmAppHelper::get_settings();
41 41
 
42 42
 		$process_form = FrmAppHelper::get_post_param( 'process_form', '', 'sanitize_text_field' );
43 43
 		if ( ! wp_verify_nonce( $process_form, 'process_form_nonce' ) ) {
44
-            wp_die( $frm_settings->admin_permission );
45
-        }
44
+			wp_die( $frm_settings->admin_permission );
45
+		}
46 46
 
47
-        $errors = array();
48
-        $message = '';
47
+		$errors = array();
48
+		$message = '';
49 49
 
50
-        if ( ! isset( $frm_vars['settings_routed'] ) || ! $frm_vars['settings_routed'] ) {
51
-            //$errors = $frm_settings->validate($_POST,array());
52
-            $frm_settings->update( stripslashes_deep( $_POST ) );
50
+		if ( ! isset( $frm_vars['settings_routed'] ) || ! $frm_vars['settings_routed'] ) {
51
+			//$errors = $frm_settings->validate($_POST,array());
52
+			$frm_settings->update( stripslashes_deep( $_POST ) );
53 53
 
54
-            if ( empty( $errors ) ) {
55
-                $frm_settings->store();
56
-                $message = __( 'Settings Saved', 'formidable' );
57
-            }
58
-        } else {
59
-            $message = __( 'Settings Saved', 'formidable' );
60
-        }
54
+			if ( empty( $errors ) ) {
55
+				$frm_settings->store();
56
+				$message = __( 'Settings Saved', 'formidable' );
57
+			}
58
+		} else {
59
+			$message = __( 'Settings Saved', 'formidable' );
60
+		}
61 61
 
62 62
 		if ( $stop_load == 'stop_load' ) {
63
-            $frm_vars['settings_routed'] = true;
64
-            return;
65
-        }
63
+			$frm_vars['settings_routed'] = true;
64
+			return;
65
+		}
66 66
 
67
-        self::display_form( $errors, $message );
68
-    }
67
+		self::display_form( $errors, $message );
68
+	}
69 69
 
70
-    public static function route( $stop_load = false ) {
71
-        $action = isset( $_REQUEST['frm_action'] ) ? 'frm_action' : 'action';
70
+	public static function route( $stop_load = false ) {
71
+		$action = isset( $_REQUEST['frm_action'] ) ? 'frm_action' : 'action';
72 72
 		$action = FrmAppHelper::get_param( $action, '', 'get', 'sanitize_title' );
73
-        if ( $action == 'process-form' ) {
74
-            return self::process_form( $stop_load );
75
-        } else if ( $stop_load != 'stop_load' ) {
76
-            return self::display_form();
77
-        }
78
-    }
73
+		if ( $action == 'process-form' ) {
74
+			return self::process_form( $stop_load );
75
+		} else if ( $stop_load != 'stop_load' ) {
76
+			return self::display_form();
77
+		}
78
+	}
79 79
 }
Please login to merge, or discard this patch.
classes/models/FrmEntryFormat.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -126,19 +126,19 @@
 block discarded – undo
126 126
 	}
127 127
 
128 128
 	/**
129
-	* Flatten multi-dimensional array for multi-file upload fields
130
-	* @since 2.0.9
131
-	*/
129
+	 * Flatten multi-dimensional array for multi-file upload fields
130
+	 * @since 2.0.9
131
+	 */
132 132
 	public static function flatten_multi_file_upload( $field, &$val ) {
133 133
 		if ( $field->type == 'file' && FrmField::is_option_true( $field, 'multiple' ) ) {
134 134
 			$val = FrmAppHelper::array_flatten( $val );
135 135
 		}
136 136
 	}
137 137
 
138
-    /**
139
-     * Replace returns with HTML line breaks for display
140
-     * @since 2.0.9
141
-     */
138
+	/**
139
+	 * Replace returns with HTML line breaks for display
140
+	 * @since 2.0.9
141
+	 */
142 142
 	public static function textarea_display_value( $type, $plain_text, &$value ) {
143 143
 		if ( $type == 'textarea' && ! $plain_text ) {
144 144
 			$value = str_replace( array( "\r\n", "\r", "\n" ), ' <br/>', $value );
Please login to merge, or discard this patch.
classes/views/frm-entries/_sidebar-shared-pub.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! isset( $entry) ) {
3
-    $entry = $record;
3
+	$entry = $record;
4 4
 } ?>
5 5
 
6 6
 <div class="misc-pub-section curtime misc-pub-curtime">
7 7
     <span id="timestamp">
8 8
     <?php
9
-    $date_format = __( 'M j, Y @ G:i' );
9
+	$date_format = __( 'M j, Y @ G:i' );
10 10
 	printf( __( 'Published on: <b>%1$s</b>' ), FrmAppHelper::get_localized_date( $date_format, $entry->created_at ) ); ?>
11 11
     </span>
12 12
 </div>
Please login to merge, or discard this patch.
classes/views/frm-entries/errors.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,30 +4,30 @@
 block discarded – undo
4 4
 <?php
5 5
 }
6 6
 if ( isset( $message ) && $message != '' ) {
7
-    if ( FrmAppHelper::is_admin() ) {
7
+	if ( FrmAppHelper::is_admin() ) {
8 8
 		?><div id="message" class="frm_message updated frm_msg_padding"><?php echo wp_kses_post( $message ) ?></div><?php
9 9
 	} else {
10
-        FrmFormsHelper::get_scroll_js($form->id);
10
+		FrmFormsHelper::get_scroll_js($form->id);
11 11
 
12 12
 		// we need to allow scripts here for javascript in the success message
13 13
 		echo $message;
14
-    }
14
+	}
15 15
 }
16 16
 
17 17
 if ( isset($errors) && is_array( $errors ) && ! empty( $errors ) ) {
18 18
 
19 19
 	if ( isset( $form ) && is_object( $form ) ) {
20
-    	FrmFormsHelper::get_scroll_js( $form->id );
20
+		FrmFormsHelper::get_scroll_js( $form->id );
21 21
 	} ?>
22 22
 <div class="frm_error_style">
23 23
 <?php
24 24
 $img = '';
25 25
 if ( ! FrmAppHelper::is_admin() ) {
26
-    $img = apply_filters('frm_error_icon', $img);
27
-    if ( $img && ! empty($img) ) {
28
-    ?><img src="<?php echo esc_attr( $img ) ?>" alt="" />
26
+	$img = apply_filters('frm_error_icon', $img);
27
+	if ( $img && ! empty($img) ) {
28
+	?><img src="<?php echo esc_attr( $img ) ?>" alt="" />
29 29
 <?php
30
-    }
30
+	}
31 31
 }
32 32
 
33 33
 FrmFormsHelper::show_errors( compact( 'img', 'errors' ) );
Please login to merge, or discard this patch.
classes/views/frm-entries/form.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
     </div>
6 6
 </div>
7 7
 <?php
8
-    return;
8
+	return;
9 9
 }
10 10
 
11 11
 global $frm_vars;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		} else {
39 39
 			do_action( 'frm_show_other_field_type', $field, $form, array( 'action' => $form_action ) );
40 40
 		}
41
-    	do_action('frm_get_field_scripts', $field, $form, $form->id);
41
+		do_action('frm_get_field_scripts', $field, $form, $form->id);
42 42
 	}
43 43
 }
44 44
 
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 
64 64
 // close open collapsible toggle div
65 65
 if ( isset($frm_vars['collapse_div']) && $frm_vars['collapse_div'] ) {
66
-    echo "</div>\n";
67
-    unset($frm_vars['collapse_div']);
66
+	echo "</div>\n";
67
+	unset($frm_vars['collapse_div']);
68 68
 }
69 69
 
70 70
 echo FrmFormsHelper::replace_shortcodes($values['after_html'], $form);
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 }
78 78
 
79 79
 if ( FrmForm::show_submit( $form ) ) {
80
-    unset($values['fields']);
81
-    FrmFormsHelper::get_custom_submit($values['submit_html'], $form, $submit, $form_action, $values);
80
+	unset($values['fields']);
81
+	FrmFormsHelper::get_custom_submit($values['submit_html'], $form, $submit, $form_action, $values);
82 82
 }
83 83
 ?>
84 84
 </fieldset>
Please login to merge, or discard this patch.
classes/views/frm-entries/show.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -15,43 +15,43 @@
 block discarded – undo
15 15
                     <div class="inside">
16 16
                         <table class="form-table"><tbody>
17 17
                         <?php
18
-                        $first_h3 = 'frm_first_h3';
19
-                        foreach ( $fields as $field ) {
18
+						$first_h3 = 'frm_first_h3';
19
+						foreach ( $fields as $field ) {
20 20
 							if ( in_array( $field->type, array( 'captcha', 'html', 'end_divider', 'form' ) ) ) {
21
-                                continue;
22
-                            }
21
+								continue;
22
+							}
23 23
 
24
-                            if ( in_array($field->type, array( 'break', 'divider' ) ) ) {
25
-                            ?>
24
+							if ( in_array($field->type, array( 'break', 'divider' ) ) ) {
25
+							?>
26 26
                         </tbody></table>
27 27
                         <br/><h3 class="<?php echo esc_attr( $first_h3 ) ?>"><?php echo esc_html( $field->name ) ?></h3>
28 28
                         <table class="form-table"><tbody>
29 29
                         <?php
30
-                                $first_h3 = '';
31
-                            } else {
32
-                        ?>
30
+								$first_h3 = '';
31
+							} else {
32
+						?>
33 33
                         <tr>
34 34
                             <th scope="row"><?php echo esc_html( $field->name ) ?>:</th>
35 35
                             <td>
36 36
                             <?php
37 37
 							$embedded_field_id = ( $entry->form_id != $field->form_id ) ? 'form' . $field->form_id : 0;
38
-                            $atts = array(
39
-                                'type' => $field->type, 'post_id' => $entry->post_id,
40
-                                'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id,
41
-                                'embedded_field_id' => $embedded_field_id,
42
-                            );
43
-                            echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts);
38
+							$atts = array(
39
+								'type' => $field->type, 'post_id' => $entry->post_id,
40
+								'show_filename' => true, 'show_icon' => true, 'entry_id' => $entry->id,
41
+								'embedded_field_id' => $embedded_field_id,
42
+							);
43
+							echo $display_value = FrmEntriesHelper::prepare_display_value($entry, $field, $atts);
44 44
 
45
-                            if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) {
46
-                                $to_emails[] = $display_value;
47
-                            }
48
-                            ?>
45
+							if ( is_email($display_value) && ! in_array($display_value, $to_emails) ) {
46
+								$to_emails[] = $display_value;
47
+							}
48
+							?>
49 49
                             </td>
50 50
                         </tr>
51 51
                         <?php }
52
-                        }
52
+						}
53 53
 
54
-                        ?>
54
+						?>
55 55
 
56 56
                         <?php if ( $entry->parent_item_id ) { ?>
57 57
                         <tr><th><?php _e( 'Parent Entry ID', 'formidable' ) ?>:</th>
Please login to merge, or discard this patch.
classes/views/frm-entries/sidebar-shared.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,18 +66,18 @@
 block discarded – undo
66 66
         <?php } ?>
67 67
 
68 68
         <?php
69
-        foreach ( (array) $data as $k => $d ) {
69
+		foreach ( (array) $data as $k => $d ) {
70 70
 			if ( in_array( $k, array( 'browser', 'referrer' ) ) ) {
71
-                continue;
72
-            }
73
-        ?>
71
+				continue;
72
+			}
73
+		?>
74 74
         <div class="misc-pub-section">
75 75
 			<b><?php echo sanitize_text_field( ucfirst( str_replace( '-', ' ', $k ) ) ); ?></b>:
76 76
 			<?php echo wp_kses_post( implode( ', ', (array) $d ) ); ?>
77 77
         </div>
78 78
         <?php
79
-            unset($k, $d);
80
-        }
81
-        ?>
79
+			unset($k, $d);
80
+		}
81
+		?>
82 82
     </div>
83 83
 </div>
Please login to merge, or discard this patch.
classes/views/frm-form-actions/_email_settings.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
     </td>
7 7
     <td class="frm_bcc_cc_container">
8 8
         <a href="javascript:void(0)" class="button frm_email_buttons frm_bcc_button <?php
9
-        echo ( ! empty($form_action->post_content['bcc'])  ? 'frm_hidden' : '' );
10
-        ?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a>
9
+		echo ( ! empty($form_action->post_content['bcc'])  ? 'frm_hidden' : '' );
10
+		?>" data-emailrow="bcc"><?php _e( 'BCC', 'formidable' ) ?></a>
11 11
         <a href="javascript:void(0)" class="button frm_email_buttons frm_cc_button <?php
12
-        echo ( ! empty($form_action->post_content['cc'])  ? 'frm_hidden' : '' );
13
-        ?>" data-emailrow="cc"><?php _e( 'CC', 'formidable' ) ?></a>
12
+		echo ( ! empty($form_action->post_content['cc'])  ? 'frm_hidden' : '' );
13
+		?>" data-emailrow="cc"><?php _e( 'CC', 'formidable' ) ?></a>
14 14
     </td>
15 15
 </tr>
16 16
 <tr id="frm_cc_row" class="<?php echo empty( $form_action->post_content['cc'] )  ? 'frm_hidden' : ''; ?>" >
Please login to merge, or discard this patch.
classes/views/frm-form-actions/default_actions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 class FrmDefPostAction extends FrmFormAction {
4 4
 	public function __construct() {
5 5
 		$action_ops = FrmFormAction::default_action_opts();
6
-	    $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before';
6
+		$action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before';
7 7
 
8 8
 		parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
9 9
 	}
Please login to merge, or discard this patch.