Filter
rpress_timing_for_today
On this page
Filters whether store timings are built with today's rules applied.
Used when generating store timings and service hours. The default is true. When it is false in the store timing generator, the raw slot timestamps are returned without the preparation-time offset and past-slot filtering, and the service hours code no longer treats the date as today.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$timing_for_today | bool | Default true. |
Return value#
bool. Whether to apply today's timing rules.
Example#
function my_timing_for_today( $for_today ) {
return $for_today;
}
add_filter( 'rpress_timing_for_today', 'my_timing_for_today' );
Notes#
Called from two places with the same signature; when false in the timing generator the returned slots are unformatted timestamps.
Source#
Applied in:
includes/features/slot-engine/functions.php(line 77), inrpress_service_hours_store_timings()includes/rp-core-functions.php(line 604), inrp_get_store_timings()includes/rp-core-functions.php(line 1046), inrp_get_store_service_hours()
See also#
Was this page helpful?
