@@ -115,7 +115,9 @@ discard block |
||
| 115 | 115 | $termId = intval( $termId ); |
| 116 | 116 | } |
| 117 | 117 | $term = term_exists( $termId, Application::TAXONOMY ); |
| 118 | - if( !isset( $term['term_id'] ))continue; |
|
| 118 | + if( !isset( $term['term_id'] )) { |
|
| 119 | + continue; |
|
| 120 | + } |
|
| 119 | 121 | $terms[] = intval( $term['term_id'] ); |
| 120 | 122 | } |
| 121 | 123 | return $terms; |
@@ -127,7 +129,9 @@ discard block |
||
| 127 | 129 | */ |
| 128 | 130 | public function revert( $postId ) |
| 129 | 131 | { |
| 130 | - if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE )return; |
|
| 132 | + if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE ) { |
|
| 133 | + return; |
|
| 134 | + } |
|
| 131 | 135 | delete_post_meta( $postId, '_edit_last' ); |
| 132 | 136 | $result = wp_update_post([ |
| 133 | 137 | 'ID' => $postId, |
@@ -145,7 +149,9 @@ discard block |
||
| 145 | 149 | */ |
| 146 | 150 | public function single( WP_Post $post ) |
| 147 | 151 | { |
| 148 | - if( $post->post_type != Application::POST_TYPE )return; |
|
| 152 | + if( $post->post_type != Application::POST_TYPE ) { |
|
| 153 | + return; |
|
| 154 | + } |
|
| 149 | 155 | $review = new Review( $post ); |
| 150 | 156 | return apply_filters( 'site-reviews/get/review', $review, $post ); |
| 151 | 157 | } |
@@ -170,7 +176,9 @@ discard block |
||
| 170 | 176 | protected function setTerms( $postId, $termIds ) |
| 171 | 177 | { |
| 172 | 178 | $terms = $this->normalizeTerms( $termIds ); |
| 173 | - if( empty( $terms ))return; |
|
| 179 | + if( empty( $terms )) { |
|
| 180 | + return; |
|
| 181 | + } |
|
| 174 | 182 | $result = wp_set_object_terms( $postId, $terms, Application::TAXONOMY ); |
| 175 | 183 | if( is_wp_error( $result )) { |
| 176 | 184 | glsr_log()->error( $result->get_error_message() ); |