@@ -120,7 +120,8 @@ public function custom_taxonomies_terms() {
120120 return [];
121121 }
122122 $ custom_taxonomies = get_taxonomies ( [ '_builtin ' => false ] );
123- $ custom_terms = (array ) get_terms ( $ custom_taxonomies , [ 'get ' => 'all ' ] );
123+ // phpcs:ignore WordPress.WP.DeprecatedParameters.Get_termsParam2Found -- Deprecated, but we need to support older versions of WordPress.
124+ $ custom_terms = (array ) get_terms ( $ custom_taxonomies , [ 'get ' => 'all ' ] );
124125 $ this ->check_for_orphaned_terms ( $ custom_terms );
125126 $ custom_terms = self ::topologically_sort_terms ( $ custom_terms );
126127 return $ custom_terms ;
@@ -305,7 +306,7 @@ private function include_attachment_ids( $post_ids ) {
305306 return [];
306307 }
307308 $ attachment_ids = [];
308- // phpcs:ignore WordPress .CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- Assigment is part of the break condition.
309+ // phpcs:ignore Generic .CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- Assigment is part of the break condition.
309310 while ( $ batch_of_post_ids = array_splice ( $ post_ids , 0 , self ::QUERY_CHUNK ) ) {
310311 $ post_parent_condition = _wp_export_build_IN_condition ( 'post_parent ' , $ batch_of_post_ids );
311312 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Escaped in wpcli_export_build_in_condition() function.
@@ -344,7 +345,7 @@ private function find_category_from_any_object( $category ) {
344345
345346 private static function topologically_sort_terms ( $ terms ) {
346347 $ sorted = [];
347- // phpcs:ignore WordPress .CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- assignment is used as break condition.
348+ // phpcs:ignore Generic .CodeAnalysis.AssignmentInCondition.FoundInWhileCondition -- assignment is used as break condition.
348349 while ( $ term = array_shift ( $ terms ) ) {
349350 if ( 0 === (int ) $ term ->parent || isset ( $ sorted [ $ term ->parent ] ) ) {
350351 $ sorted [ $ term ->term_id ] = $ term ;
@@ -413,4 +414,3 @@ private function get_comments_for_post( $post ) {
413414 return $ comments ;
414415 }
415416}
416-
0 commit comments