Completed
Pull Request — develop (#1555)
by Zack
23:16 queued 03:19
created
future/includes/class-gv-renderer.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$current_user  = wp_get_current_user();
72 72
 		$user_meta_key = '_gv_dismissed_entry_approval_notice' . $gravityview->view->ID;
73 73
 
74
-		if ( isset( $_GET['gv-dismiss'] ) && wp_verify_nonce( $_GET['gv-dismiss'], 'dismiss' ) ) {
74
+		if ( isset( $_GET[ 'gv-dismiss' ] ) && wp_verify_nonce( $_GET[ 'gv-dismiss' ], 'dismiss' ) ) {
75 75
 			add_user_meta( $current_user->ID, $user_meta_key, 1 ); // Prevent user from seeing this again for this View
76 76
 
77 77
 			return;
@@ -141,8 +141,7 @@  discard block
 block discarded – undo
141 141
 				$tab = __( 'Edit Entry', 'gravityview' );
142 142
 				$context = 'edit';
143 143
 				break;
144
-			case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ):
145
-				$tab = __( 'Single Entry', 'gravityview' );
144
+			case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ) : $tab = __( 'Single Entry', 'gravityview' );
146 145
 				$context = 'single';
147 146
 				break;
148 147
 			default:
@@ -164,7 +163,7 @@  discard block
 block discarded – undo
164 163
 		$action_text = sprintf( esc_html__( 'Add fields to %s', 'gravityview' ), $tab );
165 164
 		$message = esc_html__( 'You can only see this message because you are able to edit this View.', 'gravityview' );
166 165
 
167
-		$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 ) ) );
166
+		$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 ) ) );
168 167
 		$output = sprintf( '<h3>%s <strong><a href="%s">%s</a></strong></h3><p>%s</p>', $title, esc_url( $edit_link ), $action_text, $message );
169 168
 
170 169
 		echo \GVCommon::generate_notice( $output . $image, 'gv-warning warning', 'edit_gravityview', $gravityview->view->ID );
@@ -190,11 +189,11 @@  discard block
 block discarded – undo
190 189
 
191 190
 		$post_types = get_post_types();
192 191
 
193
-		foreach( $post_types as $post_type ) {
192
+		foreach ( $post_types as $post_type ) {
194 193
 			$post_type_rewrite = get_post_type_object( $post_type )->rewrite;
195 194
 
196 195
 			if ( $slug = \GV\Utils::get( $post_type_rewrite, 'slug' ) ) {
197
-				$reserved_slugs[] = $slug;
196
+				$reserved_slugs[ ] = $slug;
198 197
 			}
199 198
 		}
200 199
 
Please login to merge, or discard this patch.