@@ -120,7 +120,8 @@ public function custom_taxonomies_terms() {
120
120
return [];
121
121
}
122
122
$ 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 ' ] );
124
125
$ this ->check_for_orphaned_terms ( $ custom_terms );
125
126
$ custom_terms = self ::topologically_sort_terms ( $ custom_terms );
126
127
return $ custom_terms ;
@@ -305,7 +306,7 @@ private function include_attachment_ids( $post_ids ) {
305
306
return [];
306
307
}
307
308
$ 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.
309
310
while ( $ batch_of_post_ids = array_splice ( $ post_ids , 0 , self ::QUERY_CHUNK ) ) {
310
311
$ post_parent_condition = _wp_export_build_IN_condition ( 'post_parent ' , $ batch_of_post_ids );
311
312
// 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 ) {
344
345
345
346
private static function topologically_sort_terms ( $ terms ) {
346
347
$ 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.
348
349
while ( $ term = array_shift ( $ terms ) ) {
349
350
if ( 0 === (int ) $ term ->parent || isset ( $ sorted [ $ term ->parent ] ) ) {
350
351
$ sorted [ $ term ->term_id ] = $ term ;
@@ -413,4 +414,3 @@ private function get_comments_for_post( $post ) {
413
414
return $ comments ;
414
415
}
415
416
}
416
-
0 commit comments