mirror of
https://0xacab.org/radar/radar-wp.git
synced 2025-04-22 07:46:31 +02:00
WIP Now with some formatting.
This commit is contained in:
parent
649f84ad8c
commit
98872a46bc
3 changed files with 328 additions and 81 deletions
|
@ -57,11 +57,11 @@ class Squat_Radar_Connector {
|
|||
}
|
||||
|
||||
function events( $facets, $fields = [], $language = NULL, $limit = 10, $expiration = 10800, $reset = FALSE ) {
|
||||
$fields = array_merge($fields, ['uuid', 'url']);
|
||||
$transient_key = 'squat_radar_events_' . sha1(implode($facets) . implode($fields) . $language . $limit);
|
||||
if (! $reset && $data = get_transient( $transient_key )) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
$query = $this->encode_api_query( $facets, $fields, $language, $limit );
|
||||
$events = $this->get_events($query);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue