@@ -125,7 +125,9 @@ discard block |
||
125 | 125 | $termId = intval( $termId ); |
126 | 126 | } |
127 | 127 | $term = term_exists( $termId, Application::TAXONOMY ); |
128 | - if( !isset( $term['term_id'] ))continue; |
|
128 | + if( !isset( $term['term_id'] )) { |
|
129 | + continue; |
|
130 | + } |
|
129 | 131 | $terms[] = $term; |
130 | 132 | } |
131 | 133 | return $terms; |
@@ -137,7 +139,9 @@ discard block |
||
137 | 139 | */ |
138 | 140 | public function revert( $postId ) |
139 | 141 | { |
140 | - if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE )return; |
|
142 | + if( get_post_field( 'post_type', $postId ) != Application::POST_TYPE ) { |
|
143 | + return; |
|
144 | + } |
|
141 | 145 | delete_post_meta( $postId, '_edit_last' ); |
142 | 146 | $result = wp_update_post([ |
143 | 147 | 'ID' => $postId, |
@@ -182,7 +186,9 @@ discard block |
||
182 | 186 | protected function setTerms( $postId, $termIds ) |
183 | 187 | { |
184 | 188 | $termIds = $this->normalizeTermIds( $termIds ); |
185 | - if( empty( $termIds ))return; |
|
189 | + if( empty( $termIds )) { |
|
190 | + return; |
|
191 | + } |
|
186 | 192 | $termTaxonomyIds = wp_set_object_terms( $postId, $termIds, Application::TAXONOMY ); |
187 | 193 | if( is_wp_error( $termTaxonomyIds )) { |
188 | 194 | glsr_log()->error( $termTaxonomyIds->get_error_message() ); |