← All changes
|
src/actions/indexing/indexable-term-indexation-action.php
+4
-4
27.6
→
trunk
View file →
| @@ -84,12 +84,12 @@ | ||
| 84 | 84 | |
| 85 | 85 | // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Function get_select_query returns a prepared query. |
| 86 | 86 | $term_ids = ( $query === '' ) ? [] : $this->wpdb->get_col( $query ); |
| 87 | 87 | |
| 88 | - $indexables = []; | |
| 89 | - foreach ( $term_ids as $term_id ) { | |
| 90 | - $indexables[] = $this->repository->find_by_id_and_type( (int) $term_id, 'term' ); | |
| 91 | - } | |
| 88 | + $indexables = $this->repository->find_by_multiple_ids_and_type( | |
| 89 | + \array_map( 'intval', $term_ids ), | |
| 90 | + 'term', | |
| 91 | + ); | |
| 92 | 92 | |
| 93 | 93 | if ( \count( $indexables ) > 0 ) { |
| 94 | 94 | \delete_transient( static::UNINDEXED_COUNT_TRANSIENT ); |
| 95 | 95 | \delete_transient( static::UNINDEXED_LIMITED_COUNT_TRANSIENT ); |