Completed
Pull Request — develop (#1555)
by Zack
34:38 queued 14:33
created
future/includes/class-gv-renderer.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		$current_user  = wp_get_current_user();
82 82
 		$user_meta_key = '_gv_dismissed_entry_approval_notice' . $gravityview->view->ID;
83 83
 
84
-		if ( isset( $_GET['gv-dismiss'] ) && wp_verify_nonce( $_GET['gv-dismiss'], 'dismiss' ) ) {
84
+		if ( isset( $_GET[ 'gv-dismiss' ] ) && wp_verify_nonce( $_GET[ 'gv-dismiss' ], 'dismiss' ) ) {
85 85
 			add_user_meta( $current_user->ID, $user_meta_key, 1 ); // Prevent user from seeing this again for this View
86 86
 			return;
87 87
 		}
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
 				$tab = __( 'Edit Entry', 'gravityview' );
151 151
 				$context = 'edit';
152 152
 				break;
153
-			case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ):
154
-				$tab = __( 'Single Entry', 'gravityview' );
153
+			case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ) : $tab = __( 'Single Entry', 'gravityview' );
155 154
 				$context = 'single';
156 155
 				break;
157 156
 			default:
@@ -173,7 +172,7 @@  discard block
 block discarded – undo
173 172
 		$action_text = sprintf( esc_html__( 'Add fields to %s', 'gravityview' ), $tab );
174 173
 		$message = esc_html__( 'You can only see this message because you are able to edit this View.', 'gravityview' );
175 174
 
176
-		$image =  sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) );
175
+		$image = sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) );
177 176
 		$output = sprintf( '<h3>%s <strong><a href="%s">%s</a></strong></h3><p>%s</p>', $title, esc_url( $edit_link ), $action_text, $message );
178 177
 
179 178
 		echo \GVCommon::generate_notice( $output . $image, 'gv-warning warning', 'edit_gravityview', $gravityview->view->ID );
@@ -199,11 +198,11 @@  discard block
 block discarded – undo
199 198
 
200 199
 		$post_types = get_post_types();
201 200
 
202
-		foreach( $post_types as $post_type ) {
201
+		foreach ( $post_types as $post_type ) {
203 202
 			$post_type_rewrite = get_post_type_object( $post_type )->rewrite;
204 203
 
205 204
 			if ( $slug = \GV\Utils::get( $post_type_rewrite, 'slug' ) ) {
206
-				$reserved_slugs[] = $slug;
205
+				$reserved_slugs[ ] = $slug;
207 206
 			}
208 207
 		}
209 208
 
Please login to merge, or discard this patch.