1
0
Fork 0
forked from lino/radar-wp

First alpha: working style, dynamic sidebars, part tested cron.

This commit is contained in:
ekes 2019-04-30 19:30:25 +02:00
parent a6f657092d
commit 2342ebb052
6 changed files with 81 additions and 77 deletions

View file

@ -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;