forked from lino/radar-wp
First alpha: working style, dynamic sidebars, part tested cron.
This commit is contained in:
parent
a6f657092d
commit
2342ebb052
6 changed files with 81 additions and 77 deletions
|
@ -58,7 +58,8 @@ class Squat_Radar_Connector {
|
|||
}
|
||||
|
||||
function events( $facets, $fields = [], $language = NULL, $limit = 10, $expiration = 10800, $reset = FALSE ) {
|
||||
$fields = array_merge($fields, ['uuid', 'title', 'url', 'event_status']);
|
||||
// Fields we often want to get data out of but not necessarily are chosen to be shown.
|
||||
$fields = array_merge($fields, ['uuid', 'title', 'body:value', 'url', 'event_status']);
|
||||
$transient_key = 'squat_radar_events_' . sha1(implode($facets) . implode($fields) . $language . $limit);
|
||||
if (! $reset && $data = get_transient( $transient_key )) {
|
||||
return $data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue