*/ public static function get_cached_remote_events( $ends_before_time ): array { $args = array( 'post_type' => 'event', 'posts_per_page' => -1, 'fields' => 'ids', 'meta_query' => array( 'relation' => 'AND', array( 'key' => '_event_bridge_for_activitypub_is_remote_cached', 'compare' => 'EXISTS', ), array( 'key' => 'event-date', 'value' => $ends_before_time, 'type' => 'NUMERIC', 'compare' => '<', ), ), ); $query = new WP_Query( $args ); $post_ids = $query->posts; return $post_ids; } }