Passed
Push — hotfix/fix-counts ( 1543e7...1ce239 )
by Paul
03:48
created
plugin/Controllers/EditorController/Metaboxes.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
 	 */
13 13
 	public function saveAssignedToMetabox( $postId )
14 14
 	{
15
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' ))return;
15
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-assigned-to' ), 'assigned_to' )) {
16
+			return;
17
+		}
16 18
 		$assignedTo = strval( glsr( Helper::class )->filterInput( 'assigned_to' ));
17 19
 		update_post_meta( $postId, 'assigned_to', $assignedTo );
18 20
 	}
@@ -23,7 +25,9 @@  discard block
 block discarded – undo
23 25
 	 */
24 26
 	public function saveResponseMetabox( $postId )
25 27
 	{
26
-		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' ))return;
28
+		if( !wp_verify_nonce( glsr( Helper::class )->filterInput( '_nonce-response' ), 'response' )) {
29
+			return;
30
+		}
27 31
 		$response = strval( glsr( Helper::class )->filterInput( 'response' ));
28 32
 		update_post_meta( $postId, 'response', trim( wp_kses( $response, [
29 33
 			'a' => ['href' => [], 'title' => []],
Please login to merge, or discard this patch.
plugin/Controllers/MenuController.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@  discard block
 block discarded – undo
22 22
 	{
23 23
 		global $menu, $typenow;
24 24
 		foreach( $menu as $key => $value ) {
25
-			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE )continue;
25
+			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE ) {
26
+				continue;
27
+			}
26 28
 			$postCount = wp_count_posts( Application::POST_TYPE );
27 29
 			$pendingCount = glsr( Builder::class )->span( number_format_i18n( $postCount->pending ), [
28 30
 				'class' => 'pending-count',
@@ -53,7 +55,9 @@  discard block
 block discarded – undo
53 55
 		foreach( $pages as $slug => $title ) {
54 56
 			$method = glsr( Helper::class )->buildMethodName( 'render-'.$slug.'-menu' );
55 57
 			$callback = apply_filters( 'site-reviews/addon/submenu/callback', [$this, $method], $slug );
56
-			if( !is_callable( $callback ))continue;
58
+			if( !is_callable( $callback )) {
59
+				continue;
60
+			}
57 61
 			add_submenu_page( 'edit.php?post_type='.Application::POST_TYPE, $title, $title, glsr()->getPermission( $slug ), $slug, $callback );
58 62
 		}
59 63
 	}
Please login to merge, or discard this patch.