Completed
Pull Request — master (#937)
by Zack
19:41 queued 16:25
created
includes/wordpress-widgets/class-gravityview-recent-entries-widget.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	function __construct( ) {
14 14
 
15
-		$name = __('GravityView Recent Entries', 'gravityview');
15
+		$name = __( 'GravityView Recent Entries', 'gravityview' );
16 16
 
17 17
 		$widget_options = array(
18 18
 			'description' => __( 'Display the most recent entries for a View', 'gravityview' ),
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private function initialize() {
27 27
 
28
-		add_action('admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts') );
28
+		add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
29 29
 
30 30
 		add_action( 'wp_ajax_gv_get_view_merge_tag_data', array( $this, 'ajax_get_view_merge_tag_data' ) );
31 31
 
@@ -38,21 +38,21 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	function ajax_get_view_merge_tag_data() {
40 40
 
41
-		if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'gravityview_ajax_widget' ) ) {
41
+		if ( ! isset( $_POST[ 'nonce' ] ) || ! wp_verify_nonce( $_POST[ 'nonce' ], 'gravityview_ajax_widget' ) ) {
42 42
 			exit( false );
43 43
 		}
44 44
 
45
-		$form_id  = gravityview_get_form_id( $_POST['view_id'] );
45
+		$form_id = gravityview_get_form_id( $_POST[ 'view_id' ] );
46 46
 
47 47
 		$form = RGFormsModel::get_form_meta( $form_id );
48 48
 
49 49
 		$output = array(
50 50
 			'form' => array(
51
-				'id' => $form['id'],
52
-				'title' => $form['title'],
53
-				'fields' => $form['fields'],
51
+				'id' => $form[ 'id' ],
52
+				'title' => $form[ 'title' ],
53
+				'fields' => $form[ 'fields' ],
54 54
 			),
55
-			'mergeTags' => GFCommon::get_merge_tags( $form['fields'], '', false ),
55
+			'mergeTags' => GFCommon::get_merge_tags( $form[ 'fields' ], '', false ),
56 56
 		);
57 57
 
58 58
 		echo json_encode( $output );
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
 	function admin_enqueue_scripts() {
69 69
 		global $pagenow;
70 70
 
71
-		if( $pagenow === 'widgets.php' ) {
71
+		if ( $pagenow === 'widgets.php' ) {
72 72
 
73
-			$script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
73
+			$script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
74 74
 
75
-			wp_enqueue_script( 'gravityview_widgets', plugins_url('assets/js/admin-widgets'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery', 'gform_gravityforms' ), GravityView_Plugin::version );
75
+			wp_enqueue_script( 'gravityview_widgets', plugins_url( 'assets/js/admin-widgets' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery', 'gform_gravityforms' ), GravityView_Plugin::version );
76 76
 
77 77
 			wp_localize_script( 'gravityview_widgets', 'GVWidgets', array(
78 78
 				'nonce' => wp_create_nonce( 'gravityview_ajax_widget' )
79
-			));
79
+			) );
80 80
 
81
-			wp_enqueue_style( 'gravityview_views_styles', plugins_url('assets/css/admin-views.css', GRAVITYVIEW_FILE), array('dashicons' ), GravityView_Plugin::version );
81
+			wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array( 'dashicons' ), GravityView_Plugin::version );
82 82
 		}
83 83
 
84 84
 	}
@@ -93,19 +93,19 @@  discard block
 block discarded – undo
93 93
 	function widget( $args, $instance ) {
94 94
 
95 95
 		// Don't have the Customizer render too soon.
96
-		if( empty( $instance['view_id'] ) ) {
96
+		if ( empty( $instance[ 'view_id' ] ) ) {
97 97
 			return;
98 98
 		}
99 99
 
100
-		$args['id']        = ( isset( $args['id'] ) ) ? $args['id'] : 'gv_recent_entries';
101
-		$instance['title'] = ( isset( $instance['title'] ) ) ? $instance['title'] : '';
100
+		$args[ 'id' ]        = ( isset( $args[ 'id' ] ) ) ? $args[ 'id' ] : 'gv_recent_entries';
101
+		$instance[ 'title' ] = ( isset( $instance[ 'title' ] ) ) ? $instance[ 'title' ] : '';
102 102
 
103
-		$title = apply_filters( 'widget_title', $instance[ 'title' ], $instance, $args['id'] );
103
+		$title = apply_filters( 'widget_title', $instance[ 'title' ], $instance, $args[ 'id' ] );
104 104
 
105
-		echo $args['before_widget'];
105
+		echo $args[ 'before_widget' ];
106 106
 
107
-		if ( !empty( $title ) ) {
108
-			echo $args['before_title'] . $title . $args['after_title'];
107
+		if ( ! empty( $title ) ) {
108
+			echo $args[ 'before_title' ] . $title . $args[ 'after_title' ];
109 109
 		}
110 110
 
111 111
 		/**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 		 */
126 126
 		do_action( 'gravityview/widget/recent-entries/after_widget', $args, $instance );
127 127
 
128
-		echo $args['after_widget'];
128
+		echo $args[ 'after_widget' ];
129 129
 	}
130 130
 
131 131
 	/**
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	private function get_output( $instance ) {
141 141
 
142
-		$form_id = gravityview_get_form_id( $instance['view_id'] );
142
+		$form_id = gravityview_get_form_id( $instance[ 'view_id' ] );
143 143
 
144 144
 		$form = gravityview_get_form( $form_id );
145 145
 
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 		 * @since 1.6.1
150 150
 		 * @var int $entry_link_post_id The ID to use as the parent post for the entry
151 151
 		 */
152
-		$entry_link_post_id = ( empty( $instance['error_post_id'] ) && !empty( $instance['post_id'] ) ) ? $instance['post_id'] : $instance['view_id'];
152
+		$entry_link_post_id = ( empty( $instance[ 'error_post_id' ] ) && ! empty( $instance[ 'post_id' ] ) ) ? $instance[ 'post_id' ] : $instance[ 'view_id' ];
153 153
 
154 154
 		/**
155 155
 		 * Generate list output
156 156
 		 * @since 1.7.2
157 157
 		 */
158
-		$List = new GravityView_Entry_List( $entries, $entry_link_post_id, $form, $instance['link_format'], $instance['after_link'], 'recent-entries-widget' );
158
+		$List = new GravityView_Entry_List( $entries, $entry_link_post_id, $form, $instance[ 'link_format' ], $instance[ 'after_link' ], 'recent-entries-widget' );
159 159
 
160 160
 		$output = $List->get_output();
161 161
 
@@ -180,30 +180,30 @@  discard block
 block discarded – undo
180 180
 	private function get_entries( $instance, $form_id ) {
181 181
 
182 182
 		// Get the settings for the View ID
183
-		$view_settings = gravityview_get_template_settings( $instance['view_id'] );
183
+		$view_settings = gravityview_get_template_settings( $instance[ 'view_id' ] );
184 184
 
185 185
         // Set the context view ID to avoid conflicts with the Advanced Filter extension.
186
-        $criteria['context_view_id'] = $instance['view_id'];
186
+        $criteria[ 'context_view_id' ] = $instance[ 'view_id' ];
187 187
 
188
-		$instance['limit'] = isset( $instance['limit'] ) ? $instance['limit'] : 10;
189
-		$view_settings['id'] = $instance['view_id'];
190
-		$view_settings['page_size'] = $instance['limit'];
188
+		$instance[ 'limit' ] = isset( $instance[ 'limit' ] ) ? $instance[ 'limit' ] : 10;
189
+		$view_settings[ 'id' ] = $instance[ 'view_id' ];
190
+		$view_settings[ 'page_size' ] = $instance[ 'limit' ];
191 191
 
192 192
 		// Prepare paging criteria
193
-		$criteria['paging'] = array(
193
+		$criteria[ 'paging' ] = array(
194 194
 			'offset' => 0,
195
-			'page_size' => $instance['limit']
195
+			'page_size' => $instance[ 'limit' ]
196 196
 		);
197 197
 
198 198
 		// Prepare Search Criteria
199
-		$criteria['search_criteria'] = array( 'field_filters' => array() );
200
-		$criteria['search_criteria'] = GravityView_frontend::process_search_only_approved( $view_settings, $criteria['search_criteria']);
201
-		$criteria['search_criteria']['status'] = apply_filters( 'gravityview_status', 'active', $view_settings );
199
+		$criteria[ 'search_criteria' ] = array( 'field_filters' => array() );
200
+		$criteria[ 'search_criteria' ] = GravityView_frontend::process_search_only_approved( $view_settings, $criteria[ 'search_criteria' ] );
201
+		$criteria[ 'search_criteria' ][ 'status' ] = apply_filters( 'gravityview_status', 'active', $view_settings );
202 202
 
203 203
 		/**
204 204
 		 * Modify the search parameters before the entries are fetched
205 205
 		 */
206
-		$criteria = apply_filters('gravityview/widget/recent-entries/criteria', $criteria, $instance, $form_id );
206
+		$criteria = apply_filters( 'gravityview/widget/recent-entries/criteria', $criteria, $instance, $form_id );
207 207
 
208 208
 		$results = GVCommon::get_entries( $form_id, $criteria );
209 209
 
@@ -224,23 +224,23 @@  discard block
 block discarded – undo
224 224
 		$instance = $new_instance;
225 225
 
226 226
 		// Force positive number
227
-		$instance['limit'] = empty( $instance['limit'] ) ? 10 : absint( $instance['limit'] );
227
+		$instance[ 'limit' ] = empty( $instance[ 'limit' ] ) ? 10 : absint( $instance[ 'limit' ] );
228 228
 
229
-		$instance['view_id'] = intval( $instance['view_id'] );
229
+		$instance[ 'view_id' ] = intval( $instance[ 'view_id' ] );
230 230
 
231
-		$instance['link_format'] = trim( rtrim( $instance['link_format'] ) );
231
+		$instance[ 'link_format' ] = trim( rtrim( $instance[ 'link_format' ] ) );
232 232
 
233
-		$instance['link_format'] = empty( $instance['link_format'] ) ? $old_instance['link_format'] : $instance['link_format'];
233
+		$instance[ 'link_format' ] = empty( $instance[ 'link_format' ] ) ? $old_instance[ 'link_format' ] : $instance[ 'link_format' ];
234 234
 
235
-		$instance['post_id'] = empty( $instance['post_id'] ) ? '' : intval( $instance['post_id'] );
235
+		$instance[ 'post_id' ] = empty( $instance[ 'post_id' ] ) ? '' : intval( $instance[ 'post_id' ] );
236 236
 
237
-		$is_valid_embed_id = GravityView_View_Data::is_valid_embed_id( $instance['post_id'], $instance['view_id'] );
237
+		$is_valid_embed_id = GravityView_View_Data::is_valid_embed_id( $instance[ 'post_id' ], $instance[ 'view_id' ] );
238 238
 
239 239
 		//check if post_id is a valid post with embedded View
240
-		$instance['error_post_id'] = is_wp_error( $is_valid_embed_id ) ? $is_valid_embed_id->get_error_message() : NULL;
240
+		$instance[ 'error_post_id' ] = is_wp_error( $is_valid_embed_id ) ? $is_valid_embed_id->get_error_message() : NULL;
241 241
 
242 242
 		// Share that the widget isn't brand new
243
-		$instance['updated']  = 1;
243
+		$instance[ 'updated' ] = 1;
244 244
 
245 245
 		/**
246 246
 		 * Modify the updated instance. This will allow for validating any added instance settings externally.
@@ -262,22 +262,22 @@  discard block
 block discarded – undo
262 262
 
263 263
 		// Set up some default widget settings.
264 264
 		$defaults = array(
265
-			'title' 			=> __('Recent Entries', 'gravityview'),
265
+			'title' 			=> __( 'Recent Entries', 'gravityview' ),
266 266
 			'view_id'           => NULL,
267 267
 			'post_id'           => NULL,
268 268
 			'limit'            => 10,
269
-			'link_format'       => __('Entry #{entry_id}', 'gravityview'),
269
+			'link_format'       => __( 'Entry #{entry_id}', 'gravityview' ),
270 270
 			'after_link'        => ''
271 271
 		);
272 272
 
273
-		$instance = wp_parse_args( (array) $instance, $defaults );
273
+		$instance = wp_parse_args( (array)$instance, $defaults );
274 274
 
275 275
 		?>
276 276
 
277 277
 		<!-- Title -->
278 278
 		<p>
279 279
 			<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'gravityview' ) ?></label>
280
-			<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
280
+			<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance[ 'title' ] ); ?>" />
281 281
 		</p>
282 282
 
283 283
 		<!-- Download -->
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 		$views = get_posts( $args );
291 291
 
292 292
 		// If there are no views set up yet, we get outta here.
293
-		if( empty( $views ) ) {
293
+		if ( empty( $views ) ) {
294 294
 			echo '<div id="select_gravityview_view"><div class="wrap">' . GravityView_Admin::no_views_text() . '</div></div>';
295 295
 			return;
296 296
 		}
@@ -302,10 +302,10 @@  discard block
 block discarded – undo
302 302
 		 * Display errors generated for invalid embed IDs
303 303
 		 * @see GravityView_View_Data::is_valid_embed_id
304 304
 		 */
305
-		if( isset( $instance['updated'] ) && empty( $instance['view_id'] ) ) {
305
+		if ( isset( $instance[ 'updated' ] ) && empty( $instance[ 'view_id' ] ) ) {
306 306
 			?>
307 307
 			<div class="error inline hide-on-view-change">
308
-				<p><?php esc_html_e('Please select a View to search.', 'gravityview'); ?></p>
308
+				<p><?php esc_html_e( 'Please select a View to search.', 'gravityview' ); ?></p>
309 309
 			</div>
310 310
 			<?php
311 311
 			unset ( $error );
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
 		?>
314 314
 
315 315
 		<p>
316
-			<label for="<?php echo esc_attr( $this->get_field_id( 'view_id' ) ); ?>"><?php esc_html_e('Select a View', 'gravityview'); ?></label>
316
+			<label for="<?php echo esc_attr( $this->get_field_id( 'view_id' ) ); ?>"><?php esc_html_e( 'Select a View', 'gravityview' ); ?></label>
317 317
 			<select class="widefat gv-recent-entries-select-view" name="<?php echo esc_attr( $this->get_field_name( 'view_id' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'view_id' ) ); ?>">
318 318
 				<option value=""><?php esc_html_e( '&mdash; Select a View as Entries Source &mdash;', 'gravityview' ); ?></option>
319 319
 				<?php
320 320
 
321
-				foreach( $views as $view ) {
322
-					$title = empty( $view->post_title ) ? __('(no title)', 'gravityview') : $view->post_title;
323
-					echo '<option value="'. $view->ID .'"'.selected( absint( $instance['view_id'] ), $view->ID ).'>'. esc_html( sprintf('%s #%d', $title, $view->ID ) ) .'</option>';
321
+				foreach ( $views as $view ) {
322
+					$title = empty( $view->post_title ) ? __( '(no title)', 'gravityview' ) : $view->post_title;
323
+					echo '<option value="' . $view->ID . '"' . selected( absint( $instance[ 'view_id' ] ), $view->ID ) . '>' . esc_html( sprintf( '%s #%d', $title, $view->ID ) ) . '</option>';
324 324
 				}
325 325
 
326 326
 				?>
@@ -332,10 +332,10 @@  discard block
 block discarded – undo
332 332
 		 * Display errors generated for invalid embed IDs
333 333
 		 * @see GravityView_View_Data::is_valid_embed_id
334 334
 		 */
335
-		if( !empty( $instance['error_post_id'] ) ) {
335
+		if ( ! empty( $instance[ 'error_post_id' ] ) ) {
336 336
 			?>
337 337
 			<div class="error inline">
338
-				<p><?php echo $instance['error_post_id']; ?></p>
338
+				<p><?php echo $instance[ 'error_post_id' ]; ?></p>
339 339
 			</div>
340 340
 			<?php
341 341
 			unset ( $error );
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
 		?>
344 344
 
345 345
 		<p>
346
-			<label for="<?php echo $this->get_field_id('post_id'); ?>"><?php esc_html_e( 'If Embedded, Page ID:', 'gravityview' ); ?></label>
347
-			<input class="code" size="3" id="<?php echo $this->get_field_id('post_id'); ?>" name="<?php echo $this->get_field_name('post_id'); ?>" type="text" value="<?php echo esc_attr( $instance['post_id'] ); ?>" />
346
+			<label for="<?php echo $this->get_field_id( 'post_id' ); ?>"><?php esc_html_e( 'If Embedded, Page ID:', 'gravityview' ); ?></label>
347
+			<input class="code" size="3" id="<?php echo $this->get_field_id( 'post_id' ); ?>" name="<?php echo $this->get_field_name( 'post_id' ); ?>" type="text" value="<?php echo esc_attr( $instance[ 'post_id' ] ); ?>" />
348 348
 			<span class="howto"><?php
349
-				esc_html_e('To have a search performed on an embedded View, enter the ID of the post or page where the View is embedded.', 'gravityview' );
350
-				echo ' '.gravityview_get_link('http://docs.gravityview.co/article/222-the-search-widget', __('Learn more&hellip;', 'gravityview' ), 'target=_blank' );
349
+				esc_html_e( 'To have a search performed on an embedded View, enter the ID of the post or page where the View is embedded.', 'gravityview' );
350
+				echo ' ' . gravityview_get_link( 'http://docs.gravityview.co/article/222-the-search-widget', __( 'Learn more&hellip;', 'gravityview' ), 'target=_blank' );
351 351
 				?></span>
352 352
 		</p>
353 353
 
@@ -355,21 +355,21 @@  discard block
 block discarded – undo
355 355
 			<label for="<?php echo $this->get_field_id( 'limit' ); ?>">
356 356
 				<span><?php _e( 'Number of entries to show:', 'gravityview' ); ?></span>
357 357
 			</label>
358
-			<input class="code" id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="number" value="<?php echo intval( $instance['limit'] ); ?>" size="3" />
358
+			<input class="code" id="<?php echo $this->get_field_id( 'limit' ); ?>" name="<?php echo $this->get_field_name( 'limit' ); ?>" type="number" value="<?php echo intval( $instance[ 'limit' ] ); ?>" size="3" />
359 359
 		</p>
360 360
 
361 361
 		<p>
362 362
 			<label for="<?php echo $this->get_field_id( 'link_format' ); ?>">
363 363
 				<span><?php _e( 'Entry link text (required)', 'gravityview' ); ?></span>
364 364
 			</label>
365
-			<input id="<?php echo $this->get_field_id( 'link_format' ); ?>" name="<?php echo $this->get_field_name( 'link_format' ); ?>" type="text" value="<?php echo esc_attr( $instance['link_format'] ); ?>" class="widefat merge-tag-support mt-position-right mt-hide_all_fields" />
365
+			<input id="<?php echo $this->get_field_id( 'link_format' ); ?>" name="<?php echo $this->get_field_name( 'link_format' ); ?>" type="text" value="<?php echo esc_attr( $instance[ 'link_format' ] ); ?>" class="widefat merge-tag-support mt-position-right mt-hide_all_fields" />
366 366
 		</p>
367 367
 
368 368
 		<p>
369 369
 			<label for="<?php echo $this->get_field_id( 'after_link' ); ?>">
370 370
 				<span><?php _e( 'Text or HTML to display after the link (optional)', 'gravityview' ); ?></span>
371 371
 			</label>
372
-			<textarea id="<?php echo $this->get_field_id( 'after_link' ); ?>" name="<?php echo $this->get_field_name( 'after_link' ); ?>" rows="5" class="widefat code merge-tag-support mt-position-right mt-hide_all_fields"><?php echo esc_textarea( $instance['after_link'] ); ?></textarea>
372
+			<textarea id="<?php echo $this->get_field_id( 'after_link' ); ?>" name="<?php echo $this->get_field_name( 'after_link' ); ?>" rows="5" class="widefat code merge-tag-support mt-position-right mt-hide_all_fields"><?php echo esc_textarea( $instance[ 'after_link' ] ); ?></textarea>
373 373
 		</p>
374 374
 
375 375
 		<?php
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 		 * @param GravityView_Recent_Entries_Widget $this WP_Widget object
380 380
 		 * @param array $instance Current widget instance
381 381
 		 */
382
-		do_action( 'gravityview_recent_entries_widget_form' , $this, $instance );
382
+		do_action( 'gravityview_recent_entries_widget_form', $this, $instance );
383 383
 
384 384
 		?>
385 385
 
Please login to merge, or discard this patch.
includes/class-admin.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 
5 5
 	function __construct() {
6 6
 
7
-		if( ! is_admin() ) { return; }
7
+		if ( ! is_admin() ) { return; }
8 8
 
9 9
 		// If Gravity Forms isn't active or compatibile, stop loading
10
-		if( false === GravityView_Compatibility::is_valid() ) {
10
+		if ( false === GravityView_Compatibility::is_valid() ) {
11 11
 			return;
12 12
 		}
13 13
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
49 49
 		add_filter( 'bulk_post_updated_messages', array( $this, 'post_updated_messages' ) );
50 50
 
51
-		add_filter( 'plugin_action_links_'. plugin_basename( GRAVITYVIEW_FILE ) , array( $this, 'plugin_action_links' ) );
51
+		add_filter( 'plugin_action_links_' . plugin_basename( GRAVITYVIEW_FILE ), array( $this, 'plugin_action_links' ) );
52 52
 
53 53
 		add_action( 'plugins_loaded', array( $this, 'backend_actions' ), 100 );
54 54
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public static function no_views_text() {
65 65
 		
66
-		if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) {
66
+		if ( isset( $_REQUEST[ 'post_status' ] ) && 'trash' === $_REQUEST[ 'post_status' ] ) {
67 67
 			return __( 'No Views found in Trash', 'gravityview' );
68
-		} elseif( ! empty( $_GET['s'] ) ) {
68
+		} elseif ( ! empty( $_GET[ 's' ] ) ) {
69 69
 			return __( 'No Views found.', 'gravityview' );
70 70
 		}
71 71
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			$error .= ' ' . esc_html__( 'or select another form.', 'gravityview' );
110 110
 		}
111 111
 
112
-		if( $error ) {
112
+		if ( $error ) {
113 113
 			?>
114 114
 			<div class="wp-dialog notice-warning inline error wp-clearfix">
115 115
 				<?php echo gravityview_get_floaty(); ?>
@@ -128,22 +128,22 @@  discard block
 block discarded – undo
128 128
 	public function backend_actions() {
129 129
 
130 130
 		/** @define "GRAVITYVIEW_DIR" "../" */
131
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class.field.type.php' );
132
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class.render.settings.php' );
133
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-item.php' );
134
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-field.php' );
135
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-widget.php' );
136
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-views.php' );
137
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-welcome.php' );
138
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-add-shortcode.php' );
139
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-approve-entries.php' );
131
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class.field.type.php' );
132
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class.render.settings.php' );
133
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-item.php' );
134
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-field.php' );
135
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-widget.php' );
136
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-views.php' );
137
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-welcome.php' );
138
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-add-shortcode.php' );
139
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-approve-entries.php' );
140 140
 
141 141
 		/**
142 142
 		 * @action `gravityview_include_backend_actions` Triggered after all GravityView admin files are loaded
143 143
 		 *
144 144
 		 * Nice place to insert extensions' backend stuff
145 145
 		 */
146
-		do_action('gravityview_include_backend_actions');
146
+		do_action( 'gravityview_include_backend_actions' );
147 147
 	}
148 148
 
149 149
 	/**
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
 
160 160
 		$actions = array();
161 161
 
162
-		if( GVCommon::has_cap( 'gravityview_view_settings' ) ) {
163
-			$actions[] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) );
162
+		if ( GVCommon::has_cap( 'gravityview_view_settings' ) ) {
163
+			$actions[ ] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) );
164 164
 		}
165 165
 
166
-		if( GVCommon::has_cap( 'gravityview_support_port' ) ) {
167
-			$actions[] = '<a href="http://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>';
166
+		if ( GVCommon::has_cap( 'gravityview_support_port' ) ) {
167
+			$actions[ ] = '<a href="http://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>';
168 168
 		}
169 169
 
170 170
 		return array_merge( $actions, $links );
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		// By default, there will only be one item being modified.
193 193
 		// When in the `bulk_post_updated_messages` filter, there will be passed a number
194 194
 		// of modified items that will override this array.
195
-		$bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1 , 'locked' => 1 , 'deleted' => 1 , 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts;
195
+		$bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1, 'locked' => 1, 'deleted' => 1, 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts;
196 196
 
197 197
 		// If we're starting fresh, a new form was created.
198 198
 		// We should let the user know this is the case.
@@ -200,60 +200,60 @@  discard block
 block discarded – undo
200 200
 
201 201
 		$new_form_text = '';
202 202
 
203
-		if( !empty( $start_fresh ) ) {
203
+		if ( ! empty( $start_fresh ) ) {
204 204
 
205 205
 			// Get the form that was created
206 206
 			$connected_form = gravityview_get_form_id( $post_id );
207 207
 
208
-			if( !empty( $connected_form ) ) {
208
+			if ( ! empty( $connected_form ) ) {
209 209
 				$form = gravityview_get_form( $connected_form );
210
-				$form_name = esc_attr( $form['title'] );
210
+				$form_name = esc_attr( $form[ 'title' ] );
211 211
 				$image = self::get_floaty();
212
-				$new_form_text .= '<h3>'.$image.sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ).'</h3>';
213
-				$new_form_text .=  sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s
212
+				$new_form_text .= '<h3>' . $image . sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ) . '</h3>';
213
+				$new_form_text .= sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s
214 214
 
215 215
 					You can %sedit the form%s in Gravity Forms and the updated fields will be available here. Don&rsquo;t forget to %scustomize the form settings%s.
216
-					', 'gravityview' ), '<strong>', '</strong>', '<a href="'.site_url( '?gf_page=preview&amp;id='.$connected_form ).'">', '</a>', '<code>[gravityform id="'.$connected_form.'" name="'.$form_name.'"]</code>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&amp;id='.$connected_form ).'">', '</a>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&amp;view=settings&amp;id='.$connected_form ).'">', '</a>');
216
+					', 'gravityview' ), '<strong>', '</strong>', '<a href="' . site_url( '?gf_page=preview&amp;id=' . $connected_form ) . '">', '</a>', '<code>[gravityform id="' . $connected_form . '" name="' . $form_name . '"]</code>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&amp;id=' . $connected_form ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&amp;view=settings&amp;id=' . $connected_form ) . '">', '</a>' );
217 217
 				$new_form_text = wpautop( $new_form_text );
218 218
 
219 219
 				delete_post_meta( $post_id, '_gravityview_start_fresh' );
220 220
 			}
221 221
 		}
222 222
 
223
-		$messages['gravityview'] = array(
223
+		$messages[ 'gravityview' ] = array(
224 224
 			0  => '', // Unused. Messages start at index 1.
225 225
 			/* translators: %s and %s are HTML tags linking to the View on the website */
226
-			1  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
226
+			1  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
227 227
 			/* translators: %s and %s are HTML tags linking to the View on the website */
228
-			2  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
228
+			2  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
229 229
 			3  => __( 'View deleted.', 'gravityview' ),
230 230
 			/* translators: %s and %s are HTML tags linking to the View on the website */
231
-			4  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
231
+			4  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
232 232
 			/* translators: %s: date and time of the revision */
233
-			5  => isset( $_GET['revision'] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
233
+			5  => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int)$_GET[ 'revision' ], false ) ) : false,
234 234
 			/* translators: %s and %s are HTML tags linking to the View on the website */
235
-			6  => sprintf(__( 'View published. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
235
+			6  => sprintf( __( 'View published. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
236 236
 			/* translators: %s and %s are HTML tags linking to the View on the website */
237
-			7  => sprintf(__( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
237
+			7  => sprintf( __( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
238 238
 			8  => __( 'View submitted.', 'gravityview' ),
239 239
 			9  => sprintf(
240 240
 		        /* translators: Date and time the View is scheduled to be published */
241 241
 				__( 'View scheduled for: %1$s.', 'gravityview' ),
242 242
 				// translators: Publish box date format, see http://php.net/date
243
-				date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL )  ) )
243
+				date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL ) ) )
244 244
 			) . $new_form_text,
245 245
 			/* translators: %s and %s are HTML tags linking to the View on the website */
246
-			10  => sprintf(__( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
246
+			10  => sprintf( __( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
247 247
 
248 248
 			/**
249 249
 			 * These apply to `bulk_post_updated_messages`
250 250
 			 * @file wp-admin/edit.php
251 251
 			 */
252
-			'updated'   => _n( '%s View updated.', '%s Views updated.', $bulk_counts['updated'], 'gravityview' ),
253
-			'locked'    => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts['locked'], 'gravityview' ),
254
-			'deleted'   => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts['deleted'], 'gravityview' ),
255
-			'trashed'   => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts['trashed'], 'gravityview' ),
256
-			'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts['untrashed'], 'gravityview' ),
252
+			'updated'   => _n( '%s View updated.', '%s Views updated.', $bulk_counts[ 'updated' ], 'gravityview' ),
253
+			'locked'    => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts[ 'locked' ], 'gravityview' ),
254
+			'deleted'   => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts[ 'deleted' ], 'gravityview' ),
255
+			'trashed'   => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts[ 'trashed' ], 'gravityview' ),
256
+			'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts[ 'untrashed' ], 'gravityview' ),
257 257
 		);
258 258
 
259 259
 		return $messages;
@@ -313,29 +313,29 @@  discard block
 block discarded – undo
313 313
 	static function is_admin_page( $hook = '', $page = NULL ) {
314 314
 		global $current_screen, $plugin_page, $pagenow, $post;
315 315
 
316
-		if( ! is_admin() ) { return false; }
316
+		if ( ! is_admin() ) { return false; }
317 317
 
318 318
 		$is_page = false;
319 319
 
320
-		$is_gv_screen = (!empty($current_screen) && isset($current_screen->post_type) && $current_screen->post_type === 'gravityview');
320
+		$is_gv_screen = ( ! empty( $current_screen ) && isset( $current_screen->post_type ) && $current_screen->post_type === 'gravityview' );
321 321
 
322
-		$is_gv_post_type_get = (isset($_GET['post_type']) && $_GET['post_type'] === 'gravityview');
322
+		$is_gv_post_type_get = ( isset( $_GET[ 'post_type' ] ) && $_GET[ 'post_type' ] === 'gravityview' );
323 323
 
324
-		$is_gv_settings_get = isset( $_GET['page'] ) && $_GET['page'] === 'gravityview_settings';
324
+		$is_gv_settings_get = isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'gravityview_settings';
325 325
 
326
-		if( empty( $post ) && $pagenow === 'post.php' && !empty( $_GET['post'] ) ) {
327
-			$gv_post = get_post( intval( $_GET['post'] ) );
328
-			$is_gv_post_type = (!empty($gv_post) && !empty($gv_post->post_type) && $gv_post->post_type === 'gravityview');
326
+		if ( empty( $post ) && $pagenow === 'post.php' && ! empty( $_GET[ 'post' ] ) ) {
327
+			$gv_post = get_post( intval( $_GET[ 'post' ] ) );
328
+			$is_gv_post_type = ( ! empty( $gv_post ) && ! empty( $gv_post->post_type ) && $gv_post->post_type === 'gravityview' );
329 329
 		} else {
330
-			$is_gv_post_type = (!empty($post) && !empty($post->post_type) && $post->post_type === 'gravityview');
330
+			$is_gv_post_type = ( ! empty( $post ) && ! empty( $post->post_type ) && $post->post_type === 'gravityview' );
331 331
 		}
332 332
 
333
-		if( $is_gv_screen || $is_gv_post_type || $is_gv_post_type || $is_gv_post_type_get || $is_gv_settings_get ) {
333
+		if ( $is_gv_screen || $is_gv_post_type || $is_gv_post_type || $is_gv_post_type_get || $is_gv_settings_get ) {
334 334
 
335 335
 			// $_GET `post_type` variable
336
-			if(in_array($pagenow, array( 'post.php' , 'post-new.php' )) ) {
336
+			if ( in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) ) {
337 337
 				$is_page = 'single';
338
-			} else if ( in_array( $plugin_page, array( 'gravityview_settings', 'gravityview_page_gravityview_settings' ) ) || ( !empty( $_GET['page'] ) && $_GET['page'] === 'gravityview_settings' ) ) {
338
+			} else if ( in_array( $plugin_page, array( 'gravityview_settings', 'gravityview_page_gravityview_settings' ) ) || ( ! empty( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'gravityview_settings' ) ) {
339 339
 				$is_page = 'settings';
340 340
 			} else {
341 341
 				$is_page = 'views';
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 		$is_page = apply_filters( 'gravityview_is_admin_page', $is_page, $hook );
351 351
 
352 352
 		// If the current page is the same as the compared page
353
-		if( !empty( $page ) ) {
353
+		if ( ! empty( $page ) ) {
354 354
 			return $is_page === $page;
355 355
 		}
356 356
 
@@ -371,6 +371,6 @@  discard block
 block discarded – undo
371 371
  *
372 372
  * @return bool|string If `false`, not a GravityView page. `true` if $page is passed and is the same as current page. Otherwise, the name of the page (`single`, `settings`, or `views`)
373 373
  */
374
-function gravityview_is_admin_page($hook = '', $page = NULL) {
374
+function gravityview_is_admin_page( $hook = '', $page = NULL ) {
375 375
 	return GravityView_Admin::is_admin_page( $hook, $page );
376 376
 }
Please login to merge, or discard this patch.
includes/class-gravityview-roles-capabilities.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 */
34 34
 	public static function get_instance() {
35 35
 
36
-		if( ! self::$instance ) {
36
+		if ( ! self::$instance ) {
37 37
 			self::$instance = new self;
38 38
 		}
39 39
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		add_filter( 'members_get_capabilities', array( 'GravityView_Roles_Capabilities', 'merge_with_all_caps' ) );
57 57
 		add_action( 'members_register_cap_groups', array( $this, 'members_register_cap_group' ), 20 );
58 58
 		add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 10, 4 );
59
-        add_action( 'admin_init', array( $this, 'add_caps') );
59
+        add_action( 'admin_init', array( $this, 'add_caps' ) );
60 60
 	}
61 61
 
62 62
 
@@ -77,18 +77,18 @@  discard block
 block discarded – undo
77 77
 	public function filter_user_has_cap( $usercaps = array(), $caps = array(), $args = array(), $user = NULL ) {
78 78
 
79 79
 		// Empty caps_to_check array
80
-		if( ! $usercaps || ! $caps ) {
80
+		if ( ! $usercaps || ! $caps ) {
81 81
 			return $usercaps;
82 82
 		}
83 83
 
84 84
 		/**
85 85
 		 * Enable all GravityView caps_to_check if `gravityview_full_access` is enabled
86 86
 		 */
87
-		if( ! empty( $usercaps['gravityview_full_access'] ) ) {
87
+		if ( ! empty( $usercaps[ 'gravityview_full_access' ] ) ) {
88 88
 
89 89
 			$all_gravityview_caps = self::all_caps();
90 90
 
91
-			foreach( $all_gravityview_caps as $gv_cap ) {
91
+			foreach ( $all_gravityview_caps as $gv_cap ) {
92 92
 				$usercaps[ $gv_cap ] = true;
93 93
 			}
94 94
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 		$all = $administrator;
307 307
 
308 308
 		// If role is set, return caps_to_check for just that role.
309
-		if( $single_role ) {
309
+		if ( $single_role ) {
310 310
 			$caps = isset( ${$single_role} ) ? ${$single_role} : false;
311 311
 			return $flat_array ? $caps : array( $single_role => $caps );
312 312
 		}
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
 		$caps_to_check = self::maybe_add_full_access_caps( $caps_to_check );
365 365
 
366 366
 		foreach ( $caps_to_check as $cap ) {
367
-			if( ! is_null( $object_id ) ) {
367
+			if ( ! is_null( $object_id ) ) {
368 368
 				$has_cap = $user_id ? user_can( $user_id, $cap, $object_id ) : current_user_can( $cap, $object_id );
369 369
 			} else {
370 370
 				$has_cap = $user_id ? user_can( $user_id, $cap ) : current_user_can( $cap );
371 371
 			}
372 372
 			// At the first successful response, stop checking
373
-			if( $has_cap ) {
373
+			if ( $has_cap ) {
374 374
 				break;
375 375
 			}
376 376
 		}
@@ -394,15 +394,15 @@  discard block
 block discarded – undo
394 394
 		$all_gravityview_caps = self::all_caps();
395 395
 
396 396
 		// Are there any $caps_to_check that are from GravityView?
397
-		if( $has_gravityview_caps = array_intersect( $caps_to_check, $all_gravityview_caps ) ) {
398
-			$caps_to_check[] = 'gravityview_full_access';
397
+		if ( $has_gravityview_caps = array_intersect( $caps_to_check, $all_gravityview_caps ) ) {
398
+			$caps_to_check[ ] = 'gravityview_full_access';
399 399
 		}
400 400
 
401 401
 		$all_gravity_forms_caps = class_exists( 'GFCommon' ) ? GFCommon::all_caps() : array();
402 402
 
403 403
 		// Are there any $caps_to_check that are from Gravity Forms?
404
-		if( $all_gravity_forms_caps = array_intersect( $caps_to_check, $all_gravity_forms_caps ) ) {
405
-			$caps_to_check[] = 'gform_full_access';
404
+		if ( $all_gravity_forms_caps = array_intersect( $caps_to_check, $all_gravity_forms_caps ) ) {
405
+			$caps_to_check[ ] = 'gform_full_access';
406 406
 		}
407 407
 
408 408
 		return array_unique( $caps_to_check );
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 			$capabilities = self::all_caps();
425 425
 
426 426
 			// Loop through each role and remove GV caps_to_check
427
-			foreach( $wp_roles->get_names() as $role_slug => $role_name ) {
427
+			foreach ( $wp_roles->get_names() as $role_slug => $role_name ) {
428 428
 				foreach ( $capabilities as $cap ) {
429 429
 					$wp_roles->remove_cap( $role_slug, $cap );
430 430
 				}
Please login to merge, or discard this patch.
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.