Completed
Pull Request — master (#605)
by Zack
05:22
created
includes/admin/field-types/type_hidden.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 			return;
16 16
 		}
17 17
 
18
-        $class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
18
+		$class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
19 19
 
20 20
 		?>
21 21
 		<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="hidden" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>" />
Please login to merge, or discard this patch.
includes/admin/field-types/type_text.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
 
29 29
 		$show_mt = $this->show_merge_tags();
30 30
 
31
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
-            $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
33
-        }
34
-        $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
31
+		if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
+			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
33
+		}
34
+		$class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
35 35
 
36 36
 		?>
37 37
 		<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>">
Please login to merge, or discard this patch.
includes/admin/field-types/type_textarea.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
 
29 29
 		$show_mt = $this->show_merge_tags();
30 30
 
31
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
-            $class = ' merge-tag-support mt-position-right ';
33
-
34
-            if( empty( $this->field['show_all_fields'] ) ) {
35
-            	$class .= ' mt-hide_all_fields';
36
-            }
37
-        }
38
-        $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat';
31
+		if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
+			$class = ' merge-tag-support mt-position-right ';
33
+
34
+			if( empty( $this->field['show_all_fields'] ) ) {
35
+				$class .= ' mt-hide_all_fields';
36
+			}
37
+		}
38
+		$class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat';
39 39
 
40 40
 		?>
41 41
 		<textarea name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr( $class ); ?>" rows="5"><?php echo esc_textarea(  $this->value ); ?></textarea>
Please login to merge, or discard this patch.
includes/admin/metaboxes/class-gravityview-admin-metaboxes.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 		if( !GravityView_Compatibility::is_valid() ) { return; }
16 16
 
17
-        self::$metaboxes_dir = GRAVITYVIEW_DIR . 'includes/admin/metaboxes/';
17
+		self::$metaboxes_dir = GRAVITYVIEW_DIR . 'includes/admin/metaboxes/';
18 18
 
19 19
 		include_once self::$metaboxes_dir . 'class-gravityview-metabox-tab.php';
20 20
 
@@ -228,13 +228,13 @@  discard block
 block discarded – undo
228 228
 		$get_id_backup = isset($_GET['id']) ? $_GET['id'] : NULL;
229 229
 
230 230
 		if( isset( $form['id'] ) ) {
231
-		    $form_script = 'var form = ' . GFCommon::json_encode($form) . ';';
231
+			$form_script = 'var form = ' . GFCommon::json_encode($form) . ';';
232 232
 
233
-		    // The `gf_vars()` method needs a $_GET[id] variable set with the form ID.
234
-		    $_GET['id'] = $form['id'];
233
+			// The `gf_vars()` method needs a $_GET[id] variable set with the form ID.
234
+			$_GET['id'] = $form['id'];
235 235
 
236 236
 		} else {
237
-		    $form_script = 'var form = new Form();';
237
+			$form_script = 'var form = new Form();';
238 238
 		}
239 239
 
240 240
 		$output = '<script type="text/javascript" data-gv-merge-tags="1">' . $form_script . "\n" . GFCommon::gf_vars(false) . '</script>';
Please login to merge, or discard this patch.
includes/admin/metaboxes/views/gravityview-navigation.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display the tab navigation for the Settings metabox
4
- *
5
- * @package GravityView
6
- * @subpackage Gravityview/admin/metaboxes/views
7
- * @since 1.8
8
- *
9
- * @global GravityView_Metabox_Tab[] $metaboxes
10
- * @global WP_Post $post
11
- */
3
+	 * Display the tab navigation for the Settings metabox
4
+	 *
5
+	 * @package GravityView
6
+	 * @subpackage Gravityview/admin/metaboxes/views
7
+	 * @since 1.8
8
+	 *
9
+	 * @global GravityView_Metabox_Tab[] $metaboxes
10
+	 * @global WP_Post $post
11
+	 */
12 12
 
13 13
 ?>
14 14
 <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
Please login to merge, or discard this patch.
includes/admin/metaboxes/views/select-template.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file select-template.php
4
- * @package GravityView
5
- * @subpackage Gravityview/admin/metaboxes/partials
6
- * @global WP_Post $post
7
- */
3
+	 * @file select-template.php
4
+	 * @package GravityView
5
+	 * @subpackage Gravityview/admin/metaboxes/partials
6
+	 * @global WP_Post $post
7
+	 */
8 8
 
9 9
 global $post;
10 10
 
Please login to merge, or discard this patch.
includes/admin/metaboxes/views/view-settings.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @package GravityView
4
- * @subpackage Gravityview/admin/metaboxes/views
5
- * @global $post
6
- */
3
+				 * @package GravityView
4
+				 * @subpackage Gravityview/admin/metaboxes/views
5
+				 * @global $post
6
+				 */
7 7
 global $post;
8 8
 
9 9
 $curr_form = gravityview_get_form_id( $post->ID );
Please login to merge, or discard this patch.
includes/class-admin-views.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * Start using GravityView_Render_Settings::render_setting_row
111 111
 	 */
112 112
 	public static function render_setting_row( $key = '', $current_settings = array(), $override_input = null, $name = 'template_settings[%s]', $id = 'gravityview_se_%s' ) {
113
-        _deprecated_function( 'GravityView_Admin_Views::render_setting_row', '1.1.7', 'GravityView_Render_Settings::render_setting_row' );
113
+		_deprecated_function( 'GravityView_Admin_Views::render_setting_row', '1.1.7', 'GravityView_Render_Settings::render_setting_row' );
114 114
 		GravityView_Render_Settings::render_setting_row( $key, $current_settings, $override_input, $name , $id );
115 115
 	}
116 116
 
@@ -688,22 +688,22 @@  discard block
 block discarded – undo
688 688
 				/**
689 689
 				 * @since 1.7.2
690 690
 				 */
691
-			    'other_entries' => array(
692
-				    'label'	=> __('Other Entries', 'gravityview'),
693
-				    'type'	=> 'other_entries',
694
-				    'desc'	=> __('Display other entries created by the entry creator.', 'gravityview'),
695
-			    ),
696
-	        );
691
+				'other_entries' => array(
692
+					'label'	=> __('Other Entries', 'gravityview'),
693
+					'type'	=> 'other_entries',
694
+					'desc'	=> __('Display other entries created by the entry creator.', 'gravityview'),
695
+				),
696
+			);
697 697
 
698 698
 
699 699
 			if( 'single' !== $zone) {
700 700
 
701
-	        	$entry_default_fields['entry_link'] = array(
702
-	        		'label' => __('Link to Entry', 'gravityview'),
703
-	        		'desc'	=> __('A dedicated link to the single entry with customizable text.', 'gravityview'),
704
-	        		'type' => 'entry_link',
705
-	        	);
706
-	        }
701
+				$entry_default_fields['entry_link'] = array(
702
+					'label' => __('Link to Entry', 'gravityview'),
703
+					'desc'	=> __('A dedicated link to the single entry with customizable text.', 'gravityview'),
704
+					'type' => 'entry_link',
705
+				);
706
+			}
707 707
 
708 708
 		} // if not zone directory or single
709 709
 
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 		 * @param  string|array $form form_ID or form object
715 715
 		 * @param  string $zone   Either 'single', 'directory', 'header', 'footer'
716 716
 		 */
717
-        return apply_filters( 'gravityview_entry_default_fields', $entry_default_fields, $form, $zone);
717
+		return apply_filters( 'gravityview_entry_default_fields', $entry_default_fields, $form, $zone);
718 718
 	}
719 719
 
720 720
 	/**
@@ -1028,15 +1028,15 @@  discard block
 block discarded – undo
1028 1028
 		GFForms::register_scripts();
1029 1029
 
1030 1030
 		$scripts = array(
1031
-		    'sack',
1032
-		    'gform_gravityforms',
1033
-		    'gform_forms',
1034
-		    'gform_form_admin',
1035
-		    'jquery-ui-autocomplete'
1031
+			'sack',
1032
+			'gform_gravityforms',
1033
+			'gform_forms',
1034
+			'gform_form_admin',
1035
+			'jquery-ui-autocomplete'
1036 1036
 		);
1037 1037
 
1038 1038
 		if ( wp_is_mobile() )
1039
-		    $scripts[] = 'jquery-touch-punch';
1039
+			$scripts[] = 'jquery-touch-punch';
1040 1040
 
1041 1041
 		foreach ($scripts as $script) {
1042 1042
 			wp_enqueue_script( $script );
Please login to merge, or discard this patch.
includes/class-admin.php 1 patch
Indentation   +59 added lines, -60 removed lines patch added patch discarded remove patch
@@ -215,39 +215,39 @@  discard block
 block discarded – undo
215 215
 		}
216 216
 
217 217
 		$wp_allowed_scripts = array(
218
-            'common',
219
-            'admin-bar',
220
-            'autosave',
221
-            'post',
218
+			'common',
219
+			'admin-bar',
220
+			'autosave',
221
+			'post',
222 222
 			'inline-edit-post',
223
-            'utils',
224
-            'svg-painter',
225
-            'wp-auth-check',
226
-            'heartbeat',
223
+			'utils',
224
+			'svg-painter',
225
+			'wp-auth-check',
226
+			'heartbeat',
227 227
 			'media-editor',
228 228
 			'media-upload',
229
-            'thickbox',
229
+			'thickbox',
230 230
 			'wp-color-picker',
231 231
 
232
-            // Settings
232
+			// Settings
233 233
 			'gv-admin-edd-license',
234 234
 
235
-            // Common
236
-            'select2-js',
237
-            'qtip-js',
235
+			// Common
236
+			'select2-js',
237
+			'qtip-js',
238 238
 
239
-            // jQuery
239
+			// jQuery
240 240
 			'jquery',
241
-            'jquery-ui-core',
242
-            'jquery-ui-sortable',
243
-            'jquery-ui-datepicker',
244
-            'jquery-ui-dialog',
245
-            'jquery-ui-slider',
241
+			'jquery-ui-core',
242
+			'jquery-ui-sortable',
243
+			'jquery-ui-datepicker',
244
+			'jquery-ui-dialog',
245
+			'jquery-ui-slider',
246 246
 			'jquery-ui-dialog',
247 247
 			'jquery-ui-tabs',
248 248
 			'jquery-ui-draggable',
249 249
 			'jquery-ui-droppable',
250
-            'jquery-ui-accordion',
250
+			'jquery-ui-accordion',
251 251
 		);
252 252
 
253 253
 		$this->remove_conflicts( $wp_scripts, $wp_allowed_scripts, 'scripts' );
@@ -281,23 +281,23 @@  discard block
 block discarded – undo
281 281
 			return;
282 282
 		}
283 283
 
284
-        $wp_allowed_styles = array(
285
-	        'admin-bar',
286
-        	'colors',
287
-	        'ie',
288
-	        'wp-auth-check',
289
-	        'media-views',
284
+		$wp_allowed_styles = array(
285
+			'admin-bar',
286
+			'colors',
287
+			'ie',
288
+			'wp-auth-check',
289
+			'media-views',
290 290
 			'thickbox',
291 291
 			'dashicons',
292
-	        'wp-jquery-ui-dialog',
293
-	        'jquery-ui-sortable',
292
+			'wp-jquery-ui-dialog',
293
+			'jquery-ui-sortable',
294 294
 
295
-            // Settings
296
-	        'gravityview_settings',
295
+			// Settings
296
+			'gravityview_settings',
297 297
 
298
-	        // @todo qTip styles not loading for some reason!
299
-	        'jquery-qtip.js',
300
-	    );
298
+			// @todo qTip styles not loading for some reason!
299
+			'jquery-qtip.js',
300
+		);
301 301
 
302 302
 		$this->remove_conflicts( $wp_styles, $wp_allowed_styles, 'styles' );
303 303
 
@@ -317,32 +317,32 @@  discard block
 block discarded – undo
317 317
 	 */
318 318
 	private function remove_conflicts( &$wp_objects, $required_objects, $type = 'scripts' ) {
319 319
 
320
-        /**
321
-         * @filter `gravityview_noconflict_{$type}` Modify the list of no conflict scripts or styles\n
322
-         * Filter is `gravityview_noconflict_scripts` or `gravityview_noconflict_styles`
323
-         * @param array $required_objects
324
-         */
325
-        $required_objects = apply_filters( "gravityview_noconflict_{$type}", $required_objects );
326
-
327
-        //reset queue
328
-        $queue = array();
329
-        foreach( $wp_objects->queue as $object ) {
330
-	        if( in_array( $object, $required_objects ) || preg_match('/gravityview|gf_|gravityforms/ism', $object ) ) {
331
-                $queue[] = $object;
332
-            }
333
-        }
334
-        $wp_objects->queue = $queue;
335
-
336
-        $required_objects = $this->add_script_dependencies( $wp_objects->registered, $required_objects );
337
-
338
-        //unregistering scripts
339
-        $registered = array();
340
-        foreach( $wp_objects->registered as $handle => $script_registration ){
341
-            if( in_array( $handle, $required_objects ) ){
342
-                $registered[ $handle ] = $script_registration;
343
-            }
344
-        }
345
-        $wp_objects->registered = $registered;
320
+		/**
321
+		 * @filter `gravityview_noconflict_{$type}` Modify the list of no conflict scripts or styles\n
322
+		 * Filter is `gravityview_noconflict_scripts` or `gravityview_noconflict_styles`
323
+		 * @param array $required_objects
324
+		 */
325
+		$required_objects = apply_filters( "gravityview_noconflict_{$type}", $required_objects );
326
+
327
+		//reset queue
328
+		$queue = array();
329
+		foreach( $wp_objects->queue as $object ) {
330
+			if( in_array( $object, $required_objects ) || preg_match('/gravityview|gf_|gravityforms/ism', $object ) ) {
331
+				$queue[] = $object;
332
+			}
333
+		}
334
+		$wp_objects->queue = $queue;
335
+
336
+		$required_objects = $this->add_script_dependencies( $wp_objects->registered, $required_objects );
337
+
338
+		//unregistering scripts
339
+		$registered = array();
340
+		foreach( $wp_objects->registered as $handle => $script_registration ){
341
+			if( in_array( $handle, $required_objects ) ){
342
+				$registered[ $handle ] = $script_registration;
343
+			}
344
+		}
345
+		$wp_objects->registered = $registered;
346 346
 	}
347 347
 
348 348
 	/**
@@ -405,7 +405,6 @@  discard block
 block discarded – undo
405 405
 	 *
406 406
 	 * @deprecated since 1.12
407 407
 	 * @see GravityView_Compatibility::get_plugin_status()
408
-
409 408
 	 * @return boolean|string True: plugin is active; False: plugin file doesn't exist at path; 'inactive' it's inactive
410 409
 	 */
411 410
 	static function get_plugin_status( $location = '' ) {
Please login to merge, or discard this patch.