Completed
Push — develop ( dd99ec...4cab74 )
by Zack
07:21
created
includes/class-admin-welcome.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 	 * @since 1.0
35 35
 	 */
36 36
 	public function __construct() {
37
-		add_action( 'admin_menu', array( $this, 'admin_menus'), 200 );
37
+		add_action( 'admin_menu', array( $this, 'admin_menus' ), 200 );
38 38
 		add_action( 'admin_head', array( $this, 'admin_head' ) );
39
-		add_action( 'admin_init', array( $this, 'welcome'    ) );
40
-		add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page'), 10, 2 );
39
+		add_action( 'admin_init', array( $this, 'welcome' ) );
40
+		add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page' ), 10, 2 );
41 41
 	}
42 42
 
43 43
 	/**
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 		// Add help page to GravityView menu
54 54
 		add_submenu_page(
55 55
 			'edit.php?post_type=gravityview',
56
-			__('GravityView: Getting Started', 'gravityview'),
57
-			__('Getting Started', 'gravityview'),
56
+			__( 'GravityView: Getting Started', 'gravityview' ),
57
+			__( 'Getting Started', 'gravityview' ),
58 58
 			$this->minimum_capability,
59 59
 			'gv-getting-started',
60 60
 			array( $this, 'getting_started_screen' )
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
 	 *
88 88
 	 * @return boolean  $is_page   True: yep; false: nope
89 89
 	 */
90
-	public function is_dashboard_page($is_page = false, $hook = NULL) {
90
+	public function is_dashboard_page( $is_page = false, $hook = NULL ) {
91 91
 		global $plugin_page;
92 92
 
93
-		if($is_page) { return $is_page; }
93
+		if ( $is_page ) { return $is_page; }
94 94
 
95 95
 		return in_array( $plugin_page, array( 'gv-about', 'gv-credits', 'gv-getting-started' ) );
96 96
 	}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-credits' );
109 109
 		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-changelog' );
110 110
 
111
-		if( !$this->is_dashboard_page() ) { return; }
111
+		if ( ! $this->is_dashboard_page() ) { return; }
112 112
 
113 113
 		?>
114 114
         <style type="text/css" media="screen" xmlns="http://www.w3.org/1999/html">
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		// Don't fetch -beta, etc.
142 142
 		list( $display_version ) = explode( '-', GravityView_Plugin::version );
143 143
 
144
-		$selected = !empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
144
+		$selected = ! empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
145 145
 
146 146
 		echo gravityview_get_floaty( 132 );
147 147
 		?>
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
 		<div class="about-text"><?php esc_html_e( 'Thank you for installing GravityView. Beautifully display your Gravity Forms entries.', 'gravityview' ); ?></div>
151 151
 
152 152
 		<h2 class="nav-tab-wrapper clear">
153
-			<a class="nav-tab <?php echo $selected == 'gv-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-getting-started', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
153
+			<a class="nav-tab <?php echo $selected == 'gv-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-getting-started', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
154 154
 				<?php _e( "Getting Started", 'gravityview' ); ?>
155 155
 			</a>
156
-			<a class="nav-tab <?php echo $selected == 'gv-changelog' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-changelog', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
156
+			<a class="nav-tab <?php echo $selected == 'gv-changelog' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-changelog', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
157 157
 				<?php _e( "List of Changes", 'gravityview' ); ?>
158 158
 			</a>
159
-			<a class="nav-tab <?php echo $selected == 'gv-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-credits', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
159
+			<a class="nav-tab <?php echo $selected == 'gv-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-credits', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
160 160
 				<?php _e( 'Credits', 'gravityview' ); ?>
161 161
 			</a>
162 162
 		</h2>
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 					<h2>Create a View</h2>
196 196
 
197 197
 					<ol class="ol-decimal">
198
-						<li>Go to <a href="<?php echo admin_url('post-new.php?post_type=gravityview'); ?>">Views &gt; New View</a></li>
198
+						<li>Go to <a href="<?php echo admin_url( 'post-new.php?post_type=gravityview' ); ?>">Views &gt; New View</a></li>
199 199
 						<li>If you want to <strong>create a new form</strong>, click the "Use a Form Preset" button</li>
200 200
 						<li>If you want to <strong>use an existing form&rsquo;s entries</strong>, select from the dropdown.</li>
201 201
 						<li>Select the type of View you would like to create. There are two core types of Views: <strong>Table</strong> and <strong>Listing</strong>.
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 					</ul>
424 424
 
425 425
 					<h4><?php esc_attr_e( 'Want to contribute?', 'gravityview' ); ?></h4>
426
-					<p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gravityview'), '<a href="https://github.com/katzwebservices/GravityView">', '</a>' ); ?></p>
426
+					<p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gravityview' ), '<a href="https://github.com/katzwebservices/GravityView">', '</a>' ); ?></p>
427 427
 				</div>
428 428
 			</div>
429 429
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 		global $plugin_page;
467 467
 
468 468
 		// Bail if we're just editing the plugin
469
-		if( $plugin_page === 'plugin-editor.php' ) { return; }
469
+		if ( $plugin_page === 'plugin-editor.php' ) { return; }
470 470
 
471 471
 		// Bail if no activation redirect
472 472
 		if ( ! get_transient( '_gv_activation_redirect' ) ) { return; }
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 		$upgrade = get_option( 'gv_version_upgraded_from' );
478 478
 
479 479
 		// Don't do anything if they've already seen the new version info
480
-		if( $upgrade === GravityView_Plugin::version ) {
480
+		if ( $upgrade === GravityView_Plugin::version ) {
481 481
 			return;
482 482
 		}
483 483
 
@@ -485,10 +485,10 @@  discard block
 block discarded – undo
485 485
 		update_option( 'gv_version_upgraded_from', GravityView_Plugin::version );
486 486
 
487 487
 		// Bail if activating from network, or bulk
488
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; }
488
+		if ( is_network_admin() || isset( $_GET[ 'activate-multi' ] ) ) { return; }
489 489
 
490 490
 		// First time install
491
-		if( ! $upgrade ) {
491
+		if ( ! $upgrade ) {
492 492
 			wp_safe_redirect( admin_url( 'edit.php?post_type=gravityview&page=gv-getting-started' ) ); exit;
493 493
 		}
494 494
 		// Update
Please login to merge, or discard this patch.