Passed
Branch master (51607c)
by Paul
05:13
created
plugin/Handlers/RegisterPointers.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@  discard block
 block discarded – undo
17 17
 		wp_localize_script( Application::ID, 'site_reviews_pointers', [
18 18
 			'pointers' => $pointers,
19 19
 		]);
20
-		if( empty( $pointers ))return;
20
+		if( empty( $pointers )) {
21
+			return;
22
+		}
21 23
 		wp_enqueue_style( 'wp-pointer' );
22 24
 		wp_enqueue_script( 'wp-pointer' );
23 25
 	}
@@ -31,8 +33,12 @@  discard block
 block discarded – undo
31 33
 		$dismissedPointers = explode( ',', (string)$dismissedPointers );
32 34
 		$generatedPointers = [];
33 35
 		foreach( $pointers as $pointer ) {
34
-			if( $pointer['screen'] != glsr_current_screen()->id )continue;
35
-			if( in_array( $pointer['id'], $dismissedPointers ))continue;
36
+			if( $pointer['screen'] != glsr_current_screen()->id ) {
37
+				continue;
38
+			}
39
+			if( in_array( $pointer['id'], $dismissedPointers )) {
40
+				continue;
41
+			}
36 42
 			$generatedPointers[] = $this->generatePointer( $pointer );
37 43
 		}
38 44
 		return $generatedPointers;
Please login to merge, or discard this patch.
plugin/Database.php 1 patch
Braces   +16 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,9 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function getReview( $post )
67 67
 	{
68
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
68
+		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE ) {
69
+			return;
70
+		}
69 71
 		$review = $this->getReviewMeta( $post->ID );
70 72
 		$modified = $this->isReviewModified( $review );
71 73
 		$review->content = $post->post_content;
@@ -239,7 +241,9 @@  discard block
 block discarded – undo
239 241
 		$termIds = array_map( 'trim', explode( ',', $termIds ));
240 242
 		foreach( $termIds as $termId ) {
241 243
 			$term = term_exists( $termId, Application::TAXONOMY );
242
-			if( !isset( $term['term_id'] ))continue;
244
+			if( !isset( $term['term_id'] )) {
245
+				continue;
246
+			}
243 247
 			$terms[] = intval( $term['term_id'] );
244 248
 		}
245 249
 		return $terms;
@@ -252,7 +256,9 @@  discard block
 block discarded – undo
252 256
 	public function revertReview( $postId )
253 257
 	{
254 258
 		$post = get_post( $postId );
255
-		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE )return;
259
+		if( !( $post instanceof WP_Post ) || $post->post_type != Application::POST_TYPE ) {
260
+			return;
261
+		}
256 262
 		delete_post_meta( $post->ID, '_edit_last' );
257 263
 		return wp_update_post([
258 264
 			'ID' => $post->ID,
@@ -274,8 +280,7 @@  discard block
 block discarded – undo
274 280
 		];
275 281
 		if( is_numeric( $searchTerm )) {
276 282
 			$args['post__in'] = [$searchTerm];
277
-		}
278
-		else {
283
+		} else {
279 284
 			$args['orderby'] = 'relevance';
280 285
 			$args['posts_per_page'] = 10;
281 286
 			$args['s'] = $searchTerm;
@@ -284,7 +289,9 @@  discard block
 block discarded – undo
284 289
 		add_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500, 2 );
285 290
 		$search = new WP_Query( $args );
286 291
 		remove_filter( 'posts_search', [$queryBuilder, 'filterSearchByTitle'], 500 );
287
-		if( !$search->have_posts() )return;
292
+		if( !$search->have_posts() ) {
293
+			return;
294
+		}
288 295
 		$results = '';
289 296
 		while( $search->have_posts() ) {
290 297
 			$search->the_post();
@@ -308,7 +315,9 @@  discard block
 block discarded – undo
308 315
 	public function setReviewMeta( $postId, $termIds )
309 316
 	{
310 317
 		$terms = $this->normalizeTerms( $termIds );
311
-		if( empty( $terms ))return;
318
+		if( empty( $terms )) {
319
+			return;
320
+		}
312 321
 		$result = wp_set_object_terms( $postId, $terms, Application::TAXONOMY );
313 322
 		if( is_wp_error( $result )) {
314 323
 			glsr_log()->error( '['.__METHOD__.'] '.$result->get_error_message() );
Please login to merge, or discard this patch.
plugin/Controllers/MainController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
 	 */
20 20
 	public function registerPostType()
21 21
 	{
22
-		if( !glsr()->hasPermission() )return;
22
+		if( !glsr()->hasPermission() ) {
23
+			return;
24
+		}
23 25
 		$command = new RegisterPostType([
24 26
 			'capabilities'=> ['create_posts' => 'create_'.Application::POST_TYPE],
25 27
 			'columns' => [
Please login to merge, or discard this patch.
plugin/Controllers/ListTableController.php 1 patch
Braces   +30 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
 	{
55 55
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
56 56
 		foreach( $postTypeColumns as $key => &$value ) {
57
-			if( !array_key_exists( $key, $columns ) || !empty( $value ))continue;
57
+			if( !array_key_exists( $key, $columns ) || !empty( $value )) {
58
+				continue;
59
+			}
58 60
 			$value = $columns[$key];
59 61
 		}
60 62
 		if( count( glsr( Database::class )->getReviewsMeta( 'type' )) < 2 ) {
@@ -111,7 +113,9 @@  discard block
 block discarded – undo
111 113
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
112 114
 		unset( $postTypeColumns['cb'] );
113 115
 		foreach( $postTypeColumns as $key => $value ) {
114
-			if( glsr( Helper::class )->startsWith( 'taxonomy', $key ))continue;
116
+			if( glsr( Helper::class )->startsWith( 'taxonomy', $key )) {
117
+				continue;
118
+			}
115 119
 			$columns[$key] = $key;
116 120
 		}
117 121
 		return $columns;
@@ -135,7 +139,9 @@  discard block
 block discarded – undo
135 139
 				'Pending' => __( 'Unapproved', 'site-reviews' ),
136 140
 			];
137 141
 			foreach( $strings as $search => $replace ) {
138
-				if( strpos( $single, $search ) === false )continue;
142
+				if( strpos( $single, $search ) === false ) {
143
+					continue;
144
+				}
139 145
 				$translation = $this->getTranslation([
140 146
 					'number' => $number,
141 147
 					'plural' => str_replace( $search, $replace, $plural ),
@@ -166,7 +172,9 @@  discard block
 block discarded – undo
166 172
 	 */
167 173
 	public function renderColumnFilters( $post_type )
168 174
 	{
169
-		if( $post_type !== Application::POST_TYPE )return;
175
+		if( $post_type !== Application::POST_TYPE ) {
176
+			return;
177
+		}
170 178
 		if( !( $status = filter_input( INPUT_GET, 'post_status' ))) {
171 179
 			$status = 'publish';
172 180
 		}
@@ -183,7 +191,9 @@  discard block
 block discarded – undo
183 191
 	 */
184 192
 	public function renderColumnValues( $column, $postId )
185 193
 	{
186
-		if( glsr_current_screen()->id != Application::POST_TYPE )return;
194
+		if( glsr_current_screen()->id != Application::POST_TYPE ) {
195
+			return;
196
+		}
187 197
 		global $wp_version;
188 198
 		$method = glsr( Helper::class )->buildMethodName( $column, 'buildColumn' );
189 199
 		echo method_exists( $this, $method )
@@ -198,7 +208,9 @@  discard block
 block discarded – undo
198 208
 	 */
199 209
 	public function saveBulkEditFields( $postId )
200 210
 	{
201
-		if( !current_user_can( 'edit_posts' ))return;
211
+		if( !current_user_can( 'edit_posts' )) {
212
+			return;
213
+		}
202 214
 		if( $assignedTo = filter_input( INPUT_GET, 'assigned_to' ) && get_post( $assignedTo )) {
203 215
 			update_post_meta( $postId, 'assigned_to', $assignedTo );
204 216
 		}
@@ -210,7 +222,9 @@  discard block
 block discarded – undo
210 222
 	 */
211 223
 	public function setQueryForColumn( WP_Query $query )
212 224
 	{
213
-		if( !$this->hasPermission( $query ))return;
225
+		if( !$this->hasPermission( $query )) {
226
+			return;
227
+		}
214 228
 		$this->setMetaQuery( $query, [
215 229
 			'rating', 'review_type',
216 230
 		]);
@@ -345,7 +359,9 @@  discard block
 block discarded – undo
345 359
 	{
346 360
 		if( empty( $ratings )
347 361
 			|| apply_filters( 'site-reviews/disable/filter/ratings', false )
348
-		)return;
362
+		) {
363
+			return;
364
+		}
349 365
 		$ratings = array_flip( array_reverse( $ratings ));
350 366
 		array_walk( $ratings, function( &$value, $key ) {
351 367
 			$label = _n( '%s star', '%s stars', $key, 'site-reviews' );
@@ -368,7 +384,9 @@  discard block
 block discarded – undo
368 384
 		if( count( $types ) < 1
369 385
 			|| ( count( $types ) == 1 && $types[0] == 'local' )
370 386
 			|| apply_filters( 'site-reviews/disable/filter/types', false )
371
-		)return;
387
+		) {
388
+			return;
389
+		}
372 390
 		$reviewTypes = [__( 'All types', 'site-reviews' )];
373 391
 		foreach( $types as $type ) {
374 392
 			$reviewTypes[$type] = glsr( Strings::class )->review_types( $type, ucfirst( $type ));
@@ -386,7 +404,9 @@  discard block
 block discarded – undo
386 404
 	protected function setMetaQuery( WP_Query $query, array $metaKeys )
387 405
 	{
388 406
 		foreach( $metaKeys as $key ) {
389
-			if( !( $value = filter_input( INPUT_GET, $key )))continue;
407
+			if( !( $value = filter_input( INPUT_GET, $key ))) {
408
+				continue;
409
+			}
390 410
 			$metaQuery = (array)$query->get( 'meta_query' );
391 411
 			$metaQuery[] = [
392 412
 				'key' => $key,
Please login to merge, or discard this patch.
plugin/Controllers/Controller.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@  discard block
 block discarded – undo
15 15
 	 */
16 16
 	public function download( $filename, $content )
17 17
 	{
18
-		if( !current_user_can( Application::CAPABILITY ))return;
18
+		if( !current_user_can( Application::CAPABILITY )) {
19
+			return;
20
+		}
19 21
 		nocache_headers();
20 22
 		header( 'Content-Type: text/plain' );
21 23
 		header( 'Content-Disposition: attachment; filename="'.$filename.'"' );
@@ -36,8 +38,7 @@  discard block
 block discarded – undo
36 38
 		}
37 39
 		try {
38 40
 			return glsr( $handlerClass )->handle( $command );
39
-		}
40
-		catch( Exception $e ) {
41
+		} catch( Exception $e ) {
41 42
 			status_header( 400 );
42 43
 			glsr( Notice::class )->addError( new WP_Error( 'site_reviews_error', $e->getMessage() ));
43 44
 			glsr_log()->error( $e->getMessage() );
Please login to merge, or discard this patch.
plugin/Controllers/AdminController.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,7 +109,9 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function renderReviewEditor( WP_Post $post )
111 111
 	{
112
-		if( !$this->isReviewEditable( $post ) )return;
112
+		if( !$this->isReviewEditable( $post ) ) {
113
+			return;
114
+		}
113 115
 		glsr()->render( 'editor/review', [
114 116
 			'post' => $post,
115 117
 		]);
@@ -121,7 +123,9 @@  discard block
 block discarded – undo
121 123
 	 */
122 124
 	public function renderReviewNotice( WP_Post $post )
123 125
 	{
124
-		if( !$this->isReviewEditable( $post ) )return;
126
+		if( !$this->isReviewEditable( $post ) ) {
127
+			return;
128
+		}
125 129
 		glsr( Notice::class )->addWarning( __( 'This review is read-only.', 'site-reviews' ));
126 130
 		glsr()->render( 'editor/notice' );
127 131
 	}
@@ -132,13 +136,19 @@  discard block
 block discarded – undo
132 136
 	 */
133 137
 	public function renderTinymceButton()
134 138
 	{
135
-		if( glsr_current_screen()->base != 'post' )return;
139
+		if( glsr_current_screen()->base != 'post' ) {
140
+			return;
141
+		}
136 142
 		$shortcodes = [];
137 143
 		foreach( glsr()->mceShortcodes as $shortcode => $values ) {
138
-			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true ))continue;
144
+			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true )) {
145
+				continue;
146
+			}
139 147
 			$shortcodes[$shortcode] = $values;
140 148
 		}
141
-		if( empty( $shortcodes ))return;
149
+		if( empty( $shortcodes )) {
150
+			return;
151
+		}
142 152
 		glsr()->render( 'editor/tinymce', [
143 153
 			'shortcodes' => $shortcodes,
144 154
 		]);
Please login to merge, or discard this patch.
plugin/Controllers/PublicController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
 		if( !empty( $validated->error )) {
62 62
 			return $validated->request;
63 63
 		}
64
-		if( $validated->recaptchaIsUnset )return;
64
+		if( $validated->recaptchaIsUnset ) {
65
+			return;
66
+		}
65 67
 		return $this->execute( new SubmitReview( $validated->request ));
66 68
 	}
67 69
 }
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
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
 	{
21 21
 		global $menu, $typenow;
22 22
 		foreach( $menu as $key => $value ) {
23
-			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE )continue;
23
+			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE ) {
24
+				continue;
25
+			}
24 26
 			$postCount = wp_count_posts( Application::POST_TYPE );
25 27
 			$pendingCount = glsr( Builder::class )->span( number_format_i18n( $postCount->pending ), [
26 28
 				'class' => 'pending-count',
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 		foreach( $pages as $slug => $title ) {
53 55
 			$method = glsr( Helper::class )->buildMethodName( 'render-'.$slug.'-menu' );
54 56
 			$callback = apply_filters( 'site-reviews/addon/submenu/callback', [$this, $method], $slug );
55
-			if( !is_callable( $callback ))continue;
57
+			if( !is_callable( $callback )) {
58
+				continue;
59
+			}
56 60
 			add_submenu_page( 'edit.php?post_type='.Application::POST_TYPE, $title, $title, Application::CAPABILITY, $slug, $callback );
57 61
 		}
58 62
 	}
Please login to merge, or discard this patch.
plugin/Controllers/EditorController.php 1 patch
Braces   +41 added lines, -17 removed lines patch added patch discarded remove patch
@@ -85,7 +85,9 @@  discard block
 block discarded – undo
85 85
 				'Save as Pending' => __( 'Save as Unapproved', 'site-reviews' ),
86 86
 			];
87 87
 			foreach( $replacements as $search => $replacement ) {
88
-				if( $translation != $search )continue;
88
+				if( $translation != $search ) {
89
+					continue;
90
+				}
89 91
 				$translation = $replacement;
90 92
 			}
91 93
 		}
@@ -111,7 +113,9 @@  discard block
 block discarded – undo
111 113
 	public function filterUpdateMessages( array $messages )
112 114
 	{
113 115
 		$post = get_post();
114
-		if( !( $post instanceof WP_Post ))return;
116
+		if( !( $post instanceof WP_Post )) {
117
+			return;
118
+		}
115 119
 		$strings = glsr( Strings::class )->post_updated_messages();
116 120
 		$restored = filter_input( INPUT_GET, 'revision' );
117 121
 		if( $revisionTitle = wp_post_revision_title( intval( $restored ), false )) {
@@ -142,7 +146,9 @@  discard block
 block discarded – undo
142 146
 	 */
143 147
 	public function onCreateReview( $postData, $meta, $postId )
144 148
 	{
145
-		if( !$this->isReviewPostType( $review = get_post( $postId )))return;
149
+		if( !$this->isReviewPostType( $review = get_post( $postId ))) {
150
+			return;
151
+		}
146 152
 		$this->updateAssignedToPost( $review );
147 153
 	}
148 154
 
@@ -153,7 +159,9 @@  discard block
 block discarded – undo
153 159
 	 */
154 160
 	public function onDeleteReview( $postId )
155 161
 	{
156
-		if( !$this->isReviewPostType( $review = get_post( $postId )))return;
162
+		if( !$this->isReviewPostType( $review = get_post( $postId ))) {
163
+			return;
164
+		}
157 165
 		$review->post_status = 'deleted'; // important to change the post_status here first!
158 166
 		$this->updateAssignedToPost( $review );
159 167
 	}
@@ -175,7 +183,9 @@  discard block
 block discarded – undo
175 183
 	 */
176 184
 	public function registerMetaBoxes( $postType )
177 185
 	{
178
-		if( $postType != Application::POST_TYPE )return;
186
+		if( $postType != Application::POST_TYPE ) {
187
+			return;
188
+		}
179 189
 		add_meta_box( Application::ID.'_assigned_to', __( 'Assigned To', 'site-reviews' ), [$this, 'renderAssignedToMetabox'], null, 'side' );
180 190
 		add_meta_box( Application::ID.'_review', __( 'Details', 'site-reviews' ), [$this, 'renderDetailsMetaBox'], null, 'side' );
181 191
 		add_meta_box( Application::ID.'_response', __( 'Respond Publicly', 'site-reviews' ), [$this, 'renderResponseMetaBox'], null, 'normal' );
@@ -207,7 +217,9 @@  discard block
 block discarded – undo
207 217
 	 */
208 218
 	public function renderAssignedToMetabox( WP_Post $post )
209 219
 	{
210
-		if( !$this->isReviewPostType( $post ))return;
220
+		if( !$this->isReviewPostType( $post )) {
221
+			return;
222
+		}
211 223
 		$assignedTo = get_post_meta( $post->ID, 'assigned_to', true );
212 224
 		$template = '';
213 225
 		if( $assignedPost = get_post( $assignedTo )) {
@@ -233,7 +245,9 @@  discard block
 block discarded – undo
233 245
 	 */
234 246
 	public function renderDetailsMetaBox( WP_Post $post )
235 247
 	{
236
-		if( !$this->isReviewPostType( $post ))return;
248
+		if( !$this->isReviewPostType( $post )) {
249
+			return;
250
+		}
237 251
 		$review = glsr_db()->getReview( $post );
238 252
 		glsr()->render( 'edit/metabox-details', [
239 253
 			'button' => $this->getMetaboxButton( $review, $post ),
@@ -247,7 +261,9 @@  discard block
 block discarded – undo
247 261
 	 */
248 262
 	public function renderMetaBoxPinned()
249 263
 	{
250
-		if( !$this->isReviewPostType( get_post() ))return;
264
+		if( !$this->isReviewPostType( get_post() )) {
265
+			return;
266
+		}
251 267
 		$pinned = get_post_meta( get_the_ID(), 'pinned', true );
252 268
 		glsr()->render( 'edit/pinned', [
253 269
 			'pinned' => $pinned,
@@ -260,7 +276,9 @@  discard block
 block discarded – undo
260 276
 	 */
261 277
 	public function renderResponseMetaBox( WP_Post $post )
262 278
 	{
263
-		if( !$this->isReviewPostType( $post ))return;
279
+		if( !$this->isReviewPostType( $post )) {
280
+			return;
281
+		}
264 282
 		$review = glsr_db()->getReview( $post );
265 283
 		wp_nonce_field( 'response', '_nonce-response', false );
266 284
 		glsr()->render( 'edit/metabox-response', [
@@ -275,7 +293,9 @@  discard block
 block discarded – undo
275 293
 	 */
276 294
 	public function renderTaxonomyMetabox( WP_Post $post )
277 295
 	{
278
-		if( !$this->isReviewPostType( $post ))return;
296
+		if( !$this->isReviewPostType( $post )) {
297
+			return;
298
+		}
279 299
 		glsr()->render( 'edit/metabox-categories', [
280 300
 			'post' => $post,
281 301
 			'tax_name' => esc_attr( Application::TAXONOMY ),
@@ -471,7 +491,9 @@  discard block
 block discarded – undo
471 491
 	 */
472 492
 	protected function saveAssignedToMetabox( $postId )
473 493
 	{
474
-		if( !wp_verify_nonce( filter_input( INPUT_POST, '_nonce-assigned-to' ), 'assigned_to' ))return;
494
+		if( !wp_verify_nonce( filter_input( INPUT_POST, '_nonce-assigned-to' ), 'assigned_to' )) {
495
+			return;
496
+		}
475 497
 		$assignedTo = filter_input( INPUT_POST, 'assigned_to' );
476 498
 		$assignedTo || $assignedTo = '';
477 499
 		if( get_post_meta( $postId, 'assigned_to', true ) != $assignedTo ) {
@@ -486,7 +508,9 @@  discard block
 block discarded – undo
486 508
 	 */
487 509
 	protected function saveResponseMetabox( $postId )
488 510
 	{
489
-		if( !wp_verify_nonce( filter_input( INPUT_POST, '_nonce-response' ), 'response' ))return;
511
+		if( !wp_verify_nonce( filter_input( INPUT_POST, '_nonce-response' ), 'response' )) {
512
+			return;
513
+		}
490 514
 		$response = filter_input( INPUT_POST, 'response' );
491 515
 		$response || $response = '';
492 516
 		update_post_meta( $postId, 'response', trim( wp_kses( $response, [
@@ -501,15 +525,16 @@  discard block
 block discarded – undo
501 525
 	 */
502 526
 	protected function updateAssignedToPost( WP_Post $review )
503 527
 	{
504
-		if( !( $postId = $this->getAssignedToPostId( $review->ID )))return;
528
+		if( !( $postId = $this->getAssignedToPostId( $review->ID ))) {
529
+			return;
530
+		}
505 531
 		$reviewIds = get_post_meta( $postId, static::META_REVIEW_ID );
506 532
 		$updatedReviewIds = array_filter( (array)get_post_meta( $postId, static::META_REVIEW_ID ));
507 533
 		$this->updateReviewIdOfPost( $postId, $review, $reviewIds );
508 534
 		if( empty( $updatedReviewIds )) {
509 535
 			delete_post_meta( $postId, static::META_RANKING );
510 536
 			delete_post_meta( $postId, static::META_REVIEW_ID );
511
-		}
512
-		else if( !glsr( Helper::class )->compareArrays( $reviewIds, $updatedReviewIds )) {
537
+		} else if( !glsr( Helper::class )->compareArrays( $reviewIds, $updatedReviewIds )) {
513 538
 			$reviews = glsr_db()->getReviews([
514 539
 				'count' => -1,
515 540
 				'post__in' => $updatedReviewIds,
@@ -527,8 +552,7 @@  discard block
 block discarded – undo
527 552
 	{
528 553
 		if( $review->post_status != 'publish' ) {
529 554
 			delete_post_meta( $postId, static::META_REVIEW_ID, $review->ID );
530
-		}
531
-		else if( !in_array( $review->ID, $reviewIds )) {
555
+		} else if( !in_array( $review->ID, $reviewIds )) {
532 556
 			add_post_meta( $postId, static::META_REVIEW_ID, $review->ID );
533 557
 		}
534 558
 	}
Please login to merge, or discard this patch.