Completed
Push — develop ( 726c93...2619ab )
by Zack
18:22
created
includes/fields/class-gravityview-field-source-url.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@
 block discarded – undo
26 26
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
27 27
 
28 28
 		// Don't link to entry; doesn't make sense.
29
-		unset( $field_options['show_as_link'] );
29
+		unset( $field_options[ 'show_as_link' ] );
30 30
 
31
-		if( 'edit' === $context ) {
31
+		if ( 'edit' === $context ) {
32 32
 			return $field_options;
33 33
 		}
34 34
 
35 35
 		$add_options = array();
36
-		$add_options['link_to_source'] = array(
36
+		$add_options[ 'link_to_source' ] = array(
37 37
 			'type' => 'checkbox',
38 38
 			'label' => __( 'Link to URL:', 'gravityview' ),
39
-			'desc' => __('Display as a link to the Source URL', 'gravityview'),
39
+			'desc' => __( 'Display as a link to the Source URL', 'gravityview' ),
40 40
 			'value' => false,
41 41
 			'merge_tags' => false,
42 42
 		);
43
-		$add_options['source_link_text'] = array(
43
+		$add_options[ 'source_link_text' ] = array(
44 44
 			'type' => 'text',
45 45
 			'label' => __( 'Link Text:', 'gravityview' ),
46
-			'desc' => __('Customize the link text. If empty, the link text will be the URL.', 'gravityview'),
46
+			'desc' => __( 'Customize the link text. If empty, the link text will be the URL.', 'gravityview' ),
47 47
 			'value' => NULL,
48 48
 			'merge_tags' => true,
49 49
 		);
Please login to merge, or discard this patch.
future/includes/class-gv-entry-gravityforms.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public static function by_id( $entry_id ) {
42 42
 		$entry = \GFAPI::get_entry( $entry_id );
43
-		if ( !$entry ) {
43
+		if ( ! $entry ) {
44 44
 			return null;
45 45
 		}
46 46
 
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 	 * @return \GV\Entry|null An instance of this entry or null if not found.
56 56
 	 */
57 57
 	public static function from_entry( $entry ) {
58
-		if ( empty( $entry['id'] ) ) {
58
+		if ( empty( $entry[ 'id' ] ) ) {
59 59
 			return null;
60 60
 		}
61 61
 
62 62
 		$self = new self();
63 63
 		$self->entry = $entry;
64 64
 
65
-		$self->ID = $self->entry['id'];
65
+		$self->ID = $self->entry[ 'id' ];
66 66
 
67 67
 		return $self;
68 68
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return bool Whether the offset exists or not.
77 77
 	 */
78 78
 	public function offsetExists( $offset ) {
79
-		return isset( $this->entry[$offset] );
79
+		return isset( $this->entry[ $offset ] );
80 80
 	}
81 81
 
82 82
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @return mixed The value of the requested entry data.
92 92
 	 */
93 93
 	public function offsetGet( $offset ) {
94
-		return $this->entry[$offset];
94
+		return $this->entry[ $offset ];
95 95
 	}
96 96
 
97 97
 	/**
Please login to merge, or discard this patch.
includes/class-gravityview-logging.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 	function __construct() {
9 9
 
10
-		add_action( 'gravityview_log_error', array( $this, 'log_error'), 10, 2 );
10
+		add_action( 'gravityview_log_error', array( $this, 'log_error' ), 10, 2 );
11 11
 
12
-		add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 );
12
+		add_action( 'gravityview_log_debug', array( $this, 'log_debug' ), 10, 2 );
13 13
 
14 14
 		// Enable debug with Gravity Forms Logging Add-on
15 15
 	    add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			include_once( GRAVITYVIEW_DIR . 'includes/class-debug-bar.php' );
35 35
 		}
36 36
 
37
-		$panels[] = new GravityView_Debug_Bar;
37
+		$panels[ ] = new GravityView_Debug_Bar;
38 38
 
39 39
 		return $panels;
40 40
 	}
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param array $supported_plugins List of plugins
45 45
 	 */
46 46
 	public function enable_gform_logging( $supported_plugins ) {
47
-	    $supported_plugins['gravityview'] = 'GravityView';
47
+	    $supported_plugins[ 'gravityview' ] = 'GravityView';
48 48
 	    return $supported_plugins;
49 49
 	}
50 50
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return string "print_r" or "var_export"
73 73
 	 */
74 74
 	static function get_print_function() {
75
-		if( ob_get_level() > 0 ) {
75
+		if ( ob_get_level() > 0 ) {
76 76
 			$function = 'var_export';
77 77
 		} else {
78 78
 			$function = 'print_r';
@@ -90,17 +90,17 @@  discard block
 block discarded – undo
90 90
 			'data' => $data,
91 91
 		);
92 92
 
93
-		if( !in_array( $notice, self::$notices ) ) {
94
-			self::$notices[] = $notice;
93
+		if ( ! in_array( $notice, self::$notices ) ) {
94
+			self::$notices[ ] = $notice;
95 95
 		}
96 96
 
97
-		if ( class_exists("GFLogging") ) {
97
+		if ( class_exists( "GFLogging" ) ) {
98 98
 			GFLogging::include_logger();
99
-	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
99
+	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $data, true ), KLogger::DEBUG );
100 100
 	    }
101 101
 	}
102 102
 
103
-	static function log_error( $message = '', $data = null  ) {
103
+	static function log_error( $message = '', $data = null ) {
104 104
 
105 105
 		$function = self::get_print_function();
106 106
 
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
 			'backtrace' => function_exists( 'wp_debug_backtrace_summary' ) ? wp_debug_backtrace_summary( null, 3 ) : '',
111 111
 		);
112 112
 
113
-		if( !in_array( $error, self::$errors ) ) {
114
-			self::$errors[] = $error;
113
+		if ( ! in_array( $error, self::$errors ) ) {
114
+			self::$errors[ ] = $error;
115 115
 		}
116 116
 
117
-		if ( class_exists("GFLogging") ) {
117
+		if ( class_exists( "GFLogging" ) ) {
118 118
 		    GFLogging::include_logger();
119
-		    GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
119
+		    GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $error, true ), KLogger::ERROR );
120 120
 		}
121 121
 	}
122 122
 
Please login to merge, or discard this patch.
includes/class-gravityview-compatibility.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return GravityView_Compatibility
77 77
 	 */
78 78
 	public static function getInstance() {
79
-		if( self::$instance ) {
79
+		if ( self::$instance ) {
80 80
 			return self::$instance;
81 81
 		}
82 82
 		return new self;
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
 		// If Gravity Forms doesn't exist or is outdated, load the admin view class to
155 155
 		// show the notice, but not load any post types or process shortcodes.
156 156
 		// Without Gravity Forms, there is no GravityView. Beautiful, really.
157
-		if( ! self::is_valid() ) {
157
+		if ( ! self::is_valid() ) {
158 158
 
159 159
 			// If the plugin's not loaded, might as well hide the shortcode for people.
160
-			add_shortcode( 'gravityview', array( $this, '_shortcode_gf_notice') );
160
+			add_shortcode( 'gravityview', array( $this, '_shortcode_gf_notice' ) );
161 161
 
162 162
 		}
163 163
 	}
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	public function _shortcode_gf_notice( $atts = array(), $content = null, $shortcode = 'gravityview' ) {
185 185
 
186
-		if( ! GVCommon::has_cap( 'activate_plugins' ) ) {
186
+		if ( ! GVCommon::has_cap( 'activate_plugins' ) ) {
187 187
 			return null;
188 188
 		}
189 189
 
190 190
 		$notices = self::get_notices();
191 191
 
192
-		$message = '<div style="border:1px solid red; padding: 15px;"><p style="text-align:center;"><em>' . esc_html__( 'You are seeing this notice because you are an administrator. Other users of the site will see nothing.', 'gravityview') . '</em></p>';
193
-		foreach( (array)$notices as $notice ) {
194
-			$message .= wpautop( $notice['message'] );
192
+		$message = '<div style="border:1px solid red; padding: 15px;"><p style="text-align:center;"><em>' . esc_html__( 'You are seeing this notice because you are an administrator. Other users of the site will see nothing.', 'gravityview' ) . '</em></p>';
193
+		foreach ( (array)$notices as $notice ) {
194
+			$message .= wpautop( $notice[ 'message' ] );
195 195
 		}
196 196
 		$message .= '</div>';
197 197
 
@@ -211,12 +211,12 @@  discard block
 block discarded – undo
211 211
 
212 212
 		if (
213 213
 			( defined( 'GRAVITYVIEW_FUTURE_CORE_LOADED' ) && ! gravityview()->plugin->is_compatible_php() )
214
-			|| ( false === version_compare( phpversion(), GV_MIN_PHP_VERSION , '>=' ) )
214
+			|| ( false === version_compare( phpversion(), GV_MIN_PHP_VERSION, '>=' ) )
215 215
 		) {
216 216
 
217
-			self::$notices['php_version'] = array(
217
+			self::$notices[ 'php_version' ] = array(
218 218
 				'class' => 'error',
219
-				'message' => sprintf( __( "%sGravityView requires PHP Version %s or newer.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.phpversion().'</span>' ),
219
+				'message' => sprintf( __( "%sGravityView requires PHP Version %s or newer.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . phpversion() . '</span>' ),
220 220
 				'cap' => 'manage_options',
221 221
 				'dismiss' => 'php_version',
222 222
 			);
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
 			return false;
225 225
 		}
226 226
 
227
-		if( false === version_compare( phpversion(), GV_FUTURE_MIN_PHP_VERSION , '>=' ) ) {
227
+		if ( false === version_compare( phpversion(), GV_FUTURE_MIN_PHP_VERSION, '>=' ) ) {
228 228
 
229 229
 			// Show the notice on every update. Yes, annoying, but not as annoying as a plugin breaking.
230
-			$key = sprintf('php_%s_%s', GV_FUTURE_MIN_PHP_VERSION, GravityView_Plugin::version );
230
+			$key = sprintf( 'php_%s_%s', GV_FUTURE_MIN_PHP_VERSION, GravityView_Plugin::version );
231 231
 
232 232
 			self::$notices[ $key ] = array(
233 233
 				'class' => 'error',
234
-				'message' => sprintf( __( "%sGravityView will soon require PHP Version %s.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_FUTURE_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.phpversion().'</span>' ),
234
+				'message' => sprintf( __( "%sGravityView will soon require PHP Version %s.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ), '<h3>', GV_FUTURE_MIN_PHP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . phpversion() . '</span>' ),
235 235
 				'cap' => 'manage_options',
236 236
 				'dismiss' => $key,
237 237
 			);
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 			|| ( false === version_compare( $wp_version, GV_MIN_WP_VERSION, '>=' ) )
256 256
 		) {
257 257
 
258
-			self::$notices['wp_version'] = array(
258
+			self::$notices[ 'wp_version' ] = array(
259 259
 				'class' => 'error',
260
-				'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.$wp_version.'</span>' ),
260
+				'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . $wp_version . '</span>' ),
261 261
 			    'cap' => 'update_core',
262 262
 				'dismiss' => 'wp_version',
263 263
 			);
@@ -280,10 +280,10 @@  discard block
 block discarded – undo
280 280
 	public static function check_gravityforms() {
281 281
 
282 282
 		// Bypass other checks: if the class exists
283
-		if( class_exists( 'GFCommon' ) ) {
283
+		if ( class_exists( 'GFCommon' ) ) {
284 284
 
285 285
 			// Does the version meet future requirements?
286
-			if( true === version_compare( GFCommon::$version, GV_FUTURE_MIN_GF_VERSION, ">=" ) ) {
286
+			if ( true === version_compare( GFCommon::$version, GV_FUTURE_MIN_GF_VERSION, ">=" ) ) {
287 287
 				return true;
288 288
 			}
289 289
 
@@ -297,9 +297,9 @@  discard block
 block discarded – undo
297 297
 			$class = $meets_minimum ? 'notice-warning' : 'error';
298 298
 
299 299
 			// Show the notice even if the future version requirements aren't met
300
-			self::$notices['gf_version'] = array(
300
+			self::$notices[ 'gf_version' ] = array(
301 301
 				'class' => $class,
302
-				'message' => sprintf( __( "%sGravityView requires Gravity Forms Version %s or newer.%s \n\nYou're using Version %s. Please update your Gravity Forms or purchase a license. %sGet Gravity Forms%s - starting at $39%s%s", 'gravityview' ), '<h3>', GV_FUTURE_MIN_GF_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">'.GFCommon::$version.'</span>', "\n\n".'<a href="https://gravityview.co/gravityforms/" class="button button-secondary button-large button-hero">' , '<em>', '</em>', '</a>'),
302
+				'message' => sprintf( __( "%sGravityView requires Gravity Forms Version %s or newer.%s \n\nYou're using Version %s. Please update your Gravity Forms or purchase a license. %sGet Gravity Forms%s - starting at $39%s%s", 'gravityview' ), '<h3>', GV_FUTURE_MIN_GF_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . GFCommon::$version . '</span>', "\n\n" . '<a href="https://gravityview.co/gravityforms/" class="button button-secondary button-large button-hero">', '<em>', '</em>', '</a>' ),
303 303
 				'cap' => 'update_plugins',
304 304
 				'dismiss' => 'gf_version_' . GV_FUTURE_MIN_GF_VERSION,
305 305
 			);
@@ -315,42 +315,42 @@  discard block
 block discarded – undo
315 315
 		 * OR
316 316
 		 * It's the Network Admin and we just don't know whether the sites have GF activated themselves.
317 317
 		 */
318
-		if( true === $gf_status || is_network_admin() ) {
318
+		if ( true === $gf_status || is_network_admin() ) {
319 319
 			return true;
320 320
 		}
321 321
 
322 322
 		// If GFCommon doesn't exist, assume GF not active
323 323
 		$return = false;
324 324
 
325
-		switch( $gf_status ) {
325
+		switch ( $gf_status ) {
326 326
 			case 'inactive':
327 327
 
328 328
 				// Required for multisite
329
-				if( ! function_exists('wp_create_nonce') ) {
329
+				if ( ! function_exists( 'wp_create_nonce' ) ) {
330 330
 					require_once ABSPATH . WPINC . '/pluggable.php';
331 331
 				}
332 332
 
333 333
 				// Otherwise, throws an error on activation & deactivation "Use of undefined constant LOGGED_IN_COOKIE"
334
-				if( is_multisite() ) {
334
+				if ( is_multisite() ) {
335 335
 					wp_cookie_constants();
336 336
 				}
337 337
 
338 338
 				$return = false;
339 339
 
340
-				$button = function_exists('is_network_admin') && is_network_admin() ? '<strong><a href="#gravity-forms">' : '<strong><a href="'. wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=gravityforms/gravityforms.php' ), 'activate-plugin_gravityforms/gravityforms.php') . '" class="button button-large">';
340
+				$button = function_exists( 'is_network_admin' ) && is_network_admin() ? '<strong><a href="#gravity-forms">' : '<strong><a href="' . wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=gravityforms/gravityforms.php' ), 'activate-plugin_gravityforms/gravityforms.php' ) . '" class="button button-large">';
341 341
 
342
-				self::$notices['gf_inactive'] = array(
342
+				self::$notices[ 'gf_inactive' ] = array(
343 343
 					'class' => 'error',
344
-					'message' => sprintf( __( '%sGravityView requires Gravity Forms to be active. %sActivate Gravity Forms%s to use the GravityView plugin.', 'gravityview' ), '<h3>', "</h3>\n\n". $button, '</a></strong>' ),
344
+					'message' => sprintf( __( '%sGravityView requires Gravity Forms to be active. %sActivate Gravity Forms%s to use the GravityView plugin.', 'gravityview' ), '<h3>', "</h3>\n\n" . $button, '</a></strong>' ),
345 345
 					'cap' => 'activate_plugins',
346 346
 					'dismiss' => 'gf_inactive',
347 347
 				);
348 348
 
349 349
 				break;
350 350
 			default:
351
-				self::$notices['gf_installed'] = array(
351
+				self::$notices[ 'gf_installed' ] = array(
352 352
 					'class' => 'error',
353
-					'message' => sprintf( __( '%sGravityView requires Gravity Forms to be installed in order to run properly. %sGet Gravity Forms%s - starting at $39%s%s', 'gravityview' ), '<h3>', "</h3>\n\n".'<a href="http://katz.si/gravityforms" class="button button-secondary button-large button-hero">' , '<em>', '</em>', '</a>'),
353
+					'message' => sprintf( __( '%sGravityView requires Gravity Forms to be installed in order to run properly. %sGet Gravity Forms%s - starting at $39%s%s', 'gravityview' ), '<h3>', "</h3>\n\n" . '<a href="http://katz.si/gravityforms" class="button button-secondary button-large button-hero">', '<em>', '</em>', '</a>' ),
354 354
 					'cap' => 'install_plugins',
355 355
 					'dismiss' => 'gf_installed',
356 356
 				);
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
 	 */
368 368
 	private static function check_gf_directory() {
369 369
 
370
-		if( class_exists( 'GFDirectory' ) ) {
371
-			self::$notices['gf_directory'] = array(
370
+		if ( class_exists( 'GFDirectory' ) ) {
371
+			self::$notices[ 'gf_directory' ] = array(
372 372
 				'class' => 'error is-dismissible',
373
-				'title' => __('Potential Conflict', 'gravityview' ),
373
+				'title' => __( 'Potential Conflict', 'gravityview' ),
374 374
 				'message' => __( 'GravityView and Gravity Forms Directory are both active. This may cause problems. If you experience issues, disable the Gravity Forms Directory plugin.', 'gravityview' ),
375 375
 				'dismiss' => 'gf_directory',
376 376
 				'cap' => 'activate_plugins',
@@ -389,21 +389,21 @@  discard block
 block discarded – undo
389 389
 	 */
390 390
 	public static function get_plugin_status( $location = '' ) {
391 391
 
392
-		if( ! function_exists('is_plugin_active') ) {
392
+		if ( ! function_exists( 'is_plugin_active' ) ) {
393 393
 			include_once( ABSPATH . '/wp-admin/includes/plugin.php' );
394 394
 		}
395 395
 
396
-		if( is_network_admin() && is_plugin_active_for_network( $location ) ) {
396
+		if ( is_network_admin() && is_plugin_active_for_network( $location ) ) {
397 397
 			return true;
398 398
 		}
399 399
 
400
-		if( !is_network_admin() && is_plugin_active( $location ) ) {
400
+		if ( ! is_network_admin() && is_plugin_active( $location ) ) {
401 401
 			return true;
402 402
 		}
403 403
 
404
-		if(
405
-			!file_exists( trailingslashit( WP_PLUGIN_DIR ) . $location ) &&
406
-			!file_exists( trailingslashit( WPMU_PLUGIN_DIR ) . $location )
404
+		if (
405
+			! file_exists( trailingslashit( WP_PLUGIN_DIR ) . $location ) &&
406
+			! file_exists( trailingslashit( WPMU_PLUGIN_DIR ) . $location )
407 407
 		) {
408 408
 			return false;
409 409
 		}
Please login to merge, or discard this patch.
includes/class-gv-license-handler.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return GV_License_Handler
48 48
 	 */
49 49
 	public static function get_instance( GravityView_Settings $GFAddOn ) {
50
-		if( empty( self::$instance ) ) {
50
+		if ( empty( self::$instance ) ) {
51 51
 			self::$instance = new self( $GFAddOn );
52 52
 		}
53 53
 		return self::$instance;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 				    'url'        => home_url(),
124 124
 				    'site_data'  => $this->get_site_data(),
125 125
 			    ),
126
-			));
126
+			) );
127 127
 
128 128
 			// make sure the response came back okay
129 129
 			if ( is_wp_error( $response ) ) {
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	public function refresh_license_status() {
151 151
 
152
-		if ( defined('DOING_AJAX') && DOING_AJAX ) {
152
+		if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
153 153
 			return;
154 154
 		}
155 155
 
156 156
 		// The transient is fresh; don't fetch.
157
-		if( $status = get_transient( self::status_transient_key ) ) {
157
+		if ( $status = get_transient( self::status_transient_key ) ) {
158 158
 			return;
159 159
 		}
160 160
 
@@ -187,49 +187,49 @@  discard block
 block discarded – undo
187 187
 		$theme_data = wp_get_theme();
188 188
 		$theme      = $theme_data->Name . ' ' . $theme_data->Version;
189 189
 
190
-		$data['gv_version']  = GravityView_Plugin::version;
191
-		$data['php_version']  = phpversion();
192
-		$data['wp_version']   = get_bloginfo( 'version' );
193
-		$data['gf_version']  = GFForms::$version;
194
-		$data['server']       = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
195
-		$data['multisite']    = is_multisite();
196
-		$data['theme']        = $theme;
197
-		$data['url']          = home_url();
198
-		$data['license_key']  = GravityView_Settings::get_instance()->get_app_setting( 'license_key' );
199
-		$data['beta']         = GravityView_Settings::get_instance()->get_app_setting( 'beta' );
190
+		$data[ 'gv_version' ]  = GravityView_Plugin::version;
191
+		$data[ 'php_version' ]  = phpversion();
192
+		$data[ 'wp_version' ]   = get_bloginfo( 'version' );
193
+		$data[ 'gf_version' ]  = GFForms::$version;
194
+		$data[ 'server' ]       = isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ? $_SERVER[ 'SERVER_SOFTWARE' ] : '';
195
+		$data[ 'multisite' ]    = is_multisite();
196
+		$data[ 'theme' ]        = $theme;
197
+		$data[ 'url' ]          = home_url();
198
+		$data[ 'license_key' ]  = GravityView_Settings::get_instance()->get_app_setting( 'license_key' );
199
+		$data[ 'beta' ]         = GravityView_Settings::get_instance()->get_app_setting( 'beta' );
200 200
 
201 201
 		// View Data
202
-		$gravityview_posts = get_posts('numberposts=-1&post_type=gravityview&post_status=publish&order=ASC');
202
+		$gravityview_posts = get_posts( 'numberposts=-1&post_type=gravityview&post_status=publish&order=ASC' );
203 203
 
204 204
 		if ( ! empty( $gravityview_posts ) ) {
205 205
 			$first = array_shift( $gravityview_posts );
206 206
 			$latest = array_pop( $gravityview_posts );
207
-			$data['view_count'] = count( $gravityview_posts );
208
-			$data['view_first'] = $first->post_date;
209
-			$data['view_latest'] = $latest->post_date;
207
+			$data[ 'view_count' ] = count( $gravityview_posts );
208
+			$data[ 'view_first' ] = $first->post_date;
209
+			$data[ 'view_latest' ] = $latest->post_date;
210 210
 		}
211 211
 
212 212
 		// Form counts
213 213
 		if ( class_exists( 'GFFormsModel' ) ) {
214 214
 			$form_data = GFFormsModel::get_form_count();
215
-			$data['forms_total'] = rgar( $form_data, 'total', 0 );
216
-			$data['forms_active'] = rgar( $form_data, 'active', 0 );
217
-			$data['forms_inactive'] = rgar( $form_data, 'inactive', 0 );
218
-			$data['forms_trash'] = rgar( $form_data, 'inactive', 0 );
215
+			$data[ 'forms_total' ] = rgar( $form_data, 'total', 0 );
216
+			$data[ 'forms_active' ] = rgar( $form_data, 'active', 0 );
217
+			$data[ 'forms_inactive' ] = rgar( $form_data, 'inactive', 0 );
218
+			$data[ 'forms_trash' ] = rgar( $form_data, 'inactive', 0 );
219 219
 		}
220 220
 
221 221
 		// Retrieve current plugin information
222
-		if( ! function_exists( 'get_plugins' ) ) {
222
+		if ( ! function_exists( 'get_plugins' ) ) {
223 223
 			include ABSPATH . '/wp-admin/includes/plugin.php';
224 224
 		}
225 225
 
226
-		$data['integrations']     = self::get_related_plugins_and_extensions();
227
-		$data['active_plugins']   = get_option( 'active_plugins', array() );
228
-		$data['inactive_plugins'] = array();
229
-		$data['locale']           = get_locale();
226
+		$data[ 'integrations' ]     = self::get_related_plugins_and_extensions();
227
+		$data[ 'active_plugins' ]   = get_option( 'active_plugins', array() );
228
+		$data[ 'inactive_plugins' ] = array();
229
+		$data[ 'locale' ]           = get_locale();
230 230
 
231 231
 		// Validate request on the GV server
232
-		$data['hash']             = 'gv_version.url.locale:' . sha1( $data['gv_version'] . $data['url'] . $data['locale'] );
232
+		$data[ 'hash' ]             = 'gv_version.url.locale:' . sha1( $data[ 'gv_version' ] . $data[ 'url' ] . $data[ 'locale' ] );
233 233
 
234 234
 		return $data;
235 235
 	}
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
 
262 262
 				$plugin_data = get_plugin_data( $active_plugin );
263 263
 
264
-				$extensions[] = sprintf( '%s %s', $plugin_data['Name'], $plugin_data['Version'] );
264
+				$extensions[ ] = sprintf( '%s %s', $plugin_data[ 'Name' ], $plugin_data[ 'Version' ] );
265 265
 			}
266 266
 
267
-			if( ! empty( $extensions ) ) {
267
+			if ( ! empty( $extensions ) ) {
268 268
 				set_site_transient( self::related_plugins_key, $extensions, HOUR_IN_SECONDS );
269 269
 			} else {
270 270
 				return 'There was an error fetching related plugins.';
@@ -283,37 +283,37 @@  discard block
 block discarded – undo
283 283
 		$status = trim( $this->Addon->get_app_setting( 'license_key_status' ) );
284 284
 		$key = trim( $this->Addon->get_app_setting( 'license_key' ) );
285 285
 
286
-		if( !empty( $key ) ) {
286
+		if ( ! empty( $key ) ) {
287 287
 			$response = $this->Addon->get_app_setting( 'license_key_response' );
288
-			$response = is_array( $response ) ? (object) $response : json_decode( $response );
288
+			$response = is_array( $response ) ? (object)$response : json_decode( $response );
289 289
 		} else {
290 290
 			$response = array();
291 291
 		}
292 292
 
293 293
 		wp_localize_script( 'gv-admin-edd-license', 'GVGlobals', array(
294 294
 			'license_box' => $this->get_license_message( $response )
295
-		));
295
+		) );
296 296
 
297 297
 
298 298
 		$fields = array(
299 299
 			array(
300 300
 				'name'  => 'edd-activate',
301
-				'value' => __('Activate License', 'gravityview'),
302
-				'data-pending_text' => __('Verifying license&hellip;', 'gravityview'),
301
+				'value' => __( 'Activate License', 'gravityview' ),
302
+				'data-pending_text' => __( 'Verifying license&hellip;', 'gravityview' ),
303 303
 				'data-edd_action' => 'activate_license',
304 304
 				'class' => 'button-primary',
305 305
 			),
306 306
 			array(
307 307
 				'name'  => 'edd-deactivate',
308
-				'value' => __('Deactivate License', 'gravityview'),
309
-				'data-pending_text' => __('Deactivating license&hellip;', 'gravityview'),
308
+				'value' => __( 'Deactivate License', 'gravityview' ),
309
+				'data-pending_text' => __( 'Deactivating license&hellip;', 'gravityview' ),
310 310
 				'data-edd_action' => 'deactivate_license',
311 311
 				'class' => ( empty( $status ) ? 'button-primary hide' : 'button-primary' ),
312 312
 			),
313 313
 			array(
314 314
 				'name'  => 'edd-check',
315
-				'value' => __('Check License', 'gravityview'),
316
-				'data-pending_text' => __('Verifying license&hellip;', 'gravityview'),
315
+				'value' => __( 'Check License', 'gravityview' ),
316
+				'data-pending_text' => __( 'Verifying license&hellip;', 'gravityview' ),
317 317
 				'title' => 'Check the license before saving it',
318 318
 				'data-edd_action' => 'check_license',
319 319
 				'class' => 'button-secondary',
@@ -323,17 +323,17 @@  discard block
 block discarded – undo
323 323
 
324 324
 		$class = 'button gv-edd-action';
325 325
 
326
-		$class .= ( !empty( $key ) && $status !== 'valid' ) ? '' : ' hide';
326
+		$class .= ( ! empty( $key ) && $status !== 'valid' ) ? '' : ' hide';
327 327
 
328 328
 		$disabled_attribute = GVCommon::has_cap( 'gravityview_edit_settings' ) ? false : 'disabled';
329 329
 
330 330
 		$submit = '<div class="gv-edd-button-wrapper">';
331 331
 		foreach ( $fields as $field ) {
332
-			$field['type'] = 'button';
333
-			$field['class'] = isset( $field['class'] ) ? $field['class'] . ' '. $class : $class;
334
-			$field['style'] = 'margin-left: 10px;';
335
-			if( $disabled_attribute ) {
336
-				$field['disabled'] = $disabled_attribute;
332
+			$field[ 'type' ] = 'button';
333
+			$field[ 'class' ] = isset( $field[ 'class' ] ) ? $field[ 'class' ] . ' ' . $class : $class;
334
+			$field[ 'style' ] = 'margin-left: 10px;';
335
+			if ( $disabled_attribute ) {
336
+				$field[ 'disabled' ] = $disabled_attribute;
337 337
 			}
338 338
 			$submit .= $this->Addon->settings_submit( $field, $echo );
339 339
 		}
@@ -352,8 +352,8 @@  discard block
 block discarded – undo
352 352
 	 */
353 353
 	public function setup_edd() {
354 354
 
355
-		if( !class_exists('EDD_SL_Plugin_Updater') ) {
356
-			require_once( GRAVITYVIEW_DIR . 'includes/lib/EDD_SL_Plugin_Updater.php');
355
+		if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
356
+			require_once( GRAVITYVIEW_DIR . 'includes/lib/EDD_SL_Plugin_Updater.php' );
357 357
 		}
358 358
 
359 359
 		// setup the updater
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
 		    'beta'      => $this->Addon->get_app_setting( 'beta' ),
392 392
 		);
393 393
 
394
-		if( !empty( $action ) ) {
395
-			$settings['edd_action'] = esc_attr( $action );
394
+		if ( ! empty( $action ) ) {
395
+			$settings[ 'edd_action' ] = esc_attr( $action );
396 396
 		}
397 397
 
398 398
 		$settings = array_map( 'urlencode', $settings );
@@ -406,14 +406,14 @@  discard block
 block discarded – undo
406 406
 	 */
407 407
 	private function _license_get_remote_response( $data, $license = '' ) {
408 408
 
409
-		$api_params = $this->_get_edd_settings( $data['edd_action'], $license );
409
+		$api_params = $this->_get_edd_settings( $data[ 'edd_action' ], $license );
410 410
 
411 411
 		$url = add_query_arg( $api_params, self::url );
412 412
 
413 413
 		$response = wp_remote_get( $url, array(
414 414
 			'timeout'   => 15,
415 415
 			'sslverify' => false,
416
-		));
416
+		) );
417 417
 
418 418
 		if ( is_wp_error( $response ) ) {
419 419
 
@@ -451,11 +451,11 @@  discard block
 block discarded – undo
451 451
 	 */
452 452
 	function get_license_message( $license_data ) {
453 453
 
454
-		if( empty( $license_data ) ) {
454
+		if ( empty( $license_data ) ) {
455 455
 			$message = '';
456 456
 		} else {
457 457
 
458
-			if( ! empty( $license_data->error ) ) {
458
+			if ( ! empty( $license_data->error ) ) {
459 459
 				$class = 'error';
460 460
 				$string_key = $license_data->error;
461 461
 			} else {
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 				$string_key = $license_data->license;
464 464
 			}
465 465
 
466
-			$message = sprintf( '<p><strong>%s: %s</strong></p>', $this->strings('status'), $this->strings( $string_key, $license_data ) );
466
+			$message = sprintf( '<p><strong>%s: %s</strong></p>', $this->strings( 'status' ), $this->strings( $string_key, $license_data ) );
467 467
 
468 468
 			$message = $this->generate_license_box( $message, $class );
469 469
 		}
@@ -500,18 +500,18 @@  discard block
 block discarded – undo
500 500
 	 */
501 501
 	public function license_details( $response = array() ) {
502 502
 
503
-		$response = (array) $response;
503
+		$response = (array)$response;
504 504
 
505 505
 		$return = '';
506 506
 		$wrapper = '<span class="gv-license-details" aria-live="polite" aria-busy="false">%s</span>';
507 507
 
508
-		if( ! empty( $response['license_key'] ) ) {
508
+		if ( ! empty( $response[ 'license_key' ] ) ) {
509 509
 
510 510
 			$return .= '<h3>' . esc_html__( 'License Details:', 'gravityview' ) . '</h3>';
511 511
 
512 512
 			if ( in_array( rgar( $response, 'license' ), array( 'invalid', 'deactivated' ) ) ) {
513
-				$return .= $this->strings( $response['license'], $response );
514
-			} elseif ( ! empty( $response['license_name'] ) ) {
513
+				$return .= $this->strings( $response[ 'license' ], $response );
514
+			} elseif ( ! empty( $response[ 'license_name' ] ) ) {
515 515
 
516 516
 				$response_keys = array(
517 517
 					'license_name'   => '',
@@ -526,19 +526,19 @@  discard block
 block discarded – undo
526 526
 				// Make sure all the keys are set
527 527
 				$response = wp_parse_args( $response, $response_keys );
528 528
 
529
-				$login_link = sprintf( '<a href="%s" class="howto" rel="external">%s</a>', esc_url( sprintf( 'https://gravityview.co/wp-login.php?username=%s', $response['customer_email'] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
530
-				$local_text = ( ! empty( $response['is_local'] ) ? '<span class="howto">' . __( 'This development site does not count toward license activation limits', 'gravityview' ) . '</span>' : '' );
529
+				$login_link = sprintf( '<a href="%s" class="howto" rel="external">%s</a>', esc_url( sprintf( 'https://gravityview.co/wp-login.php?username=%s', $response[ 'customer_email' ] ) ), esc_html__( 'Access your GravityView account', 'gravityview' ) );
530
+				$local_text = ( ! empty( $response[ 'is_local' ] ) ? '<span class="howto">' . __( 'This development site does not count toward license activation limits', 'gravityview' ) . '</span>' : '' );
531 531
 				$details    = array(
532
-					'license'     => sprintf( esc_html__( 'License level: %s', 'gravityview' ), esc_html( $response['license_name'] ), esc_html( $response['license_limit'] ) ),
533
-					'licensed_to' => sprintf( esc_html_x( 'Licensed to: %1$s (%2$s)', '1: Customer name; 2: Customer email', 'gravityview' ), esc_html__( $response['customer_name'], 'gravityview' ), esc_html__( $response['customer_email'], 'gravityview' ) ) . $login_link,
534
-					'activations' => sprintf( esc_html__( 'Activations: %d of %s sites', 'gravityview' ), intval( $response['site_count'] ), esc_html( $response['license_limit'] ) ) . $local_text,
535
-					'expires'     => 'lifetime' === $response['expires'] ? '' : sprintf( esc_html__( 'Renew on: %s', 'gravityview' ), date_i18n( get_option( 'date_format' ), strtotime( $response['expires'] ) - DAY_IN_SECONDS ) ),
536
-					'upgrade'     => $this->get_upgrade_html( $response['upgrades'] ),
532
+					'license'     => sprintf( esc_html__( 'License level: %s', 'gravityview' ), esc_html( $response[ 'license_name' ] ), esc_html( $response[ 'license_limit' ] ) ),
533
+					'licensed_to' => sprintf( esc_html_x( 'Licensed to: %1$s (%2$s)', '1: Customer name; 2: Customer email', 'gravityview' ), esc_html__( $response[ 'customer_name' ], 'gravityview' ), esc_html__( $response[ 'customer_email' ], 'gravityview' ) ) . $login_link,
534
+					'activations' => sprintf( esc_html__( 'Activations: %d of %s sites', 'gravityview' ), intval( $response[ 'site_count' ] ), esc_html( $response[ 'license_limit' ] ) ) . $local_text,
535
+					'expires'     => 'lifetime' === $response[ 'expires' ] ? '' : sprintf( esc_html__( 'Renew on: %s', 'gravityview' ), date_i18n( get_option( 'date_format' ), strtotime( $response[ 'expires' ] ) - DAY_IN_SECONDS ) ),
536
+					'upgrade'     => $this->get_upgrade_html( $response[ 'upgrades' ] ),
537 537
 				);
538 538
 
539
-				if ( ! empty( $response['error'] ) && 'expired' === $response['error'] ) {
540
-					unset( $details['upgrade'] );
541
-					$details['expires'] = '<div class="error inline"><p>' . $this->strings( 'expired', $response ) . '</p></div>';
539
+				if ( ! empty( $response[ 'error' ] ) && 'expired' === $response[ 'error' ] ) {
540
+					unset( $details[ 'upgrade' ] );
541
+					$details[ 'expires' ] = '<div class="error inline"><p>' . $this->strings( 'expired', $response ) . '</p></div>';
542 542
 				}
543 543
 
544 544
 				$return .= '<ul><li>' . implode( '</li><li>', array_filter( $details ) ) . '</li></ul>';
@@ -561,11 +561,11 @@  discard block
 block discarded – undo
561 561
 
562 562
 		$output = '';
563 563
 
564
-		if( ! empty( $upgrades ) ) {
564
+		if ( ! empty( $upgrades ) ) {
565 565
 
566 566
 			$locale_parts = explode( '_', get_locale() );
567 567
 
568
-			$is_english = ( 'en' === $locale_parts[0] );
568
+			$is_english = ( 'en' === $locale_parts[ 0 ] );
569 569
 
570 570
 			$output .= '<h4>' . esc_html__( 'Upgrades available:', 'gravityview' ) . '</h4>';
571 571
 
@@ -573,14 +573,14 @@  discard block
 block discarded – undo
573 573
 
574 574
 			foreach ( $upgrades as $upgrade_id => $upgrade ) {
575 575
 
576
-				$upgrade = (object) $upgrade;
576
+				$upgrade = (object)$upgrade;
577 577
 
578 578
 				$anchor_text = sprintf( esc_html_x( 'Upgrade to %1$s for %2$s', '1: GravityView upgrade name, 2: Cost of upgrade', 'gravityview' ), esc_attr( $upgrade->name ), esc_attr( $upgrade->price ) );
579 579
 
580
-				if( $is_english && isset( $upgrade->description ) ) {
580
+				if ( $is_english && isset( $upgrade->description ) ) {
581 581
 					$message = esc_html( $upgrade->description );
582 582
 				} else {
583
-					switch( $upgrade->price_id ) {
583
+					switch ( $upgrade->price_id ) {
584 584
 						// Interstellar
585 585
 						case 1:
586 586
 						default:
@@ -618,16 +618,16 @@  discard block
 block discarded – undo
618 618
 	 */
619 619
 	public function license_call( $array = array() ) {
620 620
 
621
-		$is_ajax = ( defined('DOING_AJAX') && DOING_AJAX );
622
-		$data = empty( $array ) ? $_POST['data'] : $array;
621
+		$is_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
622
+		$data = empty( $array ) ? $_POST[ 'data' ] : $array;
623 623
 		$has_cap = GVCommon::has_cap( 'gravityview_edit_settings' );
624 624
 
625
-		if ( $is_ajax && empty( $data['license'] ) ) {
626
-			die( - 1 );
625
+		if ( $is_ajax && empty( $data[ 'license' ] ) ) {
626
+			die( -1 );
627 627
 		}
628 628
 
629 629
 		// If the user isn't allowed to edit settings, show an error message
630
-		if( ! $has_cap && empty( $data['all_caps'] ) ) {
630
+		if ( ! $has_cap && empty( $data[ 'all_caps' ] ) ) {
631 631
 			$license_data = new stdClass();
632 632
 			$license_data->error = 'capability';
633 633
 			$license_data->message = $this->get_license_message( $license_data );
@@ -651,11 +651,11 @@  discard block
 block discarded – undo
651 651
 
652 652
 			$json = json_encode( $license_data );
653 653
 
654
-			$update_license = ( ! isset( $data['update'] ) || ! empty( $data['update'] ) );
654
+			$update_license = ( ! isset( $data[ 'update' ] ) || ! empty( $data[ 'update' ] ) );
655 655
 
656
-			$is_check_action_button = ( 'check_license' === $data['edd_action'] && defined( 'DOING_AJAX' ) && DOING_AJAX );
656
+			$is_check_action_button = ( 'check_license' === $data[ 'edd_action' ] && defined( 'DOING_AJAX' ) && DOING_AJAX );
657 657
 
658
-			if( $is_check_action_button ) {
658
+			if ( $is_check_action_button ) {
659 659
 				delete_transient( self::status_transient_key );
660 660
 			}
661 661
 			// Failed is the response from trying to de-activate a license and it didn't work.
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 			// most likely a mistake.
665 665
 			else if ( $license_data->license !== 'failed' && $update_license ) {
666 666
 
667
-				if ( ! empty( $data['field_id'] ) ) {
667
+				if ( ! empty( $data[ 'field_id' ] ) ) {
668 668
 					set_transient( self::status_transient_key, $license_data, DAY_IN_SECONDS );
669 669
 				}
670 670
 
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
 		if ( $is_ajax ) {
676 676
 			exit( $json );
677 677
 		} else { // Non-ajax call
678
-			return ( rgget('format', $data ) === 'object' ) ? $license_data : $json;
678
+			return ( rgget( 'format', $data ) === 'object' ) ? $license_data : $json;
679 679
 		}
680 680
 	}
681 681
 
@@ -689,9 +689,9 @@  discard block
 block discarded – undo
689 689
 		// Update option with passed data license
690 690
 		$settings = $this->Addon->get_app_settings();
691 691
 
692
-        $settings['license_key'] = $license_data->license_key = trim( $data['license'] );
693
-		$settings['license_key_status'] = $license_data->license;
694
-		$settings['license_key_response'] = (array)$license_data;
692
+        $settings[ 'license_key' ] = $license_data->license_key = trim( $data[ 'license' ] );
693
+		$settings[ 'license_key_status' ] = $license_data->license;
694
+		$settings[ 'license_key_response' ] = (array)$license_data;
695 695
 
696 696
 		$this->Addon->update_app_settings( $settings );
697 697
 	}
@@ -706,9 +706,9 @@  discard block
 block discarded – undo
706 706
 
707 707
 		$license_data = is_array( $license_data ) ? (object)$license_data : $license_data;
708 708
 
709
-		if( ! empty( $license_data->renewal_url ) ) {
709
+		if ( ! empty( $license_data->renewal_url ) ) {
710 710
 			$renew_license_url = $license_data->renewal_url;
711
-		} elseif( ! empty( $license_data->license_key ) ) {
711
+		} elseif ( ! empty( $license_data->license_key ) ) {
712 712
 			$renew_license_url = sprintf( 'https://gravityview.co/checkout/?download_id=17&edd_license_key=%s', $license_data->license_key );
713 713
 		} else {
714 714
 			$renew_license_url = 'https://gravityview.co/account/';
@@ -730,31 +730,31 @@  discard block
 block discarded – undo
730 730
 
731 731
 
732 732
 		$strings = array(
733
-			'status' => esc_html__('Status', 'gravityview'),
734
-			'error' => esc_html__('There was an error processing the request.', 'gravityview'),
735
-			'failed'  => esc_html__('Could not deactivate the license. The license key you attempted to deactivate may not be active or valid.', 'gravityview'),
736
-			'site_inactive' => esc_html__('The license key is valid, but it has not been activated for this site.', 'gravityview'),
737
-			'inactive' => esc_html__('The license key is valid, but it has not been activated for this site.', 'gravityview'),
738
-			'no_activations_left' => esc_html__('Invalid: this license has reached its activation limit.', 'gravityview') . ' ' . sprintf( esc_html__('You can manage license activations %son your GravityView account page%s.', 'gravityview'), '<a href="https://gravityview.co/account/#licenses">', '</a>' ),
739
-			'deactivated' => esc_html__('The license has been deactivated.', 'gravityview'),
740
-			'valid' => esc_html__('The license key is valid and active.', 'gravityview'),
741
-			'invalid' => esc_html__('The license key entered is invalid.', 'gravityview'),
742
-			'missing' => esc_html__('Invalid license key.', 'gravityview'),
743
-			'revoked' => esc_html__('This license key has been revoked.', 'gravityview'),
744
-			'expired' => sprintf( esc_html__('This license key has expired. %sRenew your license on the GravityView website%s to receive updates and support.', 'gravityview'), '<a href="'. esc_url( $this->get_license_renewal_url( $license_data ) ) .'">', '</a>' ),
733
+			'status' => esc_html__( 'Status', 'gravityview' ),
734
+			'error' => esc_html__( 'There was an error processing the request.', 'gravityview' ),
735
+			'failed'  => esc_html__( 'Could not deactivate the license. The license key you attempted to deactivate may not be active or valid.', 'gravityview' ),
736
+			'site_inactive' => esc_html__( 'The license key is valid, but it has not been activated for this site.', 'gravityview' ),
737
+			'inactive' => esc_html__( 'The license key is valid, but it has not been activated for this site.', 'gravityview' ),
738
+			'no_activations_left' => esc_html__( 'Invalid: this license has reached its activation limit.', 'gravityview' ) . ' ' . sprintf( esc_html__( 'You can manage license activations %son your GravityView account page%s.', 'gravityview' ), '<a href="https://gravityview.co/account/#licenses">', '</a>' ),
739
+			'deactivated' => esc_html__( 'The license has been deactivated.', 'gravityview' ),
740
+			'valid' => esc_html__( 'The license key is valid and active.', 'gravityview' ),
741
+			'invalid' => esc_html__( 'The license key entered is invalid.', 'gravityview' ),
742
+			'missing' => esc_html__( 'Invalid license key.', 'gravityview' ),
743
+			'revoked' => esc_html__( 'This license key has been revoked.', 'gravityview' ),
744
+			'expired' => sprintf( esc_html__( 'This license key has expired. %sRenew your license on the GravityView website%s to receive updates and support.', 'gravityview' ), '<a href="' . esc_url( $this->get_license_renewal_url( $license_data ) ) . '">', '</a>' ),
745 745
 			'capability' => esc_html__( 'You don\'t have the ability to edit plugin settings.', 'gravityview' ),
746 746
 
747
-			'verifying_license' => esc_html__('Verifying license&hellip;', 'gravityview'),
748
-			'activate_license' => esc_html__('Activate License', 'gravityview'),
749
-			'deactivate_license' => esc_html__('Deactivate License', 'gravityview'),
750
-			'check_license' => esc_html__('Verify License', 'gravityview'),
747
+			'verifying_license' => esc_html__( 'Verifying license&hellip;', 'gravityview' ),
748
+			'activate_license' => esc_html__( 'Activate License', 'gravityview' ),
749
+			'deactivate_license' => esc_html__( 'Deactivate License', 'gravityview' ),
750
+			'check_license' => esc_html__( 'Verify License', 'gravityview' ),
751 751
 		);
752 752
 
753
-		if( empty( $status ) ) {
753
+		if ( empty( $status ) ) {
754 754
 			return $strings;
755 755
 		}
756 756
 
757
-		if( isset( $strings[ $status ] ) ) {
757
+		if ( isset( $strings[ $status ] ) ) {
758 758
 			return $strings[ $status ];
759 759
 		}
760 760
 
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 ?>
12 12
 
13 13
 <div class="gv-search-box gv-search-date">
14
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
15
-	<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
14
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
15
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
16 16
 	<?php } ?>
17 17
 	<p>
18
-		<input type="text" name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
18
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
19 19
 	</p>
20 20
 </div>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-multiselect.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 $search_field = $gravityview_view->search_field;
11 11
 
12 12
 // Make sure that there are choices to display
13
-if( empty( $search_field['choices'] ) ) {
14
-	do_action('gravityview_log_debug', 'search-field-multiselect.php - No choices for field' );
13
+if ( empty( $search_field[ 'choices' ] ) ) {
14
+	do_action( 'gravityview_log_debug', 'search-field-multiselect.php - No choices for field' );
15 15
 	return;
16 16
 }
17 17
 
@@ -21,19 +21,19 @@  discard block
 block discarded – undo
21 21
  * @param string $default_option Default: `&mdash;` (—)
22 22
  * @param string $field_type Field type: "select" or "multiselect"
23 23
  */
24
-$default_option = apply_filters('gravityview/extension/search/select_default', '&mdash;', 'multiselect' );
24
+$default_option = apply_filters( 'gravityview/extension/search/select_default', '&mdash;', 'multiselect' );
25 25
 
26 26
 ?>
27 27
 <div class="gv-search-box gv-search-field-multiselect">
28
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
29
-		<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
28
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
29
+		<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
30 30
 	<?php } ?>
31 31
 	<p>
32
-		<select name="<?php echo esc_attr( $search_field['name'] ); ?>[]" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" multiple>
33
-			<option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option>
32
+		<select name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>[]" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" multiple>
33
+			<option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option>
34 34
 			<?php
35
-			foreach( $search_field['choices'] as $choice ) : ?>
36
-				<option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php gv_selected( $choice['value'], $search_field['value'], true ); ?>><?php echo esc_html( $choice['text'] ); ?></option>
35
+			foreach ( $search_field[ 'choices' ] as $choice ) : ?>
36
+				<option value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" <?php gv_selected( $choice[ 'value' ], $search_field[ 'value' ], true ); ?>><?php echo esc_html( $choice[ 'text' ] ); ?></option>
37 37
 			<?php endforeach; ?>
38 38
 		</select>
39 39
 	</p>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-entry_date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $view_id = $gravityview_view->getViewId();
10
-$value = $gravityview_view->search_field['value'];
11
-$label = $gravityview_view->search_field['label'];
10
+$value = $gravityview_view->search_field[ 'value' ];
11
+$label = $gravityview_view->search_field[ 'label' ];
12 12
 
13 13
 ?>
14 14
 
15 15
 <div class="gv-search-box gv-search-date gv-search-date-range gv-search-field-entry_date">
16
-	<?php if( ! gv_empty( $label, false, false ) ) { ?>
16
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
17 17
 	<label for="gv_start_date_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
18 18
 	<?php } ?>
19 19
 	<p>
20
-		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview' ); ?>" value="<?php echo $value['start']; ?>">
21
-		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview' ); ?>" value="<?php echo $value['end']; ?>">
20
+		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'Start date', 'gravityview' ); ?>" value="<?php echo $value[ 'start' ]; ?>">
21
+		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'End date', 'gravityview' ); ?>" value="<?php echo $value[ 'end' ]; ?>">
22 22
 	</p>
23 23
 </div>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-select.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 $search_field = $gravityview_view->search_field;
11 11
 
12 12
 // Make sure that there are choices to display
13
-if( empty( $search_field['choices'] ) ) {
14
-	do_action('gravityview_log_debug', 'search-field-select.php - No choices for field' );
13
+if ( empty( $search_field[ 'choices' ] ) ) {
14
+	do_action( 'gravityview_log_debug', 'search-field-select.php - No choices for field' );
15 15
 	return;
16 16
 }
17 17
 
@@ -21,19 +21,19 @@  discard block
 block discarded – undo
21 21
  * @param string $default_option Default: `&mdash;` (—)
22 22
  * @param string $field_type Field type: "select" or "multiselect"
23 23
  */
24
-$default_option = apply_filters('gravityview/extension/search/select_default', '&mdash;', 'select' );
24
+$default_option = apply_filters( 'gravityview/extension/search/select_default', '&mdash;', 'select' );
25 25
 
26 26
 ?>
27 27
 <div class="gv-search-box gv-search-field-select">
28
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
29
-		<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
28
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
29
+		<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
30 30
 	<?php } ?>
31 31
 	<p>
32
-		<select name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>">
33
-			<option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option>
32
+		<select name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>">
33
+			<option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option>
34 34
 			<?php
35
-			foreach( $search_field['choices'] as $choice ) : ?>
36
-				<option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php gv_selected( esc_attr( $choice['value'] ), esc_attr( $search_field['value'] ), true ); ?>><?php echo esc_html( $choice['text'] ); ?></option>
35
+			foreach ( $search_field[ 'choices' ] as $choice ) : ?>
36
+				<option value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" <?php gv_selected( esc_attr( $choice[ 'value' ] ), esc_attr( $search_field[ 'value' ] ), true ); ?>><?php echo esc_html( $choice[ 'text' ] ); ?></option>
37 37
 			<?php endforeach; ?>
38 38
 		</select>
39 39
 	</p>
Please login to merge, or discard this patch.