_types_with_archive as $post_type_with_archive ) { $post_types[] = $post_type_with_archive->name; } return $post_types; } /** * Retrieves the list of post type names for which an archive indexable exists. * * @return array The list of names of post types with unindexed archive pages. */ private function get_indexed_post_type_archives() { $results = $this->repository->query() ->select( 'object_sub_type' ) ->where( 'object_type', 'post-type-archive' ) ->find_array(); if ( $results === false ) { return []; } $callback = function( $result ) { return $result['object_sub_type']; }; return \array_map( $callback, $results ); } }