Completed
Branch uploads (22f1aa)
by Stephanie
03:44
created
classes/controllers/FrmHooksController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,8 @@
 block discarded – undo
143 143
         add_action( 'wp_ajax_frm_deauthorize', 'FrmAppController::deauthorize' );
144 144
 
145 145
 		// Addons Controller
146
-		add_action('wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
147
-		add_action('wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
146
+		add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
147
+		add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
148 148
 
149 149
         // Fields Controller
150 150
         add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
Please login to merge, or discard this patch.
classes/models/FrmSettings.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class FrmSettings{
3
+class FrmSettings {
4 4
     public $option_name = 'frm_options';
5 5
     public $menu;
6 6
     public $mu_menu;
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
     public $re_msg;
29 29
 
30 30
     public function __construct() {
31
-        if ( ! defined('ABSPATH') ) {
32
-            die('You are not allowed to call this page directly.');
31
+        if ( ! defined( 'ABSPATH' ) ) {
32
+            die( 'You are not allowed to call this page directly.' );
33 33
         }
34 34
 
35
-        $settings = get_transient($this->option_name);
35
+        $settings = get_transient( $this->option_name );
36 36
 
37
-        if ( ! is_object($settings) ) {
38
-            $settings = $this->translate_settings($settings);
37
+        if ( ! is_object( $settings ) ) {
38
+            $settings = $this->translate_settings( $settings );
39 39
         }
40 40
 
41 41
         foreach ( $settings as $setting_name => $setting ) {
42 42
             $this->{$setting_name} = $setting;
43
-            unset($setting_name, $setting);
43
+            unset( $setting_name, $setting );
44 44
         }
45 45
 
46 46
         $this->set_default_options();
@@ -48,24 +48,24 @@  discard block
 block discarded – undo
48 48
 
49 49
 	private function translate_settings( $settings ) {
50 50
         if ( $settings ) { //workaround for W3 total cache conflict
51
-            return unserialize(serialize($settings));
51
+            return unserialize( serialize( $settings ) );
52 52
         }
53 53
 
54
-        $settings = get_option($this->option_name);
55
-        if ( is_object($settings) ) {
56
-            set_transient($this->option_name, $settings);
54
+        $settings = get_option( $this->option_name );
55
+        if ( is_object( $settings ) ) {
56
+            set_transient( $this->option_name, $settings );
57 57
             return $settings;
58 58
         }
59 59
 
60 60
         // If unserializing didn't work
61 61
         if ( $settings ) { //workaround for W3 total cache conflict
62
-            $settings = unserialize(serialize($settings));
62
+            $settings = unserialize( serialize( $settings ) );
63 63
         } else {
64 64
             $settings = $this;
65 65
         }
66 66
 
67
-        update_option($this->option_name, $settings);
68
-        set_transient($this->option_name, $settings);
67
+        update_option( $this->option_name, $settings );
68
+        set_transient( $this->option_name, $settings );
69 69
 
70 70
         return $settings;
71 71
     }
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 	private function set_default_options() {
99 99
         $this->fill_recaptcha_settings();
100 100
 
101
-        if ( ! isset($this->load_style) ) {
102
-            if ( ! isset($this->custom_style) ) {
101
+        if ( ! isset( $this->load_style ) ) {
102
+            if ( ! isset( $this->custom_style ) ) {
103 103
                 $this->custom_style = true;
104 104
             }
105 105
 
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
         $this->fill_with_defaults();
110 110
 
111 111
         if ( is_multisite() && is_admin() ) {
112
-            $mu_menu = get_site_option('frm_admin_menu_name');
113
-            if ( $mu_menu && ! empty($mu_menu) ) {
112
+            $mu_menu = get_site_option( 'frm_admin_menu_name' );
113
+            if ( $mu_menu && ! empty( $mu_menu ) ) {
114 114
                 $this->menu = $mu_menu;
115 115
                 $this->mu_menu = 1;
116 116
             }
117 117
         }
118 118
 
119
-        $frm_roles = FrmAppHelper::frm_capabilities('pro');
119
+        $frm_roles = FrmAppHelper::frm_capabilities( 'pro' );
120 120
         foreach ( $frm_roles as $frm_role => $frm_role_description ) {
121
-            if ( ! isset($this->$frm_role) ) {
121
+            if ( ! isset( $this->$frm_role ) ) {
122 122
                 $this->$frm_role = 'administrator';
123 123
             }
124 124
         }
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
         $settings = $this->default_options();
129 129
 
130 130
         foreach ( $settings as $setting => $default ) {
131
-			if ( isset( $params[ 'frm_' . $setting ] ) ) {
132
-				$this->{$setting} = $params[ 'frm_' . $setting ];
133
-            } else if ( ! isset($this->{$setting}) ) {
131
+			if ( isset( $params['frm_' . $setting] ) ) {
132
+				$this->{$setting} = $params['frm_' . $setting];
133
+            } else if ( ! isset( $this->{$setting}) ) {
134 134
                 $this->{$setting} = $default;
135 135
             }
136
-            unset($setting, $default);
136
+            unset( $setting, $default );
137 137
         }
138 138
     }
139 139
 
@@ -141,23 +141,23 @@  discard block
 block discarded – undo
141 141
         $privkey = '';
142 142
         $re_lang = 'en';
143 143
 
144
-        if ( ! isset($this->pubkey) ) {
144
+        if ( ! isset( $this->pubkey ) ) {
145 145
             // get the options from the database
146
-            $recaptcha_opt = is_multisite() ? get_site_option('recaptcha') : get_option('recaptcha');
147
-            $this->pubkey = isset($recaptcha_opt['pubkey']) ? $recaptcha_opt['pubkey'] : '';
148
-            $privkey = isset($recaptcha_opt['privkey']) ? $recaptcha_opt['privkey'] : $privkey;
149
-            $re_lang = isset($recaptcha_opt['re_lang']) ? $recaptcha_opt['re_lang'] : $re_lang;
146
+            $recaptcha_opt = is_multisite() ? get_site_option( 'recaptcha' ) : get_option( 'recaptcha' );
147
+            $this->pubkey = isset( $recaptcha_opt['pubkey'] ) ? $recaptcha_opt['pubkey'] : '';
148
+            $privkey = isset( $recaptcha_opt['privkey'] ) ? $recaptcha_opt['privkey'] : $privkey;
149
+            $re_lang = isset( $recaptcha_opt['re_lang'] ) ? $recaptcha_opt['re_lang'] : $re_lang;
150 150
         }
151 151
 
152
-        if ( ! isset($this->re_msg) || empty($this->re_msg) ) {
152
+        if ( ! isset( $this->re_msg ) || empty( $this->re_msg ) ) {
153 153
             $this->re_msg = __( 'The reCAPTCHA was not entered correctly', 'formidable' );
154 154
         }
155 155
 
156
-        if ( ! isset($this->privkey) ) {
156
+        if ( ! isset( $this->privkey ) ) {
157 157
             $this->privkey = $privkey;
158 158
         }
159 159
 
160
-        if ( ! isset($this->re_lang) ) {
160
+        if ( ! isset( $this->re_lang ) ) {
161 161
             $this->re_lang = $re_lang;
162 162
         }
163 163
     }
@@ -168,31 +168,31 @@  discard block
 block discarded – undo
168 168
     }
169 169
 
170 170
 	public function update( $params ) {
171
-        $this->fill_with_defaults($params);
172
-        $this->update_settings($params);
171
+        $this->fill_with_defaults( $params );
172
+        $this->update_settings( $params );
173 173
 
174 174
         if ( $this->mu_menu ) {
175
-            update_site_option('frm_admin_menu_name', $this->menu);
176
-        } else if ( current_user_can('administrator') ) {
177
-            update_site_option('frm_admin_menu_name', false);
175
+            update_site_option( 'frm_admin_menu_name', $this->menu );
176
+        } else if ( current_user_can( 'administrator' ) ) {
177
+            update_site_option( 'frm_admin_menu_name', false );
178 178
         }
179 179
 
180
-        $this->update_roles($params);
180
+        $this->update_roles( $params );
181 181
 
182 182
         do_action( 'frm_update_settings', $params );
183 183
     }
184 184
 
185 185
 	private function update_settings( $params ) {
186
-        $this->mu_menu = isset($params['frm_mu_menu']) ? $params['frm_mu_menu'] : 0;
186
+        $this->mu_menu = isset( $params['frm_mu_menu'] ) ? $params['frm_mu_menu'] : 0;
187 187
 
188
-        $this->pubkey = trim($params['frm_pubkey']);
188
+        $this->pubkey = trim( $params['frm_pubkey'] );
189 189
         $this->privkey = $params['frm_privkey'];
190 190
         $this->re_lang = $params['frm_re_lang'];
191 191
 
192 192
         $this->load_style = $params['frm_load_style'];
193 193
         $this->preview_page_id = (int) $params['frm-preview-page-id'];
194 194
 
195
-        $this->use_html = isset($params['frm_use_html']) ? $params['frm_use_html'] : 0;
195
+        $this->use_html = isset( $params['frm_use_html'] ) ? $params['frm_use_html'] : 0;
196 196
         //$this->custom_style = isset($params['frm_custom_style']) ? $params['frm_custom_style'] : 0;
197 197
 		$this->jquery_css = isset( $params['frm_jquery_css'] ) ? absint( $params['frm_jquery_css'] ) : 0;
198 198
 		$this->accordion_js = isset( $params['frm_accordion_js'] ) ? absint( $params['frm_accordion_js'] ) : 0;
@@ -205,30 +205,30 @@  discard block
 block discarded – undo
205 205
         $frm_roles = FrmAppHelper::frm_capabilities();
206 206
         $roles = get_editable_roles();
207 207
         foreach ( $frm_roles as $frm_role => $frm_role_description ) {
208
-            $this->$frm_role = (array) ( isset( $params[ $frm_role ] ) ? $params[ $frm_role ] : 'administrator' );
208
+            $this->$frm_role = (array) ( isset( $params[$frm_role] ) ? $params[$frm_role] : 'administrator' );
209 209
 
210
-            if ( count($this->$frm_role) === 1 ) {
211
-                $set_role = reset($this->$frm_role);
210
+            if ( count( $this->$frm_role ) === 1 ) {
211
+                $set_role = reset( $this->$frm_role );
212 212
                 switch ( $set_role ) {
213 213
                     case 'subscriber':
214
-                        array_push($this->$frm_role, 'contributor');
214
+                        array_push( $this->$frm_role, 'contributor' );
215 215
                     case 'contributor':
216
-                        array_push($this->$frm_role, 'author');
216
+                        array_push( $this->$frm_role, 'author' );
217 217
                     case 'author':
218
-                        array_push($this->$frm_role, 'editor');
218
+                        array_push( $this->$frm_role, 'editor' );
219 219
                     case 'editor':
220
-                        array_push($this->$frm_role, 'administrator');
220
+                        array_push( $this->$frm_role, 'administrator' );
221 221
                 }
222
-                unset($set_role);
222
+                unset( $set_role );
223 223
             }
224 224
 
225 225
             foreach ( $roles as $role => $details ) {
226
-                if ( in_array($role, $this->$frm_role) ) {
226
+                if ( in_array( $role, $this->$frm_role ) ) {
227 227
     			    $wp_roles->add_cap( $role, $frm_role );
228 228
     			} else {
229 229
     			    $wp_roles->remove_cap( $role, $frm_role );
230 230
     			}
231
-    			unset($role, $details);
231
+    			unset( $role, $details );
232 232
     		}
233 233
 		}
234 234
     }
@@ -236,10 +236,10 @@  discard block
 block discarded – undo
236 236
 	public function store() {
237 237
         // Save the posted value in the database
238 238
 
239
-        update_option('frm_options', $this);
239
+        update_option( 'frm_options', $this );
240 240
 
241
-        delete_transient('frm_options');
242
-        set_transient('frm_options', $this);
241
+        delete_transient( 'frm_options' );
242
+        set_transient( 'frm_options', $this );
243 243
 
244 244
         do_action( 'frm_store_settings' );
245 245
     }
Please login to merge, or discard this patch.
classes/views/frm-entries/_sidebar-shared-pub.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! isset( $entry) ) {
2
+if ( ! isset( $entry ) ) {
3 3
     $entry = $record;
4 4
 } ?>
5 5
 
@@ -18,4 +18,4 @@  discard block
 block discarded – undo
18 18
 </div>
19 19
 <?php } ?>
20 20
 
21
-<?php do_action('frm_entry_shared_sidebar', $entry); ?>
21
+<?php do_action( 'frm_entry_shared_sidebar', $entry ); ?>
Please login to merge, or discard this patch.
classes/views/frm-entries/errors.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( isset($include_extra_container) ) { ?>
2
+if ( isset( $include_extra_container ) ) { ?>
3 3
 <div class="<?php echo esc_attr( $include_extra_container ) ?>" id="frm_form_<?php echo esc_attr( $form->id ) ?>_container">
4 4
 <?php
5 5
 }
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 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
-if ( isset($errors) && is_array( $errors ) && ! empty( $errors ) ) {
17
+if ( isset( $errors ) && is_array( $errors ) && ! empty( $errors ) ) {
18 18
 
19 19
 	if ( isset( $form ) && is_object( $form ) ) {
20 20
     	FrmFormsHelper::get_scroll_js( $form->id );
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
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) ) {
26
+    $img = apply_filters( 'frm_error_icon', $img );
27
+    if ( $img && ! empty( $img ) ) {
28 28
     ?><img src="<?php echo esc_attr( $img ) ?>" alt="" />
29 29
 <?php
30 30
     }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 <?php
38 38
 }
39 39
 
40
-if ( isset($include_extra_container) ) { ?>
40
+if ( isset( $include_extra_container ) ) { ?>
41 41
 </div>
42 42
 <?php
43 43
 }
Please login to merge, or discard this patch.
classes/views/frm-form-actions/_action_inside.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1
-<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('post_excerpt', '') ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" />
2
-<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('ID', '') ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
1
+<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'post_excerpt', '' ) ) ?>" class="frm_action_name" value="<?php echo esc_attr( $form_action->post_excerpt ); ?>" />
2
+<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'ID', '' ) ) ?>" value="<?php echo esc_attr( $form_action->ID ); ?>" />
3 3
 
4 4
 <table class="form-table">
5 5
     <tr>
6 6
         <th>
7
-            <label <?php FrmAppHelper::maybe_add_tooltip('action_title') ?>><?php _e( 'Label', 'formidable' ) ?></label>
7
+            <label <?php FrmAppHelper::maybe_add_tooltip( 'action_title' ) ?>><?php _e( 'Label', 'formidable' ) ?></label>
8 8
         </th>
9
-        <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name('post_title', '') ) ?>" value="<?php echo esc_attr($form_action->post_title); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip('action_title', 'open') ?>" id="<?php echo esc_attr( $action_control->get_field_id('action_post_title') ) ?>" />
9
+        <td><input type="text" name="<?php echo esc_attr( $action_control->get_field_name( 'post_title', '' ) ) ?>" value="<?php echo esc_attr( $form_action->post_title ); ?>" class="large-text <?php FrmAppHelper::maybe_add_tooltip( 'action_title', 'open' ) ?>" id="<?php echo esc_attr( $action_control->get_field_id( 'action_post_title' ) ) ?>" />
10 10
         </td>
11 11
     </tr>
12 12
 </table>
13
-<?php $action_control->form($form_action, compact('form', 'action_key', 'values')); ?>
13
+<?php $action_control->form( $form_action, compact( 'form', 'action_key', 'values' ) ); ?>
14 14
 
15 15
 <table class="form-table frm-no-margin">
16 16
     <tr><td>
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
 
26 26
 if ( count( $action_control->action_options['event'] ) == 1 || $action_control->action_options['force_event'] ) {
27 27
 	foreach ( $action_control->action_options['event'] as $e ) { ?>
28
-	<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" value="<?php echo esc_attr( $e ) ?>" />
28
+	<input type="hidden" name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" value="<?php echo esc_attr( $e ) ?>" />
29 29
 <?php
30 30
 	}
31 31
 } else {
32 32
 ?>
33 33
 	<p><label class="frm_left_label"><?php _e( 'Trigger this action after', 'formidable' ) ?></label>
34
-		<select name="<?php echo esc_attr( $action_control->get_field_name('event') ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id('event') ) ?>">
34
+		<select name="<?php echo esc_attr( $action_control->get_field_name( 'event' ) ) ?>[]" multiple="multiple" class="frm_multiselect" id="<?php echo esc_attr( $action_control->get_field_id( 'event' ) ) ?>">
35 35
 <?php
36 36
 
37 37
 	$event_labels = FrmFormAction::trigger_labels();
38 38
 	foreach ( $action_control->action_options['event'] as $event ) { ?>
39
-		<option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event; ?></option>
39
+		<option value="<?php echo esc_attr( $event ) ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo isset( $event_labels[$event] ) ? $event_labels[$event] : $event; ?></option>
40 40
 <?php
41 41
 	}
42 42
 ?>		</select>
@@ -47,6 +47,6 @@  discard block
 block discarded – undo
47 47
 do_action( 'frm_additional_action_settings', $form_action, compact( 'form', 'action_control', 'action_key', 'values' ) );
48 48
 
49 49
 ?>
50
-    <span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID); ?></span>
50
+    <span class="alignright frm_action_id <?php echo empty( $form_action->ID ) ? 'frm_hidden' : ''; ?>"><?php printf( __( 'Action ID: %1$s', 'formidable' ), $form_action->ID ); ?></span>
51 51
     </td></tr>
52 52
 </table>
Please login to merge, or discard this patch.
classes/views/frm-form-actions/default_actions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 // add register action
13 13
 class FrmDefRegAction extends FrmFormAction {
14 14
 	public function __construct() {
15
-		$action_ops = FrmFormAction::default_action_opts('frm_register_icon');
15
+		$action_ops = FrmFormAction::default_action_opts( 'frm_register_icon' );
16 16
 		parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops );
17 17
 	}
18 18
 }
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // add paypal action
21 21
 class FrmDefPayPalAction extends FrmFormAction {
22 22
 	public function __construct() {
23
-		$action_ops = FrmFormAction::default_action_opts('frm_paypal_icon');
23
+		$action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon' );
24 24
 		parent::__construct( 'paypal', __( 'Collect Payment', 'formidable' ), $action_ops );
25 25
 	}
26 26
 }
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // add aweber action
29 29
 class FrmDefAweberAction extends FrmFormAction {
30 30
 	public function __construct() {
31
-		$action_ops = FrmFormAction::default_action_opts('frm_aweber_icon');
31
+		$action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon' );
32 32
 		parent::__construct( 'aweber', __( 'Aweber', 'formidable' ), $action_ops );
33 33
 	}
34 34
 }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // add mailchimp action
37 37
 class FrmDefMlcmpAction extends FrmFormAction {
38 38
 	public function __construct() {
39
-		$action_ops = FrmFormAction::default_action_opts('frm_mailchimp_icon');
39
+		$action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon' );
40 40
 		parent::__construct( 'mailchimp', __( 'MailChimp', 'formidable' ), $action_ops );
41 41
 	}
42 42
 }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 // add twilio action
45 45
 class FrmDefTwilioAction extends FrmFormAction {
46 46
 	public function __construct() {
47
-		$action_ops = FrmFormAction::default_action_opts('frm_sms_icon');
47
+		$action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon' );
48 48
 		parent::__construct( 'twilio', __( 'Twilio', 'formidable' ), $action_ops );
49 49
 	}
50 50
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 // add highrise action
53 53
 class FrmDefHrsAction extends FrmFormAction {
54 54
 	public function __construct() {
55
-		$action_ops = FrmFormAction::default_action_opts('frm_highrise_icon');
55
+		$action_ops = FrmFormAction::default_action_opts( 'frm_highrise_icon' );
56 56
 		parent::__construct( 'highrise', __( 'Highrise', 'formidable' ), $action_ops );
57 57
 	}
58 58
 }
Please login to merge, or discard this patch.
classes/views/frm-forms/_publish_box.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@  discard block
 block discarded – undo
6 6
         <div id="minor-publishing-actions">
7 7
             <?php if ( 'draft' == $values['status'] ) { ?>
8 8
             <div id="save-action">
9
-        	    <input type="button" value="<?php esc_html_e( 'Save Draft', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-secondary button-large" id="save-post" />
9
+        	    <input type="button" value="<?php esc_html_e( 'Save Draft', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-secondary button-large" id="save-post" />
10 10
         	    <span class="spinner"></span>
11 11
             </div>
12 12
             <?php } ?>
13 13
             <div id="preview-action">
14 14
                 <?php
15
-                if ( ! isset($hide_preview) || ! $hide_preview ) {
15
+                if ( ! isset( $hide_preview ) || ! $hide_preview ) {
16 16
 
17
-                    if ( isset($values['form_key']) ) {
17
+                    if ( isset( $values['form_key'] ) ) {
18 18
                         $frm_settings = FrmAppHelper::get_settings();
19
-                        if ( empty($frm_settings->preview_page_id) ) { ?>
20
-                    <a href="<?php echo esc_url( FrmFormsHelper::get_direct_link($values['form_key']) ); ?>" class="preview button" target="wp-frm-preview-<?php echo esc_attr( $id ) ?>"><?php _e( 'Preview', 'formidable' ) ?></a>
19
+                        if ( empty( $frm_settings->preview_page_id ) ) { ?>
20
+                    <a href="<?php echo esc_url( FrmFormsHelper::get_direct_link( $values['form_key'] ) ); ?>" class="preview button" target="wp-frm-preview-<?php echo esc_attr( $id ) ?>"><?php _e( 'Preview', 'formidable' ) ?></a>
21 21
                 <?php
22 22
                         } else {
23 23
                 ?>
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
                         <a href="#" id="frm-previewDrop" class="frm-dropdown-toggle button" data-toggle="dropdown"><?php _e( 'Preview', 'formidable' ) ?> <b class="caret"></b></a>
26 26
 
27 27
                         <ul class="frm-dropdown-menu pull-right" role="menu" aria-labelledby="frm-previewDrop">
28
-                            <li><a href="<?php echo esc_url( FrmFormsHelper::get_direct_link($values['form_key']) ); ?>" target="_blank"><?php _e( 'On Blank Page', 'formidable' ) ?></a></li>
29
-                            <li><a href="<?php echo esc_url( add_query_arg('form', $values['form_key'], get_permalink( $frm_settings->preview_page_id )) ) ?>" target="_blank"><?php _e( 'In Theme', 'formidable' ) ?></a></li>
28
+                            <li><a href="<?php echo esc_url( FrmFormsHelper::get_direct_link( $values['form_key'] ) ); ?>" target="_blank"><?php _e( 'On Blank Page', 'formidable' ) ?></a></li>
29
+                            <li><a href="<?php echo esc_url( add_query_arg( 'form', $values['form_key'], get_permalink( $frm_settings->preview_page_id ) ) ) ?>" target="_blank"><?php _e( 'In Theme', 'formidable' ) ?></a></li>
30 30
                     	</ul>
31 31
                     </div>
32 32
                 <?php   }
@@ -62,24 +62,24 @@  discard block
 block discarded – undo
62 62
 
63 63
 
64 64
             <div class="misc-pub-section misc-pub-post-status"><label for="post_status"><?php _e( 'Status', 'formidable' ) ?>:</label>
65
-                <span id="form-status-display"><?php echo FrmFormsHelper::status_nice_name($values['status']); ?></span>
65
+                <span id="form-status-display"><?php echo FrmFormsHelper::status_nice_name( $values['status'] ); ?></span>
66 66
 				<?php if ( 'draft' != $values['status'] && ( ! isset( $_GET['frm_action'] ) || 'settings' != FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) ) { ?>
67
-                <a href="#post_status" class="edit-form-status hide-if-no-js" data-slidedown="form-status-select"><span aria-hidden="true"><?php _e( 'Edit') ?></span> <span class="screen-reader-text"><?php _e( 'Edit status') ?></span></a>
67
+                <a href="#post_status" class="edit-form-status hide-if-no-js" data-slidedown="form-status-select"><span aria-hidden="true"><?php _e( 'Edit' ) ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ) ?></span></a>
68 68
 
69 69
                 <div id="form-status-select" class="frm_hidden">
70 70
                     <select name="frm_change_status" id="form_change_status">
71
-                        <option value="published" <?php selected($values['status'], 'published') ?>><?php _e( 'Published' ) ?></option>
72
-                        <option value="draft" <?php selected($values['status'], 'draft') ?>><?php _e( 'Draft' ) ?></option>
71
+                        <option value="published" <?php selected( $values['status'], 'published' ) ?>><?php _e( 'Published' ) ?></option>
72
+                        <option value="draft" <?php selected( $values['status'], 'draft' ) ?>><?php _e( 'Draft' ) ?></option>
73 73
                     </select>
74
-                    <a href="#post_status" class="save-form-status hide-if-no-js button"><?php _e( 'OK') ?></a>
75
-                    <a href="#post_status" class="cancel-form-status hide-if-no-js button-cancel" data-slideup="form-status-select"><?php _e( 'Cancel') ?></a>
74
+                    <a href="#post_status" class="save-form-status hide-if-no-js button"><?php _e( 'OK' ) ?></a>
75
+                    <a href="#post_status" class="cancel-form-status hide-if-no-js button-cancel" data-slideup="form-status-select"><?php _e( 'Cancel' ) ?></a>
76 76
                 </div>
77 77
                 <?php } ?>
78 78
             </div><!-- .misc-pub-section -->
79 79
 
80
-            <?php if ( has_action('frm_settings_buttons') ) { ?>
80
+            <?php if ( has_action( 'frm_settings_buttons' ) ) { ?>
81 81
             <div class="misc-pub-section">
82
-                <?php do_action('frm_settings_buttons', $values); ?>
82
+                <?php do_action( 'frm_settings_buttons', $values ); ?>
83 83
                 <div class="clear"></div>
84 84
             </div>
85 85
             <?php } ?>
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     <div id="major-publishing-actions">
92 92
         <div id="delete-action">
93
-            <?php echo FrmFormsHelper::delete_trash_link($id, $values['status']); ?>
93
+            <?php echo FrmFormsHelper::delete_trash_link( $id, $values['status'] ); ?>
94 94
         </div>
95 95
 
96 96
 		<div id="publishing-action">
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 			<?php if ( 'settings' == FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ) ) { ?>
99 99
 			<input type="button" value="<?php esc_attr_e( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_settings_btn button-primary button-large" id="frm_submit_side_top" />
100 100
             <?php } else { ?>
101
-    	    <input type="button" value="<?php echo isset($button) ? esc_attr($button) : __( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset($values['ajax_load']) && $values['ajax_load'] ) ? '': 'no_'; ?>ajax button-primary button-large" id="frm_submit_side_top" />
101
+    	    <input type="button" value="<?php echo isset( $button ) ? esc_attr( $button ) : __( 'Update', 'formidable' ); ?>" class="frm_submit_form frm_submit_<?php echo ( isset( $values['ajax_load'] ) && $values['ajax_load'] ) ? '' : 'no_'; ?>ajax button-primary button-large" id="frm_submit_side_top" />
102 102
     	    <?php } ?>
103 103
 		</div>
104 104
 
Please login to merge, or discard this patch.
classes/views/frm-forms/mb_insert_fields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 	<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'formidable' ) ?>"><br/></div>
3 3
 	<h3 class="hndle"><span><?php _e( 'Customization', 'formidable' ) ?></span></h3>
4 4
     <div class="inside">
5
-    <?php FrmFormsController::mb_tags_box($id); ?>
5
+    <?php FrmFormsController::mb_tags_box( $id ); ?>
6 6
     </div>
7 7
 </div>
Please login to merge, or discard this patch.
classes/views/frm-settings/license_box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<div class="general_settings metabox-holder tabs-panel frm_license_box <?php echo ($a == 'general_settings') ? 'frm_block' : 'frm_hidden'; ?>">
1
+<div class="general_settings metabox-holder tabs-panel frm_license_box <?php echo ( $a == 'general_settings' ) ? 'frm_block' : 'frm_hidden'; ?>">
2 2
 <?php if ( ! is_multisite() || is_super_admin() ) { ?>
3 3
     <div class="postbox">
4 4
         <div class="inside">
Please login to merge, or discard this patch.