Gets cached events.
location and events items on success, false on failure.public function get_cached_events() {
$transient_key = $this->get_events_transient_key( $this->user_location );
if ( ! $transient_key ) {
return false;
}
$cached_response = get_site_transient( $transient_key );
if ( isset( $cached_response['events'] ) ) {
$cached_response['events'] = $this->trim_events( $cached_response['events'] );
}
return $cached_response;
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_community_events/get_cached_events