Completed
Push — master ( 9ff260...5897a4 )
by Stephanie
03:42
created
classes/controllers/FrmAppController.php 2 patches
Indentation   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 class FrmAppController {
4 4
 
5 5
 	public static function menu() {
6
-        FrmAppHelper::maybe_add_permissions();
7
-        if ( ! current_user_can( 'frm_view_forms' ) ) {
8
-            return;
9
-        }
6
+		FrmAppHelper::maybe_add_permissions();
7
+		if ( ! current_user_can( 'frm_view_forms' ) ) {
8
+			return;
9
+		}
10 10
 
11 11
 		$menu_name = FrmAppHelper::get_menu_name();
12 12
 		add_menu_page( 'Formidable', $menu_name, 'frm_view_forms', 'formidable', 'FrmFormsController::route', '', self::get_menu_position() );
13
-    }
13
+	}
14 14
 
15 15
 	private static function get_menu_position() {
16 16
 		$count = count( get_post_types( array( 'show_ui' => true, '_builtin' => false, 'show_in_menu' => true ) ) );
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 		return $pos;
20 20
 	}
21 21
 
22
-    public static function load_wp_admin_style() {
23
-        FrmAppHelper::load_font_style();
24
-    }
22
+	public static function load_wp_admin_style() {
23
+		FrmAppHelper::load_font_style();
24
+	}
25 25
 
26 26
 	public static function get_form_nav( $form, $show_nav = false, $title = 'show' ) {
27 27
 		$show_nav = FrmAppHelper::get_param( 'show_nav', $show_nav, 'get', 'absint' );
28
-        if ( empty( $show_nav ) || ! $form ) {
29
-            return;
30
-        }
28
+		if ( empty( $show_nav ) || ! $form ) {
29
+			return;
30
+		}
31 31
 
32 32
 		FrmForm::maybe_get_form( $form );
33 33
 		if ( ! is_object( $form ) ) {
@@ -85,28 +85,28 @@  discard block
 block discarded – undo
85 85
 		return $nav_items;
86 86
 	}
87 87
 
88
-    // Adds a settings link to the plugins page
89
-    public static function settings_link( $links ) {
88
+	// Adds a settings link to the plugins page
89
+	public static function settings_link( $links ) {
90 90
 		$settings = '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings' ) ) . '">' . __( 'Settings', 'formidable' ) . '</a>';
91
-        array_unshift( $links, $settings );
91
+		array_unshift( $links, $settings );
92 92
 
93
-        return $links;
94
-    }
93
+		return $links;
94
+	}
95 95
 
96
-    public static function pro_get_started_headline() {
96
+	public static function pro_get_started_headline() {
97 97
 		self::maybe_show_upgrade_bar();
98 98
 
99
-        // Don't display this error as we're upgrading the thing, or if the user shouldn't see the message
100
-        if ( 'upgrade-plugin' == FrmAppHelper::simple_get( 'action', 'sanitize_title' ) || ! current_user_can( 'update_plugins' ) ) {
101
-            return;
102
-        }
99
+		// Don't display this error as we're upgrading the thing, or if the user shouldn't see the message
100
+		if ( 'upgrade-plugin' == FrmAppHelper::simple_get( 'action', 'sanitize_title' ) || ! current_user_can( 'update_plugins' ) ) {
101
+			return;
102
+		}
103 103
 
104 104
 		if ( get_site_option( 'frmpro-authorized' ) && ! file_exists( FrmAppHelper::plugin_path() . '/pro/formidable-pro.php' ) ) {
105
-            FrmAppHelper::load_admin_wide_js();
105
+			FrmAppHelper::load_admin_wide_js();
106 106
 
107
-            // user is authorized, but running free version
108
-            $inst_install_url = 'https://formidableforms.com/knowledgebase/install-formidable-forms/';
109
-        ?>
107
+			// user is authorized, but running free version
108
+			$inst_install_url = 'https://formidableforms.com/knowledgebase/install-formidable-forms/';
109
+		?>
110 110
 <div class="error" class="frm_previous_install">
111 111
 		<?php
112 112
 		echo wp_kses_post( apply_filters( 'frm_pro_update_msg',
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 		) ); ?>
119 119
 </div>
120 120
 <?php
121
-        }
122
-    }
121
+		}
122
+	}
123 123
 
124 124
 	private static function maybe_show_upgrade_bar() {
125 125
 		$page = FrmAppHelper::simple_get( 'page', 'sanitize_title' );
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 		}
222 222
 	}
223 223
 
224
-    public static function admin_js() {
224
+	public static function admin_js() {
225 225
 		$version = FrmAppHelper::plugin_version();
226 226
 		FrmAppHelper::load_admin_wide_js( false );
227 227
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 			'bootstrap_tooltip', 'bootstrap-multiselect',
233 233
 		), $version, true );
234 234
 		wp_register_style( 'formidable-admin', FrmAppHelper::plugin_url() . '/css/frm_admin.css', array(), $version );
235
-        wp_register_script( 'bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.4' );
235
+		wp_register_script( 'bootstrap_tooltip', FrmAppHelper::plugin_url() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.4' );
236 236
 		wp_register_style( 'formidable-grids', FrmAppHelper::plugin_url() . '/css/frm_grids.css', array(), $version );
237 237
 		wp_register_style( 'formidable-dropzone', FrmAppHelper::plugin_url() . '/css/dropzone.css', array(), $version );
238 238
 
@@ -245,65 +245,65 @@  discard block
 block discarded – undo
245 245
 		global $pagenow;
246 246
 		if ( strpos( $page, 'formidable' ) === 0 || ( $pagenow == 'edit.php' && $post_type == 'frm_display' ) ) {
247 247
 
248
-            wp_enqueue_script( 'admin-widgets' );
249
-            wp_enqueue_style( 'widgets' );
250
-            wp_enqueue_script( 'formidable' );
251
-            wp_enqueue_script( 'formidable_admin' );
248
+			wp_enqueue_script( 'admin-widgets' );
249
+			wp_enqueue_style( 'widgets' );
250
+			wp_enqueue_script( 'formidable' );
251
+			wp_enqueue_script( 'formidable_admin' );
252 252
 			FrmAppHelper::localize_script( 'admin' );
253 253
 
254
-            wp_enqueue_style( 'formidable-admin' );
254
+			wp_enqueue_style( 'formidable-admin' );
255 255
 			wp_enqueue_style( 'formidable-grids' );
256 256
 			wp_enqueue_style( 'formidable-dropzone' );
257
-            add_thickbox();
257
+			add_thickbox();
258 258
 
259
-            wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
259
+			wp_register_script( 'formidable-editinplace', FrmAppHelper::plugin_url() . '/js/jquery/jquery.editinplace.packed.js', array( 'jquery' ), '2.3.0' );
260 260
 
261
-        } else if ( $pagenow == 'post.php' || ( $pagenow == 'post-new.php' && $post_type == 'frm_display' ) ) {
262
-            if ( isset( $_REQUEST['post_type'] ) ) {
263
-                $post_type = sanitize_title( $_REQUEST['post_type'] );
261
+		} else if ( $pagenow == 'post.php' || ( $pagenow == 'post-new.php' && $post_type == 'frm_display' ) ) {
262
+			if ( isset( $_REQUEST['post_type'] ) ) {
263
+				$post_type = sanitize_title( $_REQUEST['post_type'] );
264 264
 			} else if ( isset( $_REQUEST['post'] ) && absint( $_REQUEST['post'] ) ) {
265 265
 				$post = get_post( absint( $_REQUEST['post'] ) );
266
-                if ( ! $post ) {
267
-                    return;
268
-                }
269
-                $post_type = $post->post_type;
270
-            } else {
271
-                return;
272
-            }
273
-
274
-            if ( $post_type == 'frm_display' ) {
275
-                wp_enqueue_script( 'jquery-ui-draggable' );
276
-                wp_enqueue_script( 'formidable_admin' );
277
-                wp_enqueue_style( 'formidable-admin' );
266
+				if ( ! $post ) {
267
+					return;
268
+				}
269
+				$post_type = $post->post_type;
270
+			} else {
271
+				return;
272
+			}
273
+
274
+			if ( $post_type == 'frm_display' ) {
275
+				wp_enqueue_script( 'jquery-ui-draggable' );
276
+				wp_enqueue_script( 'formidable_admin' );
277
+				wp_enqueue_style( 'formidable-admin' );
278 278
 				FrmAppHelper::localize_script( 'admin' );
279
-            }
280
-        } else if ( $pagenow == 'widgets.php' ) {
281
-            FrmAppHelper::load_admin_wide_js();
282
-        }
283
-    }
284
-
285
-    public static function load_lang() {
286
-        load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
287
-    }
288
-
289
-    /**
290
-     * Filter shortcodes in text widgets
291
-     */
292
-    public static function widget_text_filter( $content ) {
293
-    	$regex = '/\[\s*(formidable|display-frm-data|frm-stats|frm-graph|frm-entry-links|formresults|frm-search)\s+.*\]/';
294
-    	return preg_replace_callback( $regex, 'FrmAppHelper::widget_text_filter_callback', $content );
295
-    }
296
-
297
-    public static function front_head() {
298
-        if ( is_multisite() ) {
299
-            $old_db_version = get_option( 'frm_db_version' );
300
-            $pro_db_version = FrmAppHelper::pro_is_installed() ? get_option( 'frmpro_db_version' ) : false;
301
-            if ( ( (int) $old_db_version < (int) FrmAppHelper::$db_version ) ||
302
-                ( FrmAppHelper::pro_is_installed() && (int) $pro_db_version < (int) FrmAppHelper::$pro_db_version ) ) {
303
-                self::install( $old_db_version );
304
-            }
305
-        }
306
-    }
279
+			}
280
+		} else if ( $pagenow == 'widgets.php' ) {
281
+			FrmAppHelper::load_admin_wide_js();
282
+		}
283
+	}
284
+
285
+	public static function load_lang() {
286
+		load_plugin_textdomain( 'formidable', false, FrmAppHelper::plugin_folder() . '/languages/' );
287
+	}
288
+
289
+	/**
290
+	 * Filter shortcodes in text widgets
291
+	 */
292
+	public static function widget_text_filter( $content ) {
293
+		$regex = '/\[\s*(formidable|display-frm-data|frm-stats|frm-graph|frm-entry-links|formresults|frm-search)\s+.*\]/';
294
+		return preg_replace_callback( $regex, 'FrmAppHelper::widget_text_filter_callback', $content );
295
+	}
296
+
297
+	public static function front_head() {
298
+		if ( is_multisite() ) {
299
+			$old_db_version = get_option( 'frm_db_version' );
300
+			$pro_db_version = FrmAppHelper::pro_is_installed() ? get_option( 'frmpro_db_version' ) : false;
301
+			if ( ( (int) $old_db_version < (int) FrmAppHelper::$db_version ) ||
302
+				( FrmAppHelper::pro_is_installed() && (int) $pro_db_version < (int) FrmAppHelper::$pro_db_version ) ) {
303
+				self::install( $old_db_version );
304
+			}
305
+		}
306
+	}
307 307
 
308 308
 	public static function localize_script( $location ) {
309 309
 		_deprecated_function( __FUNCTION__, '2.0.9', 'FrmAppHelper::localize_script' );
@@ -358,20 +358,20 @@  discard block
 block discarded – undo
358 358
 		wp_die();
359 359
 	}
360 360
 
361
-    public static function activation_install() {
362
-        FrmAppHelper::delete_cache_and_transient( 'frm_plugin_version' );
363
-        FrmFormActionsController::actions_init();
364
-        self::install();
365
-    }
361
+	public static function activation_install() {
362
+		FrmAppHelper::delete_cache_and_transient( 'frm_plugin_version' );
363
+		FrmFormActionsController::actions_init();
364
+		self::install();
365
+	}
366 366
 
367
-    public static function install( $old_db_version = false ) {
368
-        $frmdb = new FrmDb();
369
-        $frmdb->upgrade( $old_db_version );
370
-    }
367
+	public static function install( $old_db_version = false ) {
368
+		$frmdb = new FrmDb();
369
+		$frmdb->upgrade( $old_db_version );
370
+	}
371 371
 
372
-    public static function uninstall() {
372
+	public static function uninstall() {
373 373
 		FrmAppHelper::permission_check('administrator');
374
-        check_ajax_referer( 'frm_ajax', 'nonce' );
374
+		check_ajax_referer( 'frm_ajax', 'nonce' );
375 375
 
376 376
 		$frmdb = new FrmDb();
377 377
 		$frmdb->uninstall();
@@ -380,43 +380,43 @@  discard block
 block discarded – undo
380 380
 		deactivate_plugins( FrmAppHelper::plugin_folder() . '/formidable.php', false, false );
381 381
 		echo esc_url_raw( admin_url( 'plugins.php?deactivate=true' ) );
382 382
 
383
-        wp_die();
384
-    }
383
+		wp_die();
384
+	}
385 385
 
386
-    public static function drop_tables( $tables ) {
387
-        global $wpdb;
388
-        $tables[] = $wpdb->prefix . 'frm_fields';
389
-        $tables[] = $wpdb->prefix . 'frm_forms';
390
-        $tables[] = $wpdb->prefix . 'frm_items';
391
-        $tables[] = $wpdb->prefix . 'frm_item_metas';
392
-        return $tables;
393
-    }
386
+	public static function drop_tables( $tables ) {
387
+		global $wpdb;
388
+		$tables[] = $wpdb->prefix . 'frm_fields';
389
+		$tables[] = $wpdb->prefix . 'frm_forms';
390
+		$tables[] = $wpdb->prefix . 'frm_items';
391
+		$tables[] = $wpdb->prefix . 'frm_item_metas';
392
+		return $tables;
393
+	}
394 394
 
395
-    // Routes for wordpress pages -- we're just replacing content here folks.
396
-    public static function page_route( $content ) {
397
-        global $post;
395
+	// Routes for wordpress pages -- we're just replacing content here folks.
396
+	public static function page_route( $content ) {
397
+		global $post;
398 398
 
399
-        $frm_settings = FrmAppHelper::get_settings();
400
-        if ( $post && $post->ID == $frm_settings->preview_page_id && isset( $_GET['form'] ) ) {
401
-            $content = FrmFormsController::page_preview();
402
-        }
399
+		$frm_settings = FrmAppHelper::get_settings();
400
+		if ( $post && $post->ID == $frm_settings->preview_page_id && isset( $_GET['form'] ) ) {
401
+			$content = FrmFormsController::page_preview();
402
+		}
403 403
 
404
-        return $content;
405
-    }
404
+		return $content;
405
+	}
406 406
 
407
-    public static function deauthorize() {
407
+	public static function deauthorize() {
408 408
 		FrmAppHelper::permission_check('frm_change_settings');
409
-        check_ajax_referer( 'frm_ajax', 'nonce' );
410
-
411
-        delete_option( 'frmpro-credentials' );
412
-        delete_option( 'frmpro-authorized' );
413
-        delete_site_option( 'frmpro-credentials' );
414
-        delete_site_option( 'frmpro-authorized' );
415
-        wp_die();
416
-    }
417
-
418
-    public static function get_form_shortcode( $atts ) {
419
-        _deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()' );
420
-        return FrmFormsController::get_form_shortcode( $atts );
421
-    }
409
+		check_ajax_referer( 'frm_ajax', 'nonce' );
410
+
411
+		delete_option( 'frmpro-credentials' );
412
+		delete_option( 'frmpro-authorized' );
413
+		delete_site_option( 'frmpro-credentials' );
414
+		delete_site_option( 'frmpro-authorized' );
415
+		wp_die();
416
+	}
417
+
418
+	public static function get_form_shortcode( $atts ) {
419
+		_deprecated_function( __FUNCTION__, '1.07.05', 'FrmFormsController::get_form_shortcode()' );
420
+		return FrmFormsController::get_form_shortcode( $atts );
421
+	}
422 422
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 <div class="update-nag frm-update-to-pro">
139 139
 	<?php echo FrmAppHelper::kses( $tip['tip'] ) ?>
140 140
 	<span><?php echo FrmAppHelper::kses( $tip['call'] ) ?></span>
141
-	<a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidableforms.com?banner=1&tip=' . absint( $tip['num'] ) ) ) ?>" class="button">Upgrade to Pro</a>
141
+	<a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com?banner=1&tip=' . absint( $tip['num'] ) ) ) ?>" class="button">Upgrade to Pro</a>
142 142
 </div>
143 143
 <?php
144 144
 		}
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     }
371 371
 
372 372
     public static function uninstall() {
373
-		FrmAppHelper::permission_check('administrator');
373
+		FrmAppHelper::permission_check( 'administrator' );
374 374
         check_ajax_referer( 'frm_ajax', 'nonce' );
375 375
 
376 376
 		$frmdb = new FrmDb();
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     }
406 406
 
407 407
     public static function deauthorize() {
408
-		FrmAppHelper::permission_check('frm_change_settings');
408
+		FrmAppHelper::permission_check( 'frm_change_settings' );
409 409
         check_ajax_referer( 'frm_ajax', 'nonce' );
410 410
 
411 411
         delete_option( 'frmpro-credentials' );
Please login to merge, or discard this patch.
classes/views/addons/upgrade_to_pro.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@
 block discarded – undo
58 58
 			<tr>
59 59
 				<th>Included AddOns</th>
60 60
 				<td>None</td>
61
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidableforms.com/pricing/#addon-lists') ) ?>" target="_blank">Premium Addons</a></td>
62
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidableforms.com/pricing/#addon-lists') ) ?>" target="_blank">Advanced Addons</a></td>
63
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidableforms.com/pricing/#addon-lists') ) ?>" target="_blank">Enterprise Addons</a></td>
61
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ) ?>" target="_blank">Premium Addons</a></td>
62
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ) ?>" target="_blank">Advanced Addons</a></td>
63
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ) ?>" target="_blank">Enterprise Addons</a></td>
64 64
 			</tr>
65 65
 		</tbody>
66 66
 	</table>
Please login to merge, or discard this patch.
classes/views/frm-entries/no_entries.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <div class="frmcenter frm_no_entries_form">
2 2
 <?php
3
-if ( $form && isset($form->options['no_save']) && $form->options['no_save'] ) { ?>
3
+if ( $form && isset( $form->options['no_save'] ) && $form->options['no_save'] ) { ?>
4 4
 <h3><?php _e( 'This form is not set to save any entries.', 'formidable' ) ?></h3>
5 5
 <p>If you would like entries in this form to be saved, go to the <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable' ) . '&frm_action=settings&id=' . $form->id ) ?>">form Settings</a> page and uncheck the "Do not store any entries submitted from this form" box.</p>
6 6
 <?php
7 7
 } else if ( $form ) {
8 8
 ?>
9
-<div class="frm_no_entries_header"><?php printf(__( 'No Entries for form: %s', 'formidable' ), $form->name); ?></div>
10
-<p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthe docs%2$s or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/" target="_blank">', '</a> <br/>', '<a href="' . esc_url( admin_url('admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ) ) . '">', '</a>' ); ?></p>
9
+<div class="frm_no_entries_header"><?php printf( __( 'No Entries for form: %s', 'formidable' ), $form->name ); ?></div>
10
+<p class="frm_no_entries_text"><?php printf( __( 'For instructions on publishing your form see %1$sthe docs%2$s or click "%3$sAdd New%4$s" above to add an entry from here (Requires License)', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/" target="_blank">', '</a> <br/>', '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ) ) . '">', '</a>' ); ?></p>
11 11
 <?php
12 12
 } else {
13 13
 ?>
Please login to merge, or discard this patch.
classes/models/FrmAddon.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	public function insert_installed_addon( $plugins ) {
41
-		$plugins[ $this->plugin_slug ] = $this;
41
+		$plugins[$this->plugin_slug] = $this;
42 42
 		return $plugins;
43 43
 	}
44 44
 
45 45
 	public static function get_addon( $plugin_slug ) {
46 46
 		$plugins = apply_filters( 'frm_installed_addons', array() );
47 47
 		$plugin = false;
48
-		if ( isset( $plugins[ $plugin_slug ] ) ) {
49
-			$plugin = $plugins[ $plugin_slug ];
48
+		if ( isset( $plugins[$plugin_slug] ) ) {
49
+			$plugin = $plugins[$plugin_slug];
50 50
 		}
51 51
 		return $plugin;
52 52
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	public function show_license_message( $file, $plugin ) {
101 101
 		$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
102 102
 		echo '<tr class="plugin-update-tr active"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
103
-		echo sprintf( __( 'Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s.', 'formidable' ), $this->plugin_name, '<a href="' . esc_url( admin_url('admin.php?page=formidable-settings&t=licenses_settings' ) ) . '">', '</a>' );
103
+		echo sprintf( __( 'Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s.', 'formidable' ), $this->plugin_name, '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings&t=licenses_settings' ) ) . '">', '</a>' );
104 104
 		$id = sanitize_title( $plugin['Name'] );
105 105
 		echo '<script type="text/javascript">var d = document.getElementById("' . esc_attr( $id ) . '");if ( d !== null ){ d.className = d.className + " update"; }</script>';
106 106
 		echo '</div></td></tr>';
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
 
114 114
 		if ( $this->is_current_version( $transient ) ) {
115 115
 			//make sure it doesn't show there is an update if plugin is up-to-date
116
-			if ( isset( $transient->response[ $this->plugin_folder ] ) ) {
117
-				unset( $transient->response[ $this->plugin_folder ] );
116
+			if ( isset( $transient->response[$this->plugin_folder] ) ) {
117
+				unset( $transient->response[$this->plugin_folder] );
118 118
 			}
119
-		} else if ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) {
119
+		} else if ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) {
120 120
 			$cache_key = 'edd_plugin_' . md5( sanitize_key( $this->license . $this->version ) . '_get_version' );
121 121
 			$version_info = get_transient( $cache_key );
122 122
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			}
128 128
 
129 129
 			if ( $version_info !== false && version_compare( $version_info->new_version, $this->version, '>' ) ) {
130
-				$transient->response[ $this->plugin_folder ] = $version_info;
130
+				$transient->response[$this->plugin_folder] = $version_info;
131 131
 			} else {
132 132
 				delete_transient( $cache_key );
133 133
 				if ( ! $this->has_been_cleared() ) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 					$this->manually_queue_update();
137 137
 				}
138 138
 
139
-				unset( $transient->response[ $this->plugin_folder ] );
139
+				unset( $transient->response[$this->plugin_folder] );
140 140
 			}
141 141
 		}
142 142
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	}
145 145
 
146 146
 	private function is_current_version( $transient ) {
147
-		if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) {
147
+		if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) {
148 148
 			return false;
149 149
 		}
150 150
 
@@ -153,16 +153,16 @@  discard block
 block discarded – undo
153 153
 			return true;
154 154
 		}
155 155
 
156
-		return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] == $transient->response[ $this->plugin_folder ]->new_version;
156
+		return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] == $transient->response[$this->plugin_folder]->new_version;
157 157
 	}
158 158
 
159 159
 	private function has_been_cleared() {
160 160
 		$last_cleared = get_option( 'frm_last_cleared' );
161
-		return ( $last_cleared && $last_cleared > date( 'Y-m-d H:i:s', strtotime('-5 minutes') ) );
161
+		return ( $last_cleared && $last_cleared > date( 'Y-m-d H:i:s', strtotime( '-5 minutes' ) ) );
162 162
 	}
163 163
 
164 164
 	private function cleared_plugins() {
165
-		update_option( 'frm_last_cleared', date('Y-m-d H:i:s') );
165
+		update_option( 'frm_last_cleared', date( 'Y-m-d H:i:s' ) );
166 166
 	}
167 167
 
168 168
 	private function is_license_revoked() {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		}
172 172
 
173 173
 		$last_checked = get_site_option( $this->transient_key() );
174
-		$seven_days_ago = date( 'Y-m-d H:i:s', strtotime('-7 days') );
174
+		$seven_days_ago = date( 'Y-m-d H:i:s', strtotime( '-7 days' ) );
175 175
 
176 176
 		if ( ! $last_checked || $last_checked < $seven_days_ago ) {
177 177
 			update_site_option( $this->transient_key(), date( 'Y-m-d H:i:s' ) ); // check weekly
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	}
188 188
 
189 189
 	public static function activate() {
190
-		FrmAppHelper::permission_check('frm_change_settings');
190
+		FrmAppHelper::permission_check( 'frm_change_settings' );
191 191
 	 	check_ajax_referer( 'frm_ajax', 'nonce' );
192 192
 
193 193
 		if ( ! isset( $_POST['license'] ) || empty( $_POST['license'] ) ) {
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 			$response['message'] = $response['status'];
209 209
 		} else {
210 210
 			$messages = $this_plugin->get_messages();
211
-			if ( is_string( $response['status'] ) && isset( $messages[ $response['status'] ] ) ) {
212
-				$response['message'] = $messages[ $response['status'] ];
211
+			if ( is_string( $response['status'] ) && isset( $messages[$response['status']] ) ) {
212
+				$response['message'] = $messages[$response['status']];
213 213
 			} else {
214 214
 				$response['message'] = FrmAppHelper::kses( $response['status'], array( 'a' ) );
215 215
 			}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	}
266 266
 
267 267
 	public static function deactivate() {
268
-		FrmAppHelper::permission_check('frm_change_settings');
268
+		FrmAppHelper::permission_check( 'frm_change_settings' );
269 269
 		check_ajax_referer( 'frm_ajax', 'nonce' );
270 270
 
271 271
 		$plugin_slug = sanitize_text_field( $_POST['plugin'] );
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
 		$message = __( 'Your License Key was invalid', 'formidable' );
319 319
 		if ( is_wp_error( $resp ) ) {
320
-			$message = sprintf( __( 'You had an error communicating with the Formidable API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/why-cant-i-activate-formidable-pro/" target="_blank">', '</a>');
320
+			$message = sprintf( __( 'You had an error communicating with the Formidable API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/why-cant-i-activate-formidable-pro/" target="_blank">', '</a>' );
321 321
 			$message .= ' ' . $resp->get_error_message();
322 322
 		} else if ( $body == 'error' || is_wp_error( $body ) ) {
323 323
 			$message = __( 'You had an HTTP error connecting to the Formidable API', 'formidable' );
Please login to merge, or discard this patch.
classes/models/FrmPointers.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -239,16 +239,16 @@  discard block
 block discarded – undo
239 239
 
240 240
 		return array(
241 241
 			'content'   => '<h3>' . __( 'Forms', 'formidable' ) . '</h3>'
242
-			               . '<p>' . __( 'All your forms will be listed on this page. Create your first form by clicking on the "Add New" button.', 'formidable' ) . '</p>'
243
-			               . '<p><strong>' . __( 'Subscribe to our Newsletter', 'formidable' ) . '</strong><br/>'
244
-			               . sprintf( __( 'If you would like to hear about new features and updates for %1$s, subscribe to our newsletter:', 'formidable' ), 'Formidable' ) . '</p>'
245
-			               . '<form target="_blank" action="//formidablepro.us1.list-manage.com/subscribe/post?u=a4a913790ffb892daacc6f271&amp;id=7e7df15967" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
246
-			               . '<p>'
247
-			               . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . esc_attr__( 'Email', 'formidable' ) . '"/>'
242
+						   . '<p>' . __( 'All your forms will be listed on this page. Create your first form by clicking on the "Add New" button.', 'formidable' ) . '</p>'
243
+						   . '<p><strong>' . __( 'Subscribe to our Newsletter', 'formidable' ) . '</strong><br/>'
244
+						   . sprintf( __( 'If you would like to hear about new features and updates for %1$s, subscribe to our newsletter:', 'formidable' ), 'Formidable' ) . '</p>'
245
+						   . '<form target="_blank" action="//formidablepro.us1.list-manage.com/subscribe/post?u=a4a913790ffb892daacc6f271&amp;id=7e7df15967" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
246
+						   . '<p>'
247
+						   . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . esc_attr__( 'Email', 'formidable' ) . '"/>'
248 248
 						   . '<input type="hidden" name="group[4505]" value="4" />'
249
-			               . '<button type="submit" class="button-primary">' . esc_html__( 'Subscribe', 'formidable' ) . '</button>'
250
-			               . '</p>'
251
-			               . '</form>',
249
+						   . '<button type="submit" class="button-primary">' . esc_html__( 'Subscribe', 'formidable' ) . '</button>'
250
+						   . '</p>'
251
+						   . '</form>',
252 252
 			'next_page' => 'entries',
253 253
 		);
254 254
 	}
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	private function entries_pointer() {
262 262
 		return array(
263 263
 			'content'   => '<h3>' . __( 'Entries', 'formidable' ) . '</h3>'
264
-			               . '<p>' . __( 'Each time one of your forms is submitted, an entry is created. You will find every form submission listed here so you will always have a backup if an email fails.', 'formidable' ) . '</p>',
264
+						   . '<p>' . __( 'Each time one of your forms is submitted, an entry is created. You will find every form submission listed here so you will always have a backup if an email fails.', 'formidable' ) . '</p>',
265 265
 			'prev_page' => '',
266 266
 			'next_page' => 'styles',
267 267
 			'selector'  => '.wp-list-table',
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	private function styles_pointer() {
278 278
 		return array(
279 279
 			'content'   => '<h3>' . __( 'Styles', 'formidable' ) . '</h3>'
280
-			               . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',
280
+						   . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',
281 281
 			'prev_page' => 'entries',
282 282
 			'next_page' => 'import',
283 283
 			'selector'  => '.general-style',
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 	private function import_pointer() {
294 294
 		return array(
295 295
 			'content'   => '<h3>' . __( 'Import/Export', 'formidable' ) . '</h3>'
296
-			               . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',
296
+						   . '<p>' . __( 'Import and export forms and styles when copying from one site to another or sharing with someone else. Your entries can be exported to a CSV as well. The Premium version also includes the option to import entries to your site from a CSV.', 'formidable' ) . '</p>',
297 297
 			'prev_page' => 'styles',
298 298
 			'next_page' => 'settings',
299 299
 			'selector'  => '.inside.with_frm_style',
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 				. __( 'Turn stylesheets and scripts off, set which user roles have access to change and create forms, setup your reCaptcha, and set default messages for new forms and fields.', 'formidable' )
314 314
 				. '<p><strong>' . __( 'Plugin Licenses', 'formidable' ) . '</strong><br/>'
315 315
 				. sprintf( __( 'Once you&#8217;ve purchased %1$s or any addons, you&#8217;ll have to enter a license key to get access to all of their powerful features. A Plugin Licenses tab will appear here for you to enter your license key.', 'formidable' ), 'Formidable Pro' )
316
-           	    . '</p>',
316
+		   		. '</p>',
317 317
 			'prev_page' => 'import',
318 318
 			'next_page' => 'addons',
319 319
 		);
@@ -327,10 +327,10 @@  discard block
 block discarded – undo
327 327
 	private function addons_pointer() {
328 328
 		return array(
329 329
 			'content'   => '<h3>' . __( 'Addons', 'formidable' ) . '</h3>'
330
-			               . '<p>' . sprintf( __( 'The powerful functions of %1$s can be extended with %2$spremium plugins%3$s. You can read all about the Formidable Premium Plugins %2$shere%3$s.', 'formidable' ), 'Formidable', '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '">', '</a>' )
330
+						   . '<p>' . sprintf( __( 'The powerful functions of %1$s can be extended with %2$spremium plugins%3$s. You can read all about the Formidable Premium Plugins %2$shere%3$s.', 'formidable' ), 'Formidable', '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '">', '</a>' )
331 331
 						   . '</p>'
332
-			               . '<p><strong>' . __( 'Like this plugin?', 'formidable' ) . '</strong><br/>' . sprintf( __( 'So, we&#8217;ve come to the end of the tour. If you like the plugin, please %1$srate it 5 stars on WordPress.org%2$s!', 'formidable' ), '<a target="_blank" href="https://wordpress.org/plugins/formidable/">', '</a>' ) . '</p>'
333
-			               . '<p>' . sprintf( __( 'Thank you for using our plugin and good luck with your forms!<br/><br/>Best,<br/>Team Formidable - %1$sformidableforms.com%2$s', 'formidable' ), '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '">', '</a>' ) . '</p>',
332
+						   . '<p><strong>' . __( 'Like this plugin?', 'formidable' ) . '</strong><br/>' . sprintf( __( 'So, we&#8217;ve come to the end of the tour. If you like the plugin, please %1$srate it 5 stars on WordPress.org%2$s!', 'formidable' ), '<a target="_blank" href="https://wordpress.org/plugins/formidable/">', '</a>' ) . '</p>'
333
+						   . '<p>' . sprintf( __( 'Thank you for using our plugin and good luck with your forms!<br/><br/>Best,<br/>Team Formidable - %1$sformidableforms.com%2$s', 'formidable' ), '<a target="_blank" href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/' ) ) . '">', '</a>' ) . '</p>',
334 334
 			'prev_page' => 'settings',
335 335
 		);
336 336
 	}
Please login to merge, or discard this patch.