nomies as $taxonomy ) { $terms = \get_the_terms( $post->ID, $taxonomy ); if ( empty( $terms ) || \is_wp_error( $terms ) ) { continue; } foreach ( $terms as $term ) { $related_indexables[] = $this->repository->find_by_id_and_type( $term->term_id, 'term', false ); } } return \array_filter( $related_indexables ); } /** * Tests if the site is multisite and switched. * * @return bool True when the site is multisite and switched */ protected function is_multisite_and_switched() { return \is_multisite() && \ms_is_switched(); } }