Completed
Branch master (3ac4b1)
by Zack
04:30
created
includes/admin/class.render.settings.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -414,7 +414,6 @@  discard block
 block discarded – undo
414 414
 	 * Render the HTML for an input text to be used on the field & widgets options
415 415
 	 * @param  string $name    Unique name of the field. Exampe: `fields[directory_list-title][5374ff6ab128b][custom_label]`
416 416
 	 * @param  string $current [current value]
417
-	 * @param  string $desc   Option description
418 417
 	 * @param string $add_merge_tags Add merge tags to the input?
419 418
 	 * @return string         [html tags]
420 419
 	 */
@@ -444,7 +443,6 @@  discard block
 block discarded – undo
444 443
 	 * Render the HTML for an textarea input to be used on the field & widgets options
445 444
 	 * @param  string $name    Unique name of the field. Exampe: `fields[directory_list-title][5374ff6ab128b][custom_label]`
446 445
 	 * @param  string $current [current value]
447
-	 * @param  string $desc   Option description
448 446
 	 * @param string $add_merge_tags Add merge tags to the input?
449 447
 	 * @return string         [html tags]
450 448
 	 */
Please login to merge, or discard this patch.
includes/admin/metaboxes/class-gravityview-admin-metaboxes.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	/**
215 215
 	 * Generate the script tags necessary for the Gravity Forms Merge Tag picker to work.
216 216
 	 *
217
-	 * @param  mixed      $curr_form Form ID
217
+	 * @param  string      $curr_form Form ID
218 218
 	 * @return null|string     Merge tags html; NULL if $curr_form isn't defined.
219 219
 	 */
220 220
 	public static function render_merge_tags_scripts( $curr_form ) {
@@ -290,7 +290,6 @@  discard block
 block discarded – undo
290 290
 	 * Render shortcode hint in the Publish metabox
291 291
 	 *
292 292
 	 * @access public
293
-	 * @param object $post
294 293
 	 * @return void
295 294
 	 */
296 295
 	function render_shortcode_hint() {
Please login to merge, or discard this 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/class-gravityview-metabox-tab.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 	 * @param string $icon_class_name Icon class used in vertical tabs. Supports non-dashicon. If dashicons, no need for `dashicons ` prefix
96 96
 	 * @param string $callback Function to render the metabox, if $file is not defined.
97 97
 	 * @param null $callback_args Arguments passed to the callback
98
-	 * @return void
98
+	 * @return GravityView_Metabox_Tab
99 99
 	 */
100 100
 	function __construct( $id, $title = '', $file = '', $icon_class_name = '', $callback = '', $callback_args = null  ) {
101 101
 
Please login to merge, or discard this patch.
includes/class-admin-add-shortcode.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,6 @@
 block discarded – undo
144 144
 	 * Enqueue scripts and styles
145 145
 	 *
146 146
 	 * @access public
147
-	 * @param mixed $hook
148 147
 	 * @return void
149 148
 	 */
150 149
 	function add_scripts_and_styles() {
Please login to merge, or discard this 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 2 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 *
171 171
 	 * @uses  GravityView_frontend::get_search_criteria() Convert the $_POST search request into a properly formatted request.
172 172
 	 * @access public
173
-	 * @return void|boolean
173
+	 * @return null|false
174 174
 	 */
175 175
 	public function process_bulk_action() {
176 176
 		if ( ! class_exists( 'RGForms' ) ) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	 * @param array|boolean $entries If array, array of entry IDs that are to be updated. If true: update all entries.
253 253
 	 * @param int $approved Approved status. If `0`: unapproved, if not empty, `Approved`
254 254
 	 * @param int $form_id The Gravity Forms Form ID
255
-	 * @return boolean|void
255
+	 * @return false|null
256 256
 	 */
257 257
 	private static function update_bulk( $entries, $approved, $form_id ) {
258 258
 
@@ -284,7 +284,6 @@  discard block
 block discarded – undo
284 284
 	 *
285 285
 	 * @access public
286 286
 	 * @static
287
-	 * @param int $lead_id (default: 0)
288 287
 	 * @param int $approved (default: 0)
289 288
 	 * @param int $form_id (default: 0)
290 289
 	 * @param int $approvedcolumn (default: 0)
@@ -470,7 +469,7 @@  discard block
 block discarded – undo
470 469
 	 * @access public
471 470
 	 * @static
472 471
 	 * @param mixed $form GF Form or Form ID
473
-	 * @return false|null|string Returns the input ID of the approved field. Returns NULL if no approved fields were found. Returns false if $form_id wasn't set.
472
+	 * @return integer Returns the input ID of the approved field. Returns NULL if no approved fields were found. Returns false if $form_id wasn't set.
474 473
 	 */
475 474
 	static public function get_approved_column( $form ) {
476 475
 
Please login to merge, or discard this 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 2 patches
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
 	/**
328 328
 	 * Get HTML links relating to a connected form, like Edit, Entries, Settings, Preview
329
-	 * @param  array|int $form_id Gravity Forms forms array, or the form ID
329
+	 * @param  array|int $form Gravity Forms forms array, or the form ID
330 330
 	 * @param  boolean $include_form_link Whether to include the bold name of the form in the output
331 331
 	 * @return string          HTML links
332 332
 	 */
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 	 * $blacklist_field_types - contains the field types which are not proper to be shown in a directory.
548 548
 	 *
549 549
 	 * @access public
550
-	 * @param int $form_id Gravity Forms Form ID (default: '')
550
+	 * @param int $form Gravity Forms Form ID (default: '')
551 551
 	 * @param string $context (default: 'single')
552 552
 	 * @return void
553 553
 	 */
@@ -592,6 +592,10 @@  discard block
 block discarded – undo
592 592
 		$this->render_additional_fields( $form, $context );
593 593
 	}
594 594
 
595
+	/**
596
+	 * @param string $form
597
+	 * @param string $context
598
+	 */
595 599
 	function render_additional_fields( $form, $context ) {
596 600
 
597 601
 		/**
@@ -790,6 +794,7 @@  discard block
 block discarded – undo
790 794
 	 * @param  string $zone   Either 'single', 'directory', 'header', 'footer'
791 795
 	 * @param  array $rows    The layout structure: rows, columns and areas
792 796
 	 * @param  array $values  Saved objects
797
+	 * @param string $template_id
793 798
 	 * @return void
794 799
 	 */
795 800
 	function render_active_areas( $template_id, $type, $zone, $rows, $values ) {
Please login to merge, or discard this 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 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 * Remove any style or script non-registered in the no conflict mode
312 312
 	 * @todo  Move this to GravityView_Admin_Views
313 313
 	 * @param  WP_Dependencies $wp_objects        Object of WP_Styles or WP_Scripts
314
-	 * @param  array $required_objects   List of registered script/style handles
314
+	 * @param  string[] $required_objects   List of registered script/style handles
315 315
 	 * @param  string $type              Either 'styles' or 'scripts'
316 316
 	 * @return void
317 317
 	 */
@@ -472,6 +472,9 @@  discard block
 block discarded – undo
472 472
 
473 473
 new GravityView_Admin;
474 474
 
475
+/**
476
+ * @param string $page
477
+ */
475 478
 function gravityview_is_admin_page($hook = '', $page = NULL) {
476 479
 	return GravityView_Admin::is_admin_page( $hook, $page );
477 480
 }
Please login to merge, or discard this 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.
includes/class-ajax.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @since 1.15
29 29
 	 * @param bool|false $mixed
30 30
 	 *
31
-	 * @return bool
31
+	 * @return boolean|null
32 32
 	 */
33 33
 	private function _exit( $mixed = NULL ) {
34 34
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * Import Gravity Form XML or JSON
201 201
 	 *
202 202
 	 * @param  string $xml_or_json_path Path to form XML or JSON file
203
-	 * @return int|bool       Imported form ID or false
203
+	 * @return false|string       Imported form ID or false
204 204
 	 */
205 205
 	function import_form( $xml_or_json_path = '' ) {
206 206
 
Please login to merge, or discard this patch.
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
 		// template areas
138 138
 		$template_areas_directory = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'directory' );
139
-        $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' );
139
+		$template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' );
140 140
 
141 141
 		// widget areas
142 142
 		$default_widget_areas = GravityView_Plugin::get_default_widget_areas();
@@ -328,40 +328,40 @@  discard block
 block discarded – undo
328 328
 		// load file
329 329
 		$xmlstr = file_get_contents( $form_file );
330 330
 
331
-        $options = array(
332
-            "page" => array("unserialize_as_array" => true),
333
-            "form"=> array("unserialize_as_array" => true),
334
-            "field"=> array("unserialize_as_array" => true),
335
-            "rule"=> array("unserialize_as_array" => true),
336
-            "choice"=> array("unserialize_as_array" => true),
337
-            "input"=> array("unserialize_as_array" => true),
338
-            "routing_item"=> array("unserialize_as_array" => true),
339
-            "creditCard"=> array("unserialize_as_array" => true),
340
-            "routin"=> array("unserialize_as_array" => true),
341
-            "confirmation" => array("unserialize_as_array" => true),
342
-            "notification" => array("unserialize_as_array" => true)
343
-        );
331
+		$options = array(
332
+			"page" => array("unserialize_as_array" => true),
333
+			"form"=> array("unserialize_as_array" => true),
334
+			"field"=> array("unserialize_as_array" => true),
335
+			"rule"=> array("unserialize_as_array" => true),
336
+			"choice"=> array("unserialize_as_array" => true),
337
+			"input"=> array("unserialize_as_array" => true),
338
+			"routing_item"=> array("unserialize_as_array" => true),
339
+			"creditCard"=> array("unserialize_as_array" => true),
340
+			"routin"=> array("unserialize_as_array" => true),
341
+			"confirmation" => array("unserialize_as_array" => true),
342
+			"notification" => array("unserialize_as_array" => true)
343
+		);
344 344
 
345 345
 		$xml = new RGXML($options);
346
-        $forms = $xml->unserialize($xmlstr);
346
+		$forms = $xml->unserialize($xmlstr);
347 347
 
348
-        if( !$forms ) {
349
-        	do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file );
350
-        	return false;
351
-        }
348
+		if( !$forms ) {
349
+			do_action( 'gravityview_log_error', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. Error importing file. (File)', $form_file );
350
+			return false;
351
+		}
352 352
 
353
-        if( !empty( $forms[0] ) && is_array( $forms[0] ) ) {
354
-        	$form = $forms[0];
355
-        }
353
+		if( !empty( $forms[0] ) && is_array( $forms[0] ) ) {
354
+			$form = $forms[0];
355
+		}
356 356
 
357
-        if( empty( $form ) ) {
358
-        	do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms );
359
-        	return false;
360
-        }
357
+		if( empty( $form ) ) {
358
+			do_action( 'gravityview_log_error', '[pre_get_available_fields] $form not set.', $forms );
359
+			return false;
360
+		}
361 361
 
362
-        do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form );
362
+		do_action( 'gravityview_log_debug', '[pre_get_available_fields] Importing Form Fields for preset ['. $template_id .']. (Form)', $form );
363 363
 
364
-        return $form;
364
+		return $form;
365 365
 
366 366
 	}
367 367
 
Please login to merge, or discard this patch.
includes/class-api.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,7 +108,6 @@  discard block
 block discarded – undo
108 108
 	 *
109 109
 	 * @since 1.9
110 110
 	 *
111
-	 * @param array $field_setting Array of settings for the field
112 111
 	 * @param string $format Format for width. "%" (default) will return
113 112
 	 *
114 113
 	 * @return string|null If not empty, string in $format format. Otherwise, null.
@@ -214,7 +213,6 @@  discard block
 block discarded – undo
214 213
 	 *
215 214
 	 * @access public
216 215
 	 * @param array $entry
217
-	 * @param integer $field
218 216
 	 * @return null|string
219 217
 	 */
220 218
 	public static function field_value( $entry, $field_settings, $format = 'html' ) {
@@ -967,7 +965,7 @@  discard block
 block discarded – undo
967 965
  * Get the current View ID being rendered
968 966
  *
969 967
  * @global GravityView_View $gravityview_view
970
- * @return string View context "directory" or "single"
968
+ * @return integer View context "directory" or "single"
971 969
  */
972 970
 function gravityview_get_view_id() {
973 971
 	return GravityView_View::getInstance()->getViewId();
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -146,20 +146,20 @@  discard block
 block discarded – undo
146 146
 
147 147
 		if( !empty( $field['custom_class'] ) ) {
148 148
 
149
-            $custom_class = $field['custom_class'];
149
+			$custom_class = $field['custom_class'];
150 150
 
151
-            if( !empty( $entry ) ) {
151
+			if( !empty( $entry ) ) {
152 152
 
153
-                // We want the merge tag to be formatted as a class. The merge tag may be
154
-                // replaced by a multiple-word value that should be output as a single class.
155
-                // "Office Manager" will be formatted as `.OfficeManager`, not `.Office` and `.Manager`
156
-                add_filter('gform_merge_tag_filter', 'sanitize_html_class');
153
+				// We want the merge tag to be formatted as a class. The merge tag may be
154
+				// replaced by a multiple-word value that should be output as a single class.
155
+				// "Office Manager" will be formatted as `.OfficeManager`, not `.Office` and `.Manager`
156
+				add_filter('gform_merge_tag_filter', 'sanitize_html_class');
157 157
 
158
-                $custom_class = self::replace_variables( $custom_class, $form, $entry);
158
+				$custom_class = self::replace_variables( $custom_class, $form, $entry);
159 159
 
160
-                // And then we want life to return to normal
161
-                remove_filter('gform_merge_tag_filter', 'sanitize_html_class');
162
-            }
160
+				// And then we want life to return to normal
161
+				remove_filter('gform_merge_tag_filter', 'sanitize_html_class');
162
+			}
163 163
 
164 164
 			// And now we want the spaces to be handled nicely.
165 165
 			$classes[] = gravityview_sanitize_html_class( $custom_class );
@@ -591,29 +591,29 @@  discard block
 block discarded – undo
591 591
 		return sanitize_title( $slug );
592 592
 	}
593 593
 
594
-    /**
595
-     * If using the entry custom slug feature, make sure the new entries have the custom slug created and saved as meta
596
-     *
597
-     * Triggered by add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
598
-     *
599
-     * @param $entry array Gravity Forms entry object
600
-     * @param $form array Gravity Forms form object
601
-     */
602
-    public static function entry_create_custom_slug( $entry, $form ) {
603
-        /**
604
-         * @filter `gravityview_custom_entry_slug` On entry creation, check if we are using the custom entry slug feature and update the meta
605
-         * @param boolean $custom Should we process the custom entry slug?
606
-         */
607
-        $custom = apply_filters( 'gravityview_custom_entry_slug', false );
608
-        if( $custom ) {
609
-            // create the gravityview_unique_id and save it
594
+	/**
595
+	 * If using the entry custom slug feature, make sure the new entries have the custom slug created and saved as meta
596
+	 *
597
+	 * Triggered by add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
598
+	 *
599
+	 * @param $entry array Gravity Forms entry object
600
+	 * @param $form array Gravity Forms form object
601
+	 */
602
+	public static function entry_create_custom_slug( $entry, $form ) {
603
+		/**
604
+		 * @filter `gravityview_custom_entry_slug` On entry creation, check if we are using the custom entry slug feature and update the meta
605
+		 * @param boolean $custom Should we process the custom entry slug?
606
+		 */
607
+		$custom = apply_filters( 'gravityview_custom_entry_slug', false );
608
+		if( $custom ) {
609
+			// create the gravityview_unique_id and save it
610 610
 
611
-            // Get the entry hash
612
-            $hash = self::get_custom_entry_slug( $entry['id'], $entry );
613
-            gform_update_meta( $entry['id'], 'gravityview_unique_id', $hash );
611
+			// Get the entry hash
612
+			$hash = self::get_custom_entry_slug( $entry['id'], $entry );
613
+			gform_update_meta( $entry['id'], 'gravityview_unique_id', $hash );
614 614
 
615
-        }
616
-    }
615
+		}
616
+	}
617 617
 
618 618
 
619 619
 
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
 			// If there was an error, continue to the next term.
853 853
 			if ( is_wp_error( $term_link ) ) {
854
-			    continue;
854
+				continue;
855 855
 			}
856 856
 
857 857
 			$output[] = gravityview_get_link( $term_link, esc_html( $term->name ) );
Please login to merge, or discard this patch.