Completed
Pull Request — master (#605)
by Zack
05:45
created
gravityview.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -312,11 +312,11 @@  discard block
 block discarded – undo
312 312
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-change-entry-creator.php' );
313 313
 
314 314
 
315
-        /**
316
-         * When an entry is created, check if we need to update the custom slug meta
317
-         * todo: move this to its own class..
318
-         */
319
-        add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
315
+		/**
316
+		 * When an entry is created, check if we need to update the custom slug meta
317
+		 * todo: move this to its own class..
318
+		 */
319
+		add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
320 320
 
321 321
 		/**
322 322
 		 * @action `gravityview_include_frontend_actions` Triggered after all GravityView frontend files are loaded
@@ -347,34 +347,34 @@  discard block
 block discarded – undo
347 347
 
348 348
 	/** DEBUG */
349 349
 
350
-    /**
351
-     * Logs messages using Gravity Forms logging add-on
352
-     * @param  string $message log message
353
-     * @param mixed $data Additional data to display
354
-     * @return void
355
-     */
356
-    public static function log_debug( $message, $data = null ){
357
-	    /**
358
-	     * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
359
-	     * @param string $message Message to display
360
-	     * @param mixed $data Supporting data to print alongside it
361
-	     */
362
-    	do_action( 'gravityview_log_debug', $message, $data );
363
-    }
364
-
365
-    /**
366
-     * Logs messages using Gravity Forms logging add-on
367
-     * @param  string $message log message
368
-     * @return void
369
-     */
370
-    public static function log_error( $message, $data = null ){
371
-	    /**
372
-	     * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
373
-	     * @param string $message Error message to display
374
-	     * @param mixed $data Supporting data to print alongside it
375
-	     */
376
-    	do_action( 'gravityview_log_error', $message, $data );
377
-    }
350
+	/**
351
+	 * Logs messages using Gravity Forms logging add-on
352
+	 * @param  string $message log message
353
+	 * @param mixed $data Additional data to display
354
+	 * @return void
355
+	 */
356
+	public static function log_debug( $message, $data = null ){
357
+		/**
358
+		 * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
359
+		 * @param string $message Message to display
360
+		 * @param mixed $data Supporting data to print alongside it
361
+		 */
362
+		do_action( 'gravityview_log_debug', $message, $data );
363
+	}
364
+
365
+	/**
366
+	 * Logs messages using Gravity Forms logging add-on
367
+	 * @param  string $message log message
368
+	 * @return void
369
+	 */
370
+	public static function log_error( $message, $data = null ){
371
+		/**
372
+		 * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
373
+		 * @param string $message Error message to display
374
+		 * @param mixed $data Supporting data to print alongside it
375
+		 */
376
+		do_action( 'gravityview_log_error', $message, $data );
377
+	}
378 378
 
379 379
 } // end class GravityView_Plugin
380 380
 
Please login to merge, or discard this patch.
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/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/class-admin-add-shortcode.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Adds a button to add the View shortcode into the post content
4
- *
5
- * @package   GravityView
6
- * @license   GPL2+
7
- * @author    Katz Web Services, Inc.
8
- * @link      http://gravityview.co
9
- * @copyright Copyright 2014, Katz Web Services, Inc.
10
- *
11
- * @since 1.0.0
12
- */
3
+	 * Adds a button to add the View shortcode into the post content
4
+	 *
5
+	 * @package   GravityView
6
+	 * @license   GPL2+
7
+	 * @author    Katz Web Services, Inc.
8
+	 * @link      http://gravityview.co
9
+	 * @copyright Copyright 2014, Katz Web Services, Inc.
10
+	 *
11
+	 * @since 1.0.0
12
+	 */
13 13
 
14 14
 /** If this file is called directly, abort. */
15 15
 if ( ! defined( 'ABSPATH' ) ) {
Please login to merge, or discard this patch.
includes/class-admin-approve-entries.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
 			if( class_exists( 'GravityView_Entry_Notes' ) ){
323 323
 				global $current_user;
324
-      			get_currentuserinfo();
324
+	  			get_currentuserinfo();
325 325
 				GravityView_Entry_Notes::add_note( $entry_id, $current_user->ID, $current_user->display_name, $note );
326 326
 			}
327 327
 
@@ -356,12 +356,12 @@  discard block
 block discarded – undo
356 356
 
357 357
 		$approvedcolumn = self::get_approved_column( $form['id'] );
358 358
 
359
-        /**
360
-         * If the form doesn't contain the approve field, don't assume anything.
361
-         */
362
-        if( empty( $approvedcolumn ) ) {
363
-            return;
364
-        }
359
+		/**
360
+		 * If the form doesn't contain the approve field, don't assume anything.
361
+		 */
362
+		if( empty( $approvedcolumn ) ) {
363
+			return;
364
+		}
365 365
 
366 366
 		$entry = GFAPI::get_entry( $entry_id );
367 367
 
@@ -474,17 +474,17 @@  discard block
 block discarded – undo
474 474
 	 */
475 475
 	static public function get_approved_column( $form ) {
476 476
 
477
-        if( empty( $form ) ) {
478
-            return null;
479
-        }
477
+		if( empty( $form ) ) {
478
+			return null;
479
+		}
480 480
 
481
-        if( !is_array( $form ) ) {
482
-            $form = GVCommon::get_form( $form );
483
-        }
481
+		if( !is_array( $form ) ) {
482
+			$form = GVCommon::get_form( $form );
483
+		}
484 484
 
485 485
 		foreach( $form['fields'] as $key => $field ) {
486 486
 
487
-            $field = (array) $field;
487
+			$field = (array) $field;
488 488
 
489 489
 			if( !empty( $field['gravityview_approved'] ) ) {
490 490
 				if( !empty($field['inputs'][0]['id']) ) {
@@ -492,14 +492,14 @@  discard block
 block discarded – undo
492 492
 				}
493 493
 			}
494 494
 
495
-            // Note: This is just for backward compatibility from GF Directory plugin and old GV versions - when using i18n it may not work..
496
-            if( 'checkbox' == $field['type'] && isset( $field['inputs'] ) && is_array( $field['inputs'] ) ) {
497
-                foreach ( $field['inputs'] as $key2 => $input ) {
498
-                    if ( strtolower( $input['label'] ) == 'approved' ) {
499
-                        return $input['id'];
500
-                    }
501
-                }
502
-            }
495
+			// Note: This is just for backward compatibility from GF Directory plugin and old GV versions - when using i18n it may not work..
496
+			if( 'checkbox' == $field['type'] && isset( $field['inputs'] ) && is_array( $field['inputs'] ) ) {
497
+				foreach ( $field['inputs'] as $key2 => $input ) {
498
+					if ( strtolower( $input['label'] ) == 'approved' ) {
499
+						return $input['id'];
500
+					}
501
+				}
502
+			}
503 503
 		}
504 504
 
505 505
 		return null;
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.