Completed
Push — develop ( d9e08e...929e68 )
by Zack
19:14 queued 13s
created
includes/class-admin-views.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -93,28 +93,28 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 
95 95
 	/**
96
-     * When on the Add/Edit View screen, suggest most popular articles related to that
97
-     *
96
+	 * When on the Add/Edit View screen, suggest most popular articles related to that
97
+	 *
98 98
 	 * @param array $localization_data Data to be passed to the Support Port JS
99 99
 	 *
100 100
 	 * @return array
101 101
 	 */
102 102
 	function suggest_support_articles( $localization_data = array() ) {
103 103
 
104
-	    if( ! gravityview()->request->is_view( false ) ) {
105
-	        return $localization_data;
106
-        }
104
+		if( ! gravityview()->request->is_view( false ) ) {
105
+			return $localization_data;
106
+		}
107 107
 
108 108
 		$localization_data['suggest'] = array(
109
-            '57ef23539033602e61d4a560',
110
-            '54c67bb9e4b0512429885513',
111
-            '54c67bb9e4b0512429885512',
112
-            '54c67bbbe4b07997ea3f3f6b',
113
-            '54d1a33ae4b086c0c0964ce9',
114
-            '57ef253c9033602e61d4a563',
115
-            '552355bfe4b0221aadf2572b',
116
-            '54c67bcde4b051242988553e',
117
-        );
109
+			'57ef23539033602e61d4a560',
110
+			'54c67bb9e4b0512429885513',
111
+			'54c67bb9e4b0512429885512',
112
+			'54c67bbbe4b07997ea3f3f6b',
113
+			'54d1a33ae4b086c0c0964ce9',
114
+			'57ef253c9033602e61d4a563',
115
+			'552355bfe4b0221aadf2572b',
116
+			'54c67bcde4b051242988553e',
117
+		);
118 118
 
119 119
 		return $localization_data;
120 120
 	}
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
 
261 261
 		if( 'form_list' === GFForms::get_page() ) {
262 262
 			$priority = 790;
263
-        }
263
+		}
264 264
 
265 265
 		if( empty( $connected_views ) ) {
266 266
 
267
-		    $menu_items['gravityview'] = array(
267
+			$menu_items['gravityview'] = array(
268 268
 				'label'          => esc_attr__( 'Create a View', 'gk-gravityview' ),
269 269
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>', // Only appears in GF pre-2.5
270 270
 				'title'          => esc_attr__( 'Create a View using this form as a data source', 'gk-gravityview' ),
@@ -296,13 +296,13 @@  discard block
 block discarded – undo
296 296
 		// If there were no items added, then let's create the parent menu
297 297
 		if( $sub_menu_items ) {
298 298
 
299
-		    $sub_menu_items[] = array(
300
-			    'label' => esc_attr__( 'Create a View', 'gk-gravityview' ),
301
-			    'icon' => '<span class="dashicons dashicons-plus"></span>',
302
-			    'title' => esc_attr__( 'Create a View using this form as a data source', 'gk-gravityview' ),
303
-			    'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
304
-			    'capabilities'   => array( 'edit_gravityviews' ),
305
-            );
299
+			$sub_menu_items[] = array(
300
+				'label' => esc_attr__( 'Create a View', 'gk-gravityview' ),
301
+				'icon' => '<span class="dashicons dashicons-plus"></span>',
302
+				'title' => esc_attr__( 'Create a View using this form as a data source', 'gk-gravityview' ),
303
+				'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
304
+				'capabilities'   => array( 'edit_gravityviews' ),
305
+			);
306 306
 
307 307
 			// Make sure Gravity Forms uses the submenu; if there's only one item, it uses a link instead of a dropdown
308 308
 			$sub_menu_items[] = array(
@@ -699,11 +699,11 @@  discard block
 block discarded – undo
699 699
 	/**
700 700
 	 * Render html for displaying available fields based on a Form ID
701 701
 	 *
702
-     * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
702
+	 * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
703 703
 	 *
704 704
 	 * @param int|string $form_id Gravity Forms form ID. Default: 0.
705 705
 	 * @param string     $context (default: 'single')
706
-     *
706
+	 *
707 707
 	 * @return void
708 708
 	 */
709 709
 	function render_available_fields( $form_id = 0, $context = 'single' ) {
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 
725 725
 		if ( ! is_array( $blocklist_field_types ) ) {
726 726
 
727
-		    gravityview()->log->error( '$blocklist_field_types is not an array', array( 'data' => print_r( $blocklist_field_types, true ) ) );
727
+			gravityview()->log->error( '$blocklist_field_types is not an array', array( 'data' => print_r( $blocklist_field_types, true ) ) );
728 728
 
729 729
 			$blocklist_field_types = array();
730 730
 		}
@@ -1291,7 +1291,7 @@  discard block
 block discarded – undo
1291 1291
 		}
1292 1292
 
1293 1293
 		// Add the GV font (with the Astronaut)
1294
-        wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1294
+		wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), \GV\Plugin::$version );
1295 1295
 		wp_register_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array( 'dashicons', 'wp-jquery-ui-dialog' ), \GV\Plugin::$version );
1296 1296
 
1297 1297
 		wp_register_script( 'gravityview-jquery-cookie', plugins_url('assets/lib/jquery.cookie/jquery.cookie.min.js', GRAVITYVIEW_FILE), array( 'jquery' ), \GV\Plugin::$version, true );
@@ -1299,21 +1299,21 @@  discard block
 block discarded – undo
1299 1299
 		if( GFForms::get_page() === 'form_list' ) {
1300 1300
 			wp_enqueue_style( 'gravityview_views_styles' );
1301 1301
 			return;
1302
-        }
1302
+		}
1303 1303
 
1304 1304
 		// Don't process any scripts below here if it's not a GravityView page.
1305 1305
 		if( ! gravityview()->request->is_admin( $hook, 'single' ) && ! $is_widgets_page ) {
1306
-		    return;
1306
+			return;
1307 1307
 		}
1308 1308
 
1309 1309
 		wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
1310 1310
 
1311
-        wp_enqueue_script( 'jquery-ui-datepicker' );
1311
+		wp_enqueue_script( 'jquery-ui-datepicker' );
1312 1312
 
1313
-        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1313
+		wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), \GV\Plugin::$version );
1314 1314
 
1315
-        // Enqueue scripts
1316
-        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 );
1315
+		// Enqueue scripts
1316
+		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 );
1317 1317
 
1318 1318
 		wp_localize_script( 'gravityview_views_scripts', 'gvGlobals', array(
1319 1319
 			'cookiepath'                  => COOKIEPATH,
@@ -1340,8 +1340,8 @@  discard block
 block discarded – undo
1340 1340
 			)
1341 1341
 		) );
1342 1342
 
1343
-        // Enqueue scripts needed for merge tags
1344
-        self::enqueue_gravity_forms_scripts();
1343
+		// Enqueue scripts needed for merge tags
1344
+		self::enqueue_gravity_forms_scripts();
1345 1345
 
1346 1346
 		wp_enqueue_style( 'gravityview_views_styles' );
1347 1347
 
@@ -1353,24 +1353,24 @@  discard block
 block discarded – undo
1353 1353
 
1354 1354
 	/**
1355 1355
 	 * Enqueue Gravity Forms scripts, needed for Merge Tags
1356
-     *
1357
-     * @since 1.0.5-beta
1358
-     *
1359
-     * @return void
1356
+	 *
1357
+	 * @since 1.0.5-beta
1358
+	 *
1359
+	 * @return void
1360 1360
 	 */
1361 1361
 	static function enqueue_gravity_forms_scripts() {
1362 1362
 		GFForms::register_scripts();
1363 1363
 
1364 1364
 		$scripts = array(
1365
-		    'sack',
1366
-		    'gform_gravityforms',
1367
-		    'gform_forms',
1368
-		    'gform_form_admin',
1369
-		    'jquery-ui-autocomplete'
1365
+			'sack',
1366
+			'gform_gravityforms',
1367
+			'gform_forms',
1368
+			'gform_form_admin',
1369
+			'jquery-ui-autocomplete'
1370 1370
 		);
1371 1371
 
1372 1372
 		if ( wp_is_mobile() ) {
1373
-		    $scripts[] = 'jquery-touch-punch';
1373
+			$scripts[] = 'jquery-touch-punch';
1374 1374
 		}
1375 1375
 
1376 1376
 		wp_enqueue_script( $scripts );
Please login to merge, or discard this patch.