Completed
Push — develop ( bd6ad5...7b688d )
by Zack
04:29
created
gravityview.php 2 patches
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.
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 
28 28
 /** If this file is called directly, abort. */
29
-if ( ! defined( 'ABSPATH' ) ) {
29
+if (!defined('ABSPATH')) {
30 30
 	die;
31 31
 }
32 32
 
@@ -36,52 +36,52 @@  discard block
 block discarded – undo
36 36
  * Full path to the GravityView file
37 37
  * @define "GRAVITYVIEW_FILE" "./gravityview.php"
38 38
  */
39
-define( 'GRAVITYVIEW_FILE', __FILE__ );
39
+define('GRAVITYVIEW_FILE', __FILE__);
40 40
 
41 41
 /**
42 42
  * The URL to this file
43 43
  */
44
-define( 'GRAVITYVIEW_URL', plugin_dir_url( __FILE__ ) );
44
+define('GRAVITYVIEW_URL', plugin_dir_url(__FILE__));
45 45
 
46 46
 
47 47
 /** @define "GRAVITYVIEW_DIR" "./" The absolute path to the plugin directory */
48
-define( 'GRAVITYVIEW_DIR', plugin_dir_path( __FILE__ ) );
48
+define('GRAVITYVIEW_DIR', plugin_dir_path(__FILE__));
49 49
 
50 50
 /**
51 51
  * GravityView requires at least this version of Gravity Forms to function properly.
52 52
  */
53
-define( 'GV_MIN_GF_VERSION', '1.9.9.10' );
53
+define('GV_MIN_GF_VERSION', '1.9.9.10');
54 54
 
55 55
 /**
56 56
  * GravityView requires at least this version of WordPress to function properly.
57 57
  * @since 1.12
58 58
  */
59
-define( 'GV_MIN_WP_VERSION', '3.3' );
59
+define('GV_MIN_WP_VERSION', '3.3');
60 60
 
61 61
 /**
62 62
  * GravityView requires at least this version of PHP to function properly.
63 63
  * @since 1.12
64 64
  */
65
-define( 'GV_MIN_PHP_VERSION', '5.2.4' );
65
+define('GV_MIN_PHP_VERSION', '5.2.4');
66 66
 
67 67
 /** Load common & connector functions */
68
-require_once( GRAVITYVIEW_DIR . 'includes/helper-functions.php' );
69
-require_once( GRAVITYVIEW_DIR . 'includes/class-common.php');
70
-require_once( GRAVITYVIEW_DIR . 'includes/connector-functions.php');
71
-require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-compatibility.php' );
72
-require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-roles-capabilities.php' );
73
-require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-notices.php' );
68
+require_once(GRAVITYVIEW_DIR.'includes/helper-functions.php');
69
+require_once(GRAVITYVIEW_DIR.'includes/class-common.php');
70
+require_once(GRAVITYVIEW_DIR.'includes/connector-functions.php');
71
+require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-compatibility.php');
72
+require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-roles-capabilities.php');
73
+require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-admin-notices.php');
74 74
 
75 75
 /** Register Post Types and Rewrite Rules */
76
-require_once( GRAVITYVIEW_DIR . 'includes/class-post-types.php');
76
+require_once(GRAVITYVIEW_DIR.'includes/class-post-types.php');
77 77
 
78 78
 /** Add Cache Class */
79
-require_once( GRAVITYVIEW_DIR . 'includes/class-cache.php');
79
+require_once(GRAVITYVIEW_DIR.'includes/class-cache.php');
80 80
 
81 81
 /** Register hooks that are fired when the plugin is activated and deactivated. */
82
-if( is_admin() ) {
83
-	register_activation_hook( __FILE__, array( 'GravityView_Plugin', 'activate' ) );
84
-	register_deactivation_hook( __FILE__, array( 'GravityView_Plugin', 'deactivate' ) );
82
+if (is_admin()) {
83
+	register_activation_hook(__FILE__, array('GravityView_Plugin', 'activate'));
84
+	register_deactivation_hook(__FILE__, array('GravityView_Plugin', 'deactivate'));
85 85
 }
86 86
 
87 87
 /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public static function getInstance() {
102 102
 
103
-		if( empty( self::$instance ) ) {
103
+		if (empty(self::$instance)) {
104 104
 			self::$instance = new self;
105 105
 		}
106 106
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	private function __construct() {
111 111
 
112 112
 
113
-		if( ! GravityView_Compatibility::is_valid() ) {
113
+		if (!GravityView_Compatibility::is_valid()) {
114 114
 			return;
115 115
 		}
116 116
 
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	private function add_hooks() {
128 128
 		// Load plugin text domain
129
-		add_action( 'init', array( $this, 'load_plugin_textdomain' ), 1 );
129
+		add_action('init', array($this, 'load_plugin_textdomain'), 1);
130 130
 
131 131
 		// Load frontend files
132
-		add_action( 'init', array( $this, 'frontend_actions' ), 20 );
132
+		add_action('init', array($this, 'frontend_actions'), 20);
133 133
 	}
134 134
 
135 135
 	/**
@@ -139,48 +139,48 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function include_files() {
141 141
 
142
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin.php' );
142
+		include_once(GRAVITYVIEW_DIR.'includes/class-admin.php');
143 143
 
144 144
 		// Load fields
145
-		include_once( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-fields.php' );
146
-		include_once( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-field.php' );
145
+		include_once(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-fields.php');
146
+		include_once(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-field.php');
147 147
 
148 148
 		// Load all field files automatically
149
-		foreach ( glob( GRAVITYVIEW_DIR . 'includes/fields/class-gravityview-field*.php' ) as $gv_field_filename ) {
150
-			include_once( $gv_field_filename );
149
+		foreach (glob(GRAVITYVIEW_DIR.'includes/fields/class-gravityview-field*.php') as $gv_field_filename) {
150
+			include_once($gv_field_filename);
151 151
 		}
152 152
 
153
-		include_once( GRAVITYVIEW_DIR .'includes/class-gravityview-entry-notes.php' );
154
-		include_once( GRAVITYVIEW_DIR .'includes/load-plugin-and-theme-hooks.php' );
153
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-notes.php');
154
+		include_once(GRAVITYVIEW_DIR.'includes/load-plugin-and-theme-hooks.php');
155 155
 
156 156
 		// Load Extensions
157 157
 		// @todo: Convert to a scan of the directory or a method where this all lives
158
-		include_once( GRAVITYVIEW_DIR .'includes/extensions/edit-entry/class-edit-entry.php' );
159
-		include_once( GRAVITYVIEW_DIR .'includes/extensions/delete-entry/class-delete-entry.php' );
158
+		include_once(GRAVITYVIEW_DIR.'includes/extensions/edit-entry/class-edit-entry.php');
159
+		include_once(GRAVITYVIEW_DIR.'includes/extensions/delete-entry/class-delete-entry.php');
160 160
 
161 161
 		// Load WordPress Widgets
162
-		include_once( GRAVITYVIEW_DIR .'includes/wordpress-widgets/register-wordpress-widgets.php' );
162
+		include_once(GRAVITYVIEW_DIR.'includes/wordpress-widgets/register-wordpress-widgets.php');
163 163
 
164 164
 		// Load GravityView Widgets
165
-		include_once( GRAVITYVIEW_DIR .'includes/widgets/register-gravityview-widgets.php' );
165
+		include_once(GRAVITYVIEW_DIR.'includes/widgets/register-gravityview-widgets.php');
166 166
 
167 167
 		// Add oEmbed
168
-		include_once( GRAVITYVIEW_DIR . 'includes/class-oembed.php' );
168
+		include_once(GRAVITYVIEW_DIR.'includes/class-oembed.php');
169 169
 
170 170
 		// Add logging
171
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-logging.php' );
172
-
173
-		include_once( GRAVITYVIEW_DIR . 'includes/class-ajax.php' );
174
-		include_once( GRAVITYVIEW_DIR . 'includes/class-settings.php');
175
-		include_once( GRAVITYVIEW_DIR . 'includes/class-frontend-views.php' );
176
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-bar.php' );
177
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-list.php' );
178
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */
179
-		include_once( GRAVITYVIEW_DIR . 'includes/class-data.php' );
180
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-shortcode.php' );
181
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-link-shortcode.php' );
182
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gvlogic-shortcode.php' );
183
-		include_once( GRAVITYVIEW_DIR . 'includes/presets/register-default-templates.php' );
171
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-logging.php');
172
+
173
+		include_once(GRAVITYVIEW_DIR.'includes/class-ajax.php');
174
+		include_once(GRAVITYVIEW_DIR.'includes/class-settings.php');
175
+		include_once(GRAVITYVIEW_DIR.'includes/class-frontend-views.php');
176
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-admin-bar.php');
177
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-list.php');
178
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */
179
+		include_once(GRAVITYVIEW_DIR.'includes/class-data.php');
180
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-shortcode.php');
181
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-entry-link-shortcode.php');
182
+		include_once(GRAVITYVIEW_DIR.'includes/class-gvlogic-shortcode.php');
183
+		include_once(GRAVITYVIEW_DIR.'includes/presets/register-default-templates.php');
184 184
 
185 185
 	}
186 186
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 * @return bool
191 191
 	 */
192 192
 	public static function is_network_activated() {
193
-		return is_multisite() && ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( 'gravityview/gravityview.php' ) );
193
+		return is_multisite() && (function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('gravityview/gravityview.php'));
194 194
 	}
195 195
 
196 196
 
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 		flush_rewrite_rules();
213 213
 
214 214
 		// Update the current GV version
215
-		update_option( 'gv_version', self::version );
215
+		update_option('gv_version', self::version);
216 216
 
217 217
 		// Add the transient to redirect to configuration page
218
-		set_transient( '_gv_activation_redirect', true, 60 );
218
+		set_transient('_gv_activation_redirect', true, 60);
219 219
 
220 220
 		// Clear settings transient
221
-		delete_transient( 'redux_edd_license_license_valid' );
221
+		delete_transient('redux_edd_license_license_valid');
222 222
 
223 223
 		GravityView_Roles_Capabilities::get_instance()->add_caps();
224 224
 	}
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 	 * @return void
245 245
 	 */
246 246
 	public static function include_extension_framework() {
247
-		if ( ! class_exists( 'GravityView_Extension' ) ) {
248
-			require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-extension.php' );
247
+		if (!class_exists('GravityView_Extension')) {
248
+			require_once(GRAVITYVIEW_DIR.'includes/class-gravityview-extension.php');
249 249
 		}
250 250
 	}
251 251
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @since 1.7.5.1
256 256
 	 */
257 257
 	public static function include_widget_class() {
258
-		include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' );
258
+		include_once(GRAVITYVIEW_DIR.'includes/widgets/class-gravityview-widget.php');
259 259
 	}
260 260
 
261 261
 
@@ -267,17 +267,17 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public function load_plugin_textdomain() {
269 269
 
270
-		$loaded = load_plugin_textdomain( 'gravityview', false, '/languages/' );
271
-		if ( ! $loaded ) {
272
-			$loaded = load_muplugin_textdomain( 'gravityview', '/languages/' );
270
+		$loaded = load_plugin_textdomain('gravityview', false, '/languages/');
271
+		if (!$loaded) {
272
+			$loaded = load_muplugin_textdomain('gravityview', '/languages/');
273 273
 		}
274
-		if ( ! $loaded ) {
275
-			$loaded = load_theme_textdomain( 'gravityview', '/languages/' );
274
+		if (!$loaded) {
275
+			$loaded = load_theme_textdomain('gravityview', '/languages/');
276 276
 		}
277
-		if ( ! $loaded ) {
278
-			$locale = apply_filters( 'plugin_locale', get_locale(), 'gravityview' );
279
-			$mofile = dirname( __FILE__ ) . '/languages/gravityview-'. $locale .'.mo';
280
-			load_textdomain( 'gravityview', $mofile );
277
+		if (!$loaded) {
278
+			$locale = apply_filters('plugin_locale', get_locale(), 'gravityview');
279
+			$mofile = dirname(__FILE__).'/languages/gravityview-'.$locale.'.mo';
280
+			load_textdomain('gravityview', $mofile);
281 281
 		}
282 282
 
283 283
 	}
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
 	 */
290 290
 	public static function is_admin() {
291 291
 
292
-		$doing_ajax = defined( 'DOING_AJAX' ) ? DOING_AJAX : false;
292
+		$doing_ajax = defined('DOING_AJAX') ? DOING_AJAX : false;
293 293
 
294
-		return is_admin() && ! $doing_ajax;
294
+		return is_admin() && !$doing_ajax;
295 295
 	}
296 296
 
297 297
 	/**
@@ -302,27 +302,27 @@  discard block
 block discarded – undo
302 302
 	 */
303 303
 	public function frontend_actions() {
304 304
 
305
-		if( self::is_admin() ) { return; }
305
+		if (self::is_admin()) { return; }
306 306
 
307
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-image.php' );
308
-		include_once( GRAVITYVIEW_DIR .'includes/class-template.php' );
309
-		include_once( GRAVITYVIEW_DIR .'includes/class-api.php' );
310
-		include_once( GRAVITYVIEW_DIR .'includes/class-frontend-views.php' );
311
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-change-entry-creator.php' );
307
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-image.php');
308
+		include_once(GRAVITYVIEW_DIR.'includes/class-template.php');
309
+		include_once(GRAVITYVIEW_DIR.'includes/class-api.php');
310
+		include_once(GRAVITYVIEW_DIR.'includes/class-frontend-views.php');
311
+		include_once(GRAVITYVIEW_DIR.'includes/class-gravityview-change-entry-creator.php');
312 312
 
313 313
 
314 314
         /**
315 315
          * When an entry is created, check if we need to update the custom slug meta
316 316
          * todo: move this to its own class..
317 317
          */
318
-        add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
318
+        add_action('gform_entry_created', array('GravityView_API', 'entry_create_custom_slug'), 10, 2);
319 319
 
320 320
 		/**
321 321
 		 * @action `gravityview_include_frontend_actions` Triggered after all GravityView frontend files are loaded
322 322
 		 *
323 323
 		 * Nice place to insert extensions' frontend stuff
324 324
 		 */
325
-		do_action( 'gravityview_include_frontend_actions' );
325
+		do_action('gravityview_include_frontend_actions');
326 326
 	}
327 327
 
328 328
 	/**
@@ -332,15 +332,15 @@  discard block
 block discarded – undo
332 332
 	 */
333 333
 	public static function get_default_widget_areas() {
334 334
 		$default_areas = array(
335
-			array( '1-1' => array( array( 'areaid' => 'top', 'title' => __('Top', 'gravityview' ) , 'subtitle' => '' ) ) ),
336
-			array( '1-2' => array( array( 'areaid' => 'left', 'title' => __('Left', 'gravityview') , 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __('Right', 'gravityview') , 'subtitle' => '' ) ) ),
335
+			array('1-1' => array(array('areaid' => 'top', 'title' => __('Top', 'gravityview'), 'subtitle' => ''))),
336
+			array('1-2' => array(array('areaid' => 'left', 'title' => __('Left', 'gravityview'), 'subtitle' => '')), '2-2' => array(array('areaid' => 'right', 'title' => __('Right', 'gravityview'), 'subtitle' => ''))),
337 337
 		);
338 338
 
339 339
 		/**
340 340
 		 * @filter `gravityview_widget_active_areas` Array of zones available for widgets to be dropped into
341 341
 		 * @param array $default_areas Definition for default widget areas
342 342
 		 */
343
-		return apply_filters( 'gravityview_widget_active_areas', $default_areas );
343
+		return apply_filters('gravityview_widget_active_areas', $default_areas);
344 344
 	}
345 345
 
346 346
 	/** DEBUG */
@@ -351,13 +351,13 @@  discard block
 block discarded – undo
351 351
      * @param mixed $data Additional data to display
352 352
      * @return void
353 353
      */
354
-    public static function log_debug( $message, $data = null ){
354
+    public static function log_debug($message, $data = null) {
355 355
 	    /**
356 356
 	     * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
357 357
 	     * @param string $message Message to display
358 358
 	     * @param mixed $data Supporting data to print alongside it
359 359
 	     */
360
-    	do_action( 'gravityview_log_debug', $message, $data );
360
+    	do_action('gravityview_log_debug', $message, $data);
361 361
     }
362 362
 
363 363
     /**
@@ -365,13 +365,13 @@  discard block
 block discarded – undo
365 365
      * @param  string $message log message
366 366
      * @return void
367 367
      */
368
-    public static function log_error( $message, $data = null ){
368
+    public static function log_error($message, $data = null) {
369 369
 	    /**
370 370
 	     * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
371 371
 	     * @param string $message Error message to display
372 372
 	     * @param mixed $data Supporting data to print alongside it
373 373
 	     */
374
-    	do_action( 'gravityview_log_error', $message, $data );
374
+    	do_action('gravityview_log_error', $message, $data);
375 375
     }
376 376
 
377 377
 } // end class GravityView_Plugin
Please login to merge, or discard this patch.
includes/admin/class.field.type.php 2 patches
Indentation   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -10,158 +10,158 @@  discard block
 block discarded – undo
10 10
 	 *
11 11
 	 * @var string
12 12
 	 */
13
-    protected $name;
13
+	protected $name;
14 14
 
15 15
 	/**
16 16
 	 * Field settings
17 17
 	 *
18 18
 	 * @var array
19 19
 	 */
20
-    protected $field;
20
+	protected $field;
21 21
 
22 22
 	/**
23 23
 	 * Field current value
24 24
 	 *
25 25
 	 * @var mixed
26 26
 	 */
27
-    protected $value;
28
-
29
-    function __construct( $name = '', $field = array(), $curr_value = NULL ) {
30
-
31
-        $this->name = $name;
32
-
33
-        $defaults = self::get_field_defaults();
34
-
35
-        // Backward compatibility
36
-        if( !empty( $field['choices'] ) ) {
37
-        	$field['options'] = $field['choices'];
38
-        	unset( $field['choices'] );
39
-        }
40
-
41
-        $this->field =  wp_parse_args( $field, $defaults );
42
-
43
-        $this->value = is_null( $curr_value ) ? $this->field['value'] : $curr_value;
44
-
45
-    }
46
-
47
-    /**
48
-     * Returns the default details for a field option
49
-     *
50
-     * - default    // default option value, in case nothing is defined (@deprecated)
51
-     * - desc       // option description
52
-     * - value      // the option default value
53
-     * - label      // the option label
54
-     * - left_label // In case of checkboxes, left label will appear on the left of the checkbox
55
-     * - id         // the field id
56
-     * - type       // the option type ( text, checkbox, select, ... )
57
-     * - options    // when type is select, define the select options ('choices' is @deprecated)
58
-     * - merge_tags // if the option supports merge tags feature
59
-     * - class      // (new) define extra classes for the field
60
-     * - tooltip    //
61
-     *
62
-     * @return array
63
-     */
64
-    public static function get_field_defaults() {
65
-        return array(
66
-            'desc' => '',
67
-            'value' => NULL,
68
-            'label' => '',
69
-            'id' => NULL,
70
-            'type'  => 'text',
71
-            'options' => NULL,
72
-            'merge_tags' => true,
73
-            'class' => '',
74
-            'tooltip' => NULL
75
-        );
76
-    }
77
-
78
-
79
-    function get_tooltip() {
80
-        if( !function_exists('gform_tooltip') ) {
81
-            return NULL;
82
-        }
83
-
84
-        return !empty( $this->field['tooltip'] ) ? ' '.gform_tooltip( $this->field['tooltip'] , false, true ) : NULL;
85
-    }
86
-
87
-    /**
88
-     * Build input id based on the name
89
-     * @return string
90
-     */
91
-    function get_field_id() {
92
-        if( isset( $this->field['id'] ) ) {
93
-            return esc_attr( $this->field['id'] );
94
-        }
95
-        return esc_attr( sanitize_html_class( $this->name ) );
96
-    }
97
-
98
-    /**
99
-     * Retrieve field label
100
-     * @return string
101
-     */
102
-    function get_field_label() {
103
-        return esc_html( trim( $this->field['label'] ) );
104
-    }
27
+	protected $value;
28
+
29
+	function __construct( $name = '', $field = array(), $curr_value = NULL ) {
30
+
31
+		$this->name = $name;
32
+
33
+		$defaults = self::get_field_defaults();
34
+
35
+		// Backward compatibility
36
+		if( !empty( $field['choices'] ) ) {
37
+			$field['options'] = $field['choices'];
38
+			unset( $field['choices'] );
39
+		}
40
+
41
+		$this->field =  wp_parse_args( $field, $defaults );
42
+
43
+		$this->value = is_null( $curr_value ) ? $this->field['value'] : $curr_value;
44
+
45
+	}
46
+
47
+	/**
48
+	 * Returns the default details for a field option
49
+	 *
50
+	 * - default    // default option value, in case nothing is defined (@deprecated)
51
+	 * - desc       // option description
52
+	 * - value      // the option default value
53
+	 * - label      // the option label
54
+	 * - left_label // In case of checkboxes, left label will appear on the left of the checkbox
55
+	 * - id         // the field id
56
+	 * - type       // the option type ( text, checkbox, select, ... )
57
+	 * - options    // when type is select, define the select options ('choices' is @deprecated)
58
+	 * - merge_tags // if the option supports merge tags feature
59
+	 * - class      // (new) define extra classes for the field
60
+	 * - tooltip    //
61
+	 *
62
+	 * @return array
63
+	 */
64
+	public static function get_field_defaults() {
65
+		return array(
66
+			'desc' => '',
67
+			'value' => NULL,
68
+			'label' => '',
69
+			'id' => NULL,
70
+			'type'  => 'text',
71
+			'options' => NULL,
72
+			'merge_tags' => true,
73
+			'class' => '',
74
+			'tooltip' => NULL
75
+		);
76
+	}
77
+
78
+
79
+	function get_tooltip() {
80
+		if( !function_exists('gform_tooltip') ) {
81
+			return NULL;
82
+		}
83
+
84
+		return !empty( $this->field['tooltip'] ) ? ' '.gform_tooltip( $this->field['tooltip'] , false, true ) : NULL;
85
+	}
86
+
87
+	/**
88
+	 * Build input id based on the name
89
+	 * @return string
90
+	 */
91
+	function get_field_id() {
92
+		if( isset( $this->field['id'] ) ) {
93
+			return esc_attr( $this->field['id'] );
94
+		}
95
+		return esc_attr( sanitize_html_class( $this->name ) );
96
+	}
97
+
98
+	/**
99
+	 * Retrieve field label
100
+	 * @return string
101
+	 */
102
+	function get_field_label() {
103
+		return esc_html( trim( $this->field['label'] ) );
104
+	}
105 105
 
106 106
 	/**
107 107
 	 * Retrieve field left label
108
-     *
109
-     * @since 1.7
110
-     *
108
+	 *
109
+	 * @since 1.7
110
+	 *
111 111
 	 * @return string
112 112
 	 */
113 113
 	function get_field_left_label() {
114 114
 		return isset( $this->field['left_label'] ) ? esc_html( trim( $this->field['left_label'] ) ) : NULL;
115 115
 	}
116 116
 
117
-    /**
118
-     * Retrieve field label class
119
-     * @return string
120
-     */
121
-    function get_label_class() {
122
-        return 'gv-label-'. sanitize_html_class( $this->field['type'] );
123
-    }
124
-
125
-
126
-    /**
127
-     * Retrieve field description
128
-     * @return string
129
-     */
130
-    function get_field_desc() {
131
-        return !empty( $this->field['desc'] ) ? '<span class="howto">'. $this->field['desc'] .'</span>' : '';
132
-    }
133
-
134
-
135
-    /**
136
-     * Verify if field should have merge tags
137
-     * @return boolean
138
-     */
139
-    function show_merge_tags() {
140
-        // Show the merge tags if the field is a list view
141
-        $is_list = preg_match( '/_list-/ism', $this->name );
142
-        // Or is a single entry view
143
-        $is_single = preg_match( '/single_/ism', $this->name );
144
-
145
-        return ( $is_single || $is_list );
146
-    }
147
-
148
-
149
-
150
-    /**
151
-     * important! Override this class
152
-     * outputs the field option html
153
-     */
154
-    function render_option() {
155
-        // to replace on each field
156
-    }
157
-
158
-    /**
159
-     * important! Override this class if needed
160
-     * outputs the field setting html
161
-     */
162
-    function render_setting( $override_input = NULL ) {
163
-
164
-        if( !empty( $this->field['full_width'] ) ) { ?>
117
+	/**
118
+	 * Retrieve field label class
119
+	 * @return string
120
+	 */
121
+	function get_label_class() {
122
+		return 'gv-label-'. sanitize_html_class( $this->field['type'] );
123
+	}
124
+
125
+
126
+	/**
127
+	 * Retrieve field description
128
+	 * @return string
129
+	 */
130
+	function get_field_desc() {
131
+		return !empty( $this->field['desc'] ) ? '<span class="howto">'. $this->field['desc'] .'</span>' : '';
132
+	}
133
+
134
+
135
+	/**
136
+	 * Verify if field should have merge tags
137
+	 * @return boolean
138
+	 */
139
+	function show_merge_tags() {
140
+		// Show the merge tags if the field is a list view
141
+		$is_list = preg_match( '/_list-/ism', $this->name );
142
+		// Or is a single entry view
143
+		$is_single = preg_match( '/single_/ism', $this->name );
144
+
145
+		return ( $is_single || $is_list );
146
+	}
147
+
148
+
149
+
150
+	/**
151
+	 * important! Override this class
152
+	 * outputs the field option html
153
+	 */
154
+	function render_option() {
155
+		// to replace on each field
156
+	}
157
+
158
+	/**
159
+	 * important! Override this class if needed
160
+	 * outputs the field setting html
161
+	 */
162
+	function render_setting( $override_input = NULL ) {
163
+
164
+		if( !empty( $this->field['full_width'] ) ) { ?>
165 165
             <th scope="row" colspan="2">
166 166
                 <div>
167 167
                     <label for="<?php echo $this->get_field_id(); ?>">
@@ -181,14 +181,14 @@  discard block
 block discarded – undo
181 181
             </td>
182 182
         <?php }
183 183
 
184
-    }
184
+	}
185 185
 
186
-    /**
187
-     * important! Override this class
188
-     * outputs the input html part
189
-     */
190
-    function render_input( $override_input ) {
191
-        echo '';
192
-    }
186
+	/**
187
+	 * important! Override this class
188
+	 * outputs the input html part
189
+	 */
190
+	function render_input( $override_input ) {
191
+		echo '';
192
+	}
193 193
 
194 194
 }
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
     protected $value;
28 28
 
29
-    function __construct( $name = '', $field = array(), $curr_value = NULL ) {
29
+    function __construct($name = '', $field = array(), $curr_value = NULL) {
30 30
 
31 31
         $this->name = $name;
32 32
 
33 33
         $defaults = self::get_field_defaults();
34 34
 
35 35
         // Backward compatibility
36
-        if( !empty( $field['choices'] ) ) {
36
+        if (!empty($field['choices'])) {
37 37
         	$field['options'] = $field['choices'];
38
-        	unset( $field['choices'] );
38
+        	unset($field['choices']);
39 39
         }
40 40
 
41
-        $this->field =  wp_parse_args( $field, $defaults );
41
+        $this->field = wp_parse_args($field, $defaults);
42 42
 
43
-        $this->value = is_null( $curr_value ) ? $this->field['value'] : $curr_value;
43
+        $this->value = is_null($curr_value) ? $this->field['value'] : $curr_value;
44 44
 
45 45
     }
46 46
 
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
 
79 79
     function get_tooltip() {
80
-        if( !function_exists('gform_tooltip') ) {
80
+        if (!function_exists('gform_tooltip')) {
81 81
             return NULL;
82 82
         }
83 83
 
84
-        return !empty( $this->field['tooltip'] ) ? ' '.gform_tooltip( $this->field['tooltip'] , false, true ) : NULL;
84
+        return !empty($this->field['tooltip']) ? ' '.gform_tooltip($this->field['tooltip'], false, true) : NULL;
85 85
     }
86 86
 
87 87
     /**
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
      * @return string
90 90
      */
91 91
     function get_field_id() {
92
-        if( isset( $this->field['id'] ) ) {
93
-            return esc_attr( $this->field['id'] );
92
+        if (isset($this->field['id'])) {
93
+            return esc_attr($this->field['id']);
94 94
         }
95
-        return esc_attr( sanitize_html_class( $this->name ) );
95
+        return esc_attr(sanitize_html_class($this->name));
96 96
     }
97 97
 
98 98
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @return string
101 101
      */
102 102
     function get_field_label() {
103
-        return esc_html( trim( $this->field['label'] ) );
103
+        return esc_html(trim($this->field['label']));
104 104
     }
105 105
 
106 106
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @return string
112 112
 	 */
113 113
 	function get_field_left_label() {
114
-		return isset( $this->field['left_label'] ) ? esc_html( trim( $this->field['left_label'] ) ) : NULL;
114
+		return isset($this->field['left_label']) ? esc_html(trim($this->field['left_label'])) : NULL;
115 115
 	}
116 116
 
117 117
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * @return string
120 120
      */
121 121
     function get_label_class() {
122
-        return 'gv-label-'. sanitize_html_class( $this->field['type'] );
122
+        return 'gv-label-'.sanitize_html_class($this->field['type']);
123 123
     }
124 124
 
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @return string
129 129
      */
130 130
     function get_field_desc() {
131
-        return !empty( $this->field['desc'] ) ? '<span class="howto">'. $this->field['desc'] .'</span>' : '';
131
+        return !empty($this->field['desc']) ? '<span class="howto">'.$this->field['desc'].'</span>' : '';
132 132
     }
133 133
 
134 134
 
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
      */
139 139
     function show_merge_tags() {
140 140
         // Show the merge tags if the field is a list view
141
-        $is_list = preg_match( '/_list-/ism', $this->name );
141
+        $is_list = preg_match('/_list-/ism', $this->name);
142 142
         // Or is a single entry view
143
-        $is_single = preg_match( '/single_/ism', $this->name );
143
+        $is_single = preg_match('/single_/ism', $this->name);
144 144
 
145
-        return ( $is_single || $is_list );
145
+        return ($is_single || $is_list);
146 146
     }
147 147
 
148 148
 
@@ -159,25 +159,25 @@  discard block
 block discarded – undo
159 159
      * important! Override this class if needed
160 160
      * outputs the field setting html
161 161
      */
162
-    function render_setting( $override_input = NULL ) {
162
+    function render_setting($override_input = NULL) {
163 163
 
164
-        if( !empty( $this->field['full_width'] ) ) { ?>
164
+        if (!empty($this->field['full_width'])) { ?>
165 165
             <th scope="row" colspan="2">
166 166
                 <div>
167 167
                     <label for="<?php echo $this->get_field_id(); ?>">
168
-                        <?php echo $this->get_field_label() . $this->get_tooltip(); ?>
168
+                        <?php echo $this->get_field_label().$this->get_tooltip(); ?>
169 169
                     </label>
170 170
                 </div>
171
-                <?php $this->render_input( $override_input ); ?>
171
+                <?php $this->render_input($override_input); ?>
172 172
             </th>
173 173
         <?php } else { ?>
174 174
             <th scope="row">
175 175
                 <label for="<?php echo $this->get_field_id(); ?>">
176
-                    <?php echo $this->get_field_label() . $this->get_tooltip(); ?>
176
+                    <?php echo $this->get_field_label().$this->get_tooltip(); ?>
177 177
                 </label>
178 178
             </th>
179 179
             <td>
180
-                <?php $this->render_input( $override_input ); ?>
180
+                <?php $this->render_input($override_input); ?>
181 181
             </td>
182 182
         <?php }
183 183
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      * important! Override this class
188 188
      * outputs the input html part
189 189
      */
190
-    function render_input( $override_input ) {
190
+    function render_input($override_input) {
191 191
         echo '';
192 192
     }
193 193
 
Please login to merge, or discard this patch.
includes/admin/entry-list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 	function __construct() {
9 9
 
10 10
 		// Add Edit link to the entry actions
11
-		add_action( 'gform_entries_first_column_actions', array( $this, 'add_edit_link' ), 10, 5 );
11
+		add_action('gform_entries_first_column_actions', array($this, 'add_edit_link'), 10, 5);
12 12
 
13 13
 		// Add script to enable edit link
14
-		add_action( 'admin_head-forms_page_gf_entries', array( $this, 'add_edit_script') );
14
+		add_action('admin_head-forms_page_gf_entries', array($this, 'add_edit_script'));
15 15
 
16 16
 	}
17 17
 
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	public function add_edit_script() {
27 27
 
28 28
 		// We're on a single entry page, or at least not the Entries page.
29
-		if( !empty( $_GET['view'] ) && $_GET['view'] !== 'entries' ) { return; }
29
+		if (!empty($_GET['view']) && $_GET['view'] !== 'entries') { return; }
30 30
 	?>
31 31
 		<script>
32 32
 		jQuery( document ).ready( function( $ ) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @param array  $lead         The current entry data
51 51
 	 * @param string $query_string URL query string for a link to the current entry. Missing the `?page=` part, which is strange. Example: `gf_entries&view=entry&id=35&lid=5212&filter=&paged=1`
52 52
 	 */
53
-	function add_edit_link( $form_id = NULL, $field_id = NULL, $value = NULL, $lead = array(), $query_string = NULL ) {
53
+	function add_edit_link($form_id = NULL, $field_id = NULL, $value = NULL, $lead = array(), $query_string = NULL) {
54 54
 
55 55
 		$params = array(
56 56
 			'page' => 'gf_entries',
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 		<span class="edit edit_entry">
65 65
 			|
66
-		    <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page='.$query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a>
66
+		    <a title="<?php esc_attr_e('Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url(add_query_arg($params, admin_url('admin.php?page='.$query_string))); ?>"><?php esc_html_e('Edit', 'gravityview'); ?></a>
67 67
 		</span>
68 68
 		<?php
69 69
 	}
Please login to merge, or discard this patch.
includes/admin/field-types/type_checkbox.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,24 +8,24 @@  discard block
 block discarded – undo
8 8
 		?>
9 9
 		<label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>">
10 10
 			<?php $this->render_input(); ?>
11
-			&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
11
+			&nbsp;<?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?>
12 12
 		</label>
13 13
 		<?php
14 14
 	}
15 15
 
16
-	function render_setting( $override_input = NULL ) {
16
+	function render_setting($override_input = NULL) {
17 17
 
18
-		if( $this->get_field_left_label() ) { ?>
18
+		if ($this->get_field_left_label()) { ?>
19 19
 
20 20
 			<td scope="row">
21 21
 				<label for="<?php echo $this->get_field_id(); ?>">
22
-					<?php echo $this->get_field_left_label() . $this->get_tooltip(); ?>
22
+					<?php echo $this->get_field_left_label().$this->get_tooltip(); ?>
23 23
 				</label>
24 24
 			</td>
25 25
 			<td>
26 26
 				<label>
27
-				<?php $this->render_input( $override_input ); ?>
28
-				&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
27
+				<?php $this->render_input($override_input); ?>
28
+				&nbsp;<?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?>
29 29
 				</label>
30 30
 			</td>
31 31
 
@@ -33,23 +33,23 @@  discard block
 block discarded – undo
33 33
 
34 34
 			<td scope="row" colspan="2">
35 35
 				<label for="<?php echo $this->get_field_id(); ?>">
36
-					<?php $this->render_input( $override_input ); ?>
37
-					&nbsp;<?php echo $this->get_field_label() . $this->get_tooltip() . $this->get_field_desc(); ?>
36
+					<?php $this->render_input($override_input); ?>
37
+					&nbsp;<?php echo $this->get_field_label().$this->get_tooltip().$this->get_field_desc(); ?>
38 38
 				</label>
39 39
 			</td>
40 40
 
41 41
 		<?php }
42 42
 	}
43 43
 
44
-	function render_input( $override_input = NULL ) {
45
-		if( isset( $override_input ) ) {
44
+	function render_input($override_input = NULL) {
45
+		if (isset($override_input)) {
46 46
 			echo $override_input;
47 47
 			return;
48 48
 		}
49 49
 
50 50
 		?>
51
-		<input name="<?php echo esc_attr( $this->name ); ?>" type="hidden" value="0" />
52
-       	<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="checkbox" value="1" <?php checked( $this->value, '1', true ); ?> />
51
+		<input name="<?php echo esc_attr($this->name); ?>" type="hidden" value="0" />
52
+       	<input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" type="checkbox" value="1" <?php checked($this->value, '1', true); ?> />
53 53
        	<?php
54 54
 	}
55 55
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_hidden.php 2 patches
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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 		$this->render_input();
9 9
 	}
10 10
 
11
-	function render_input( $override_input = null ) {
11
+	function render_input($override_input = null) {
12 12
 
13
-		if( isset( $override_input ) ) {
13
+		if (isset($override_input)) {
14 14
 			echo $override_input;
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
-		<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 ); ?>" />
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); ?>" />
22 22
 		<?php
23 23
 	}
24 24
 
Please login to merge, or discard this patch.
includes/admin/field-types/type_number.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
  * number input type
4 4
  */
5 5
 
6
-if( !class_exists('GravityView_FieldType_text') ) {
7
-	include_once( GRAVITYVIEW_DIR . 'includes/admin/field-types/type_text.php' );
6
+if (!class_exists('GravityView_FieldType_text')) {
7
+	include_once(GRAVITYVIEW_DIR.'includes/admin/field-types/type_text.php');
8 8
 }
9 9
 class GravityView_FieldType_number extends GravityView_FieldType_text {
10 10
 
11
-	function render_input( $override_input = null ) {
12
-		if( isset( $override_input ) ) {
11
+	function render_input($override_input = null) {
12
+		if (isset($override_input)) {
13 13
 			echo $override_input;
14 14
 			return;
15 15
 		}
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 
19 19
 		$show_mt = $this->show_merge_tags();
20 20
 
21
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
21
+        if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') {
22 22
             $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
23 23
         }
24
-        $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
24
+        $class .= !empty($this->field['class']) ? $this->field['class'] : 'widefat';
25 25
 
26 26
 		?>
27
-		<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="number" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>">
27
+		<input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" type="number" value="<?php echo esc_attr($this->value); ?>" class="<?php echo esc_attr($class); ?>">
28 28
 		<?php
29 29
 	}
30 30
 
Please login to merge, or discard this 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_radio.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
 
19 19
 	}
20 20
 
21
-	function render_input( $override_input = null ) {
22
-		if( isset( $override_input ) ) {
21
+	function render_input($override_input = null) {
22
+		if (isset($override_input)) {
23 23
 			echo $override_input;
24 24
 			return;
25 25
 		}
26 26
 
27
-		foreach( $this->field['options'] as $value => $label ) : ?>
27
+		foreach ($this->field['options'] as $value => $label) : ?>
28 28
 		<label class="<?php echo $this->get_label_class(); ?>">
29
-			<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr( $value ); ?>" type="radio" value="<?php echo esc_attr( $value ); ?>" <?php checked( $value, $this->value, true ); ?> />&nbsp;<?php echo esc_html( $label ); ?>
29
+			<input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr($value); ?>" type="radio" value="<?php echo esc_attr($value); ?>" <?php checked($value, $this->value, true); ?> />&nbsp;<?php echo esc_html($label); ?>
30 30
 		</label>
31 31
 <?php
32 32
 		endforeach;
Please login to merge, or discard this patch.
includes/admin/field-types/type_select.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 			echo '<span class="gv-label">'.$this->get_field_label().'</span>';
12 12
 
13
-			echo $this->get_tooltip() . $this->get_field_desc();
13
+			echo $this->get_tooltip().$this->get_field_desc();
14 14
 
15 15
 			$this->render_input();
16 16
 
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 		<?php
20 20
 	}
21 21
 
22
-	function render_input( $override_input = null ) {
23
-		if( isset( $override_input ) ) {
22
+	function render_input($override_input = null) {
23
+		if (isset($override_input)) {
24 24
 			echo $override_input;
25 25
 			return;
26 26
 		}
27 27
 		?>
28
-		<select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>">
29
-			<?php foreach( $this->field['options'] as $value => $label ) : ?>
30
-				<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option>
28
+		<select name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>">
29
+			<?php foreach ($this->field['options'] as $value => $label) : ?>
30
+				<option value="<?php echo esc_attr($value); ?>" <?php selected($value, $this->value, true); ?>><?php echo esc_html($label); ?></option>
31 31
 			<?php endforeach; ?>
32 32
 		</select>
33 33
 		<?php
Please login to merge, or discard this patch.
includes/admin/field-types/type_text.php 2 patches
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.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 		<label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php
10 10
 
11 11
 			echo '<span class="gv-label">'.$this->get_field_label().'</span>';
12
-			echo $this->get_tooltip() . $this->get_field_desc();
12
+			echo $this->get_tooltip().$this->get_field_desc();
13 13
 		?><div>
14 14
 				<?php $this->render_input(); ?>
15 15
 			</div>
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 		<?php
18 18
 	}
19 19
 
20
-	function render_input( $override_input = null ) {
20
+	function render_input($override_input = null) {
21 21
 
22
-		if( isset( $override_input ) ) {
22
+		if (isset($override_input)) {
23 23
 			echo $override_input;
24 24
 			return;
25 25
 		}
@@ -28,13 +28,13 @@  discard block
 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' ) {
31
+        if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') {
32 32
             $class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
33 33
         }
34
-        $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
34
+        $class .= !empty($this->field['class']) ? $this->field['class'] : 'widefat';
35 35
 
36 36
 		?>
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 ); ?>">
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); ?>">
38 38
 		<?php
39 39
 	}
40 40
 
Please login to merge, or discard this patch.