Completed
Pull Request — develop (#1492)
by Zack
26:46 queued 07:49
created
includes/admin/field-types/type_hidden.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 			return;
16 16
 		}
17 17
 
18
-        $class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
18
+		$class = !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat';
19 19
 
20 20
 		?>
21 21
 		<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="hidden" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>" />
Please login to merge, or discard this patch.
includes/class-admin-welcome.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly
15
-if ( ! defined( 'ABSPATH' ) ) exit;
15
+if ( ! defined( 'ABSPATH' ) ) {
16
+	exit;
17
+}
16 18
 
17 19
 /**
18 20
  * GravityView_Welcome Class
Please login to merge, or discard this patch.
includes/class-gravityview-image.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	var $style = NULL;
24 24
 
25 25
 	/**
26
- 	 * String representing size of image - Choose from "full", "medium", "thumb", "tiny"
26
+	 * String representing size of image - Choose from "full", "medium", "thumb", "tiny"
27 27
 	 * @var string
28 28
 	 */
29 29
 	var $size = NULL;
Please login to merge, or discard this patch.
includes/class-gravityview-migrate.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,8 +180,8 @@
 block discarded – undo
180 180
 
181 181
 					// check widget settings:
182 182
 					//  [search_free] => 1
183
-			        //  [search_date] => 1
184
-			        $search_generic = array();
183
+					//  [search_date] => 1
184
+					$search_generic = array();
185 185
 					if( !empty( $widget['search_free'] ) ) {
186 186
 						$search_generic[] = array( 'field' => 'search_all', 'input' => 'input_text' );
187 187
 					}
Please login to merge, or discard this patch.
includes/class-gravityview-roles-capabilities.php 1 patch
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		add_filter( 'members_get_capabilities', array( 'GravityView_Roles_Capabilities', 'merge_with_all_caps' ) );
57 57
 		add_action( 'members_register_cap_groups', array( $this, 'members_register_cap_group' ), 20 );
58 58
 		add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 10, 4 );
59
-        add_action( 'admin_init', array( $this, 'add_caps') );
59
+		add_action( 'admin_init', array( $this, 'add_caps') );
60 60
 	}
61 61
 
62 62
 
@@ -360,7 +360,6 @@  discard block
 block discarded – undo
360 360
 	 * Add Gravity Forms and GravityView's "full access" caps when any other caps are checked against.
361 361
 	 *
362 362
 	 * @since 1.15
363
-
364 363
 	 * @param array $caps_to_check
365 364
 	 *
366 365
 	 * @return array
Please login to merge, or discard this patch.
includes/helper-functions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
 		! isset( $value ) // If it's not set, it's empty!
308 308
 		|| false === $value
309 309
 		|| null === $value
310
-	    || '' === $value // Empty string
310
+		|| '' === $value // Empty string
311 311
 		|| array() === $value // Empty array
312 312
 		|| ( is_object( $value ) && ! get_object_vars( $value ) ) // Empty object
313 313
 	) {
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-time.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,6 @@
 block discarded – undo
255 255
 	 * Get the default date format for a field based on the field ID and the time format setting
256 256
 	 *
257 257
 	 * @since 1.14
258
-
259 258
 	 * @param string $time_format The time format ("12" or "24"). Default: "12" {@since 1.14}
260 259
 	 * @param int $field_id The ID of the field. Used to figure out full time/hours/minutes/am/pm {@since 1.14}
261 260
 	 *
Please login to merge, or discard this patch.
includes/class-admin-views.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 	 *
271 271
 	 * @return void
272 272
 	 */
273
-	public function add_custom_column_content( $column_name = NULL, $post_id )	{
273
+	public function add_custom_column_content( $column_name = NULL, $post_id ) {
274 274
 
275 275
 		$output = '';
276 276
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	 */
430 430
 	function save_postdata( $post_id ) {
431 431
 
432
-		if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){
432
+		if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
433 433
 			return;
434 434
 		}
435 435
 
Please login to merge, or discard this patch.
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -62,28 +62,28 @@  discard block
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	/**
65
-     * When on the Add/Edit View screen, suggest most popular articles related to that
66
-     *
65
+	 * When on the Add/Edit View screen, suggest most popular articles related to that
66
+	 *
67 67
 	 * @param array $localization_data Data to be passed to the Support Port JS
68 68
 	 *
69 69
 	 * @return array
70 70
 	 */
71 71
 	function suggest_support_articles( $localization_data = array() ) {
72 72
 
73
-	    if( ! gravityview()->request->is_view() ) {
74
-	        return $localization_data;
75
-        }
73
+		if( ! gravityview()->request->is_view() ) {
74
+			return $localization_data;
75
+		}
76 76
 
77 77
 		$localization_data['suggest'] = array(
78
-            '57ef23539033602e61d4a560',
79
-            '54c67bb9e4b0512429885513',
80
-            '54c67bb9e4b0512429885512',
81
-            '54c67bbbe4b07997ea3f3f6b',
82
-            '54d1a33ae4b086c0c0964ce9',
83
-            '57ef253c9033602e61d4a563',
84
-            '552355bfe4b0221aadf2572b',
85
-            '54c67bcde4b051242988553e',
86
-        );
78
+			'57ef23539033602e61d4a560',
79
+			'54c67bb9e4b0512429885513',
80
+			'54c67bb9e4b0512429885512',
81
+			'54c67bbbe4b07997ea3f3f6b',
82
+			'54d1a33ae4b086c0c0964ce9',
83
+			'57ef253c9033602e61d4a563',
84
+			'552355bfe4b0221aadf2572b',
85
+			'54c67bcde4b051242988553e',
86
+		);
87 87
 
88 88
 		return $localization_data;
89 89
 	}
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 
230 230
 		if( 'form_list' === GFForms::get_page() ) {
231 231
 			$priority = 790;
232
-        }
232
+		}
233 233
 
234 234
 		if( empty( $connected_views ) ) {
235 235
 
236
-		    $menu_items['gravityview'] = array(
236
+			$menu_items['gravityview'] = array(
237 237
 				'label'          => esc_attr__( 'Create a View', 'gravityview' ),
238 238
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>',
239 239
 				'title'          => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
 		// If there were no items added, then let's create the parent menu
265 265
 		if( $sub_menu_items ) {
266 266
 
267
-		    $sub_menu_items[] = array(
268
-			    'label' => esc_attr__( 'Create a View', 'gravityview' ),
269
-                'link_class' => 'gv-create-view',
270
-			    'icon' => '<i>&nbsp;+&nbsp;</i>',
271
-			    'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
272
-			    'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
273
-			    'capabilities'   => array( 'edit_gravityviews' ),
274
-            );
267
+			$sub_menu_items[] = array(
268
+				'label' => esc_attr__( 'Create a View', 'gravityview' ),
269
+				'link_class' => 'gv-create-view',
270
+				'icon' => '<i>&nbsp;+&nbsp;</i>',
271
+				'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
272
+				'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
273
+				'capabilities'   => array( 'edit_gravityviews' ),
274
+			);
275 275
 
276 276
 
277 277
 			/**
@@ -681,16 +681,16 @@  discard block
 block discarded – undo
681 681
 	/**
682 682
 	 * Render html for displaying available fields based on a Form ID
683 683
 	 *
684
-     * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
684
+	 * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
685 685
 	 *
686 686
 	 * @param int $form Gravity Forms Form ID (default: '')
687 687
 	 * @param string $context (default: 'single')
688
-     *
688
+	 *
689 689
 	 * @return void
690 690
 	 */
691 691
 	function render_available_fields( $form = 0, $context = 'single' ) {
692 692
 
693
-	    // Determine if form is a preset and convert it to an array with fields
693
+		// Determine if form is a preset and convert it to an array with fields
694 694
 		$form = ( is_string( $form ) && preg_match( '/^preset_/', $form ) ) ? GravityView_Ajax::pre_get_form_fields( $form ) : $form;
695 695
 
696 696
 		/**
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 
703 703
 		if ( ! is_array( $blacklist_field_types ) ) {
704 704
 
705
-		    gravityview()->log->error( '$blacklist_field_types is not an array', array( 'data' => print_r( $blacklist_field_types, true ) ) );
705
+			gravityview()->log->error( '$blacklist_field_types is not an array', array( 'data' => print_r( $blacklist_field_types, true ) ) );
706 706
 
707 707
 			$blacklist_field_types = array();
708 708
 		}
@@ -959,9 +959,9 @@  discard block
 block discarded – undo
959 959
 
960 960
 				$joined_forms = gravityview_get_joined_forms( $post->ID );
961 961
 
962
-                foreach ( $joined_forms as $form ) {
963
-                    $available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
964
-                }
962
+				foreach ( $joined_forms as $form ) {
963
+					$available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
964
+				}
965 965
 			} else {
966 966
 				$available_items[ $form ] = \GV\Widget::registered();
967 967
 			}
@@ -1000,9 +1000,9 @@  discard block
 block discarded – undo
1000 1000
 
1001 1001
 										if ( $form_id ) {
1002 1002
 											$original_item = isset( $available_items[ $form_id ] [ $field['id'] ] ) ? $available_items[ $form_id ] [ $field['id'] ] : false ;
1003
-                                        } else {
1003
+										} else {
1004 1004
 											$original_item = isset( $available_items[ $field['id'] ] ) ? $available_items[ $field['id'] ] : false ;
1005
-                                        }
1005
+										}
1006 1006
 
1007 1007
 										if ( !$original_item ) {
1008 1008
 											gravityview()->log->error( 'An item was not available when rendering the output; maybe it was added by a plugin that is now de-activated.', array(' data' => array('available_items' => $available_items, 'field' => $field ) ) );
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
 		}
1253 1253
 
1254 1254
 		// Add the GV font (with the Astronaut)
1255
-        wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1255
+		wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1256 1256
 		wp_register_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array( 'dashicons', 'wp-jquery-ui-dialog' ), \GV\Plugin::$version );
1257 1257
 
1258 1258
 		wp_register_script( 'gravityview-jquery-cookie', plugins_url('assets/lib/jquery.cookie/jquery.cookie.min.js', GRAVITYVIEW_FILE), array( 'jquery' ), \GV\Plugin::$version, true );
@@ -1260,43 +1260,43 @@  discard block
 block discarded – undo
1260 1260
 		if( GFForms::get_page() === 'form_list' ) {
1261 1261
 			wp_enqueue_style( 'gravityview_views_styles' );
1262 1262
 			return;
1263
-        }
1263
+		}
1264 1264
 
1265 1265
 		// Don't process any scripts below here if it's not a GravityView page.
1266 1266
 		if( ! gravityview()->request->is_admin( $hook, 'single' ) && ! $is_widgets_page ) {
1267
-		    return;
1267
+			return;
1268 1268
 		}
1269 1269
 
1270
-        wp_enqueue_script( 'jquery-ui-datepicker' );
1271
-        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1272
-
1273
-        // Enqueue scripts
1274
-        wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), \GV\Plugin::$version );
1275
-
1276
-        wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1277
-            'cookiepath' => COOKIEPATH,
1278
-            'admin_cookiepath' => ADMIN_COOKIE_PATH,
1279
-            'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1280
-            'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1281
-            'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1282
-            'label_reorder_search_fields' => __( 'Reorder Search Fields', 'gravityview' ),
1283
-            'label_add_search_field' => __( 'Add Search Field', 'gravityview' ),
1284
-            'label_remove_search_field' => __( 'Remove Search Field', 'gravityview' ),
1285
-            'label_close' => __( 'Close', 'gravityview' ),
1286
-            'label_cancel' => __( 'Cancel', 'gravityview' ),
1287
-            'label_continue' => __( 'Continue', 'gravityview' ),
1288
-            'label_ok' => __( 'Ok', 'gravityview' ),
1289
-            'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1290
-            'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1291
-            'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1292
-            'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1293
-            'remove_all_fields' => __( 'Would you like to remove all fields in this zone?', 'gravityview' ),
1294
-        ));
1270
+		wp_enqueue_script( 'jquery-ui-datepicker' );
1271
+		wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1272
+
1273
+		// Enqueue scripts
1274
+		wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), \GV\Plugin::$version );
1275
+
1276
+		wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1277
+			'cookiepath' => COOKIEPATH,
1278
+			'admin_cookiepath' => ADMIN_COOKIE_PATH,
1279
+			'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1280
+			'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1281
+			'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1282
+			'label_reorder_search_fields' => __( 'Reorder Search Fields', 'gravityview' ),
1283
+			'label_add_search_field' => __( 'Add Search Field', 'gravityview' ),
1284
+			'label_remove_search_field' => __( 'Remove Search Field', 'gravityview' ),
1285
+			'label_close' => __( 'Close', 'gravityview' ),
1286
+			'label_cancel' => __( 'Cancel', 'gravityview' ),
1287
+			'label_continue' => __( 'Continue', 'gravityview' ),
1288
+			'label_ok' => __( 'Ok', 'gravityview' ),
1289
+			'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1290
+			'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1291
+			'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1292
+			'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1293
+			'remove_all_fields' => __( 'Would you like to remove all fields in this zone?', 'gravityview' ),
1294
+		));
1295 1295
 
1296 1296
 		wp_enqueue_style( 'gravityview_views_styles' );
1297 1297
 
1298
-        // Enqueue scripts needed for merge tags
1299
-        self::enqueue_gravity_forms_scripts();
1298
+		// Enqueue scripts needed for merge tags
1299
+		self::enqueue_gravity_forms_scripts();
1300 1300
 
1301 1301
 		// 2.5 changed how Merge Tags are enqueued
1302 1302
 		if ( is_callable( array( 'GFCommon', 'output_hooks_javascript') ) ) {
@@ -1306,24 +1306,24 @@  discard block
 block discarded – undo
1306 1306
 
1307 1307
 	/**
1308 1308
 	 * Enqueue Gravity Forms scripts, needed for Merge Tags
1309
-     *
1310
-     * @since 1.0.5-beta
1311
-     *
1312
-     * @return void
1309
+	 *
1310
+	 * @since 1.0.5-beta
1311
+	 *
1312
+	 * @return void
1313 1313
 	 */
1314 1314
 	static function enqueue_gravity_forms_scripts() {
1315 1315
 		GFForms::register_scripts();
1316 1316
 
1317 1317
 		$scripts = array(
1318
-		    'sack',
1319
-		    'gform_gravityforms',
1320
-		    'gform_forms',
1321
-		    'gform_form_admin',
1322
-		    'jquery-ui-autocomplete'
1318
+			'sack',
1319
+			'gform_gravityforms',
1320
+			'gform_forms',
1321
+			'gform_form_admin',
1322
+			'jquery-ui-autocomplete'
1323 1323
 		);
1324 1324
 
1325 1325
 		if ( wp_is_mobile() ) {
1326
-		    $scripts[] = 'jquery-touch-punch';
1326
+			$scripts[] = 'jquery-touch-punch';
1327 1327
 		}
1328 1328
 
1329 1329
 		wp_enqueue_script( $scripts );
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-phone.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
 		}
41 41
 
42 42
 		$field_options['link_phone'] = array(
43
-	        'type' => 'checkbox',
44
-	        'label' => __( 'Make Phone Number Clickable', 'gravityview' ),
45
-	        'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'),
46
-	        'value' => true,
47
-        );
43
+			'type' => 'checkbox',
44
+			'label' => __( 'Make Phone Number Clickable', 'gravityview' ),
45
+			'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'),
46
+			'value' => true,
47
+		);
48 48
 
49 49
 		return $field_options;
50 50
 	}
Please login to merge, or discard this patch.