Filter
rpress_reservations_enabled
On this page
Filters whether table reservations are turned on.
Returned by rpress_reservations_enabled(). The default is the enable_reservations option, which is off by default. Return true to force the feature on, or false to hide it, regardless of the setting.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | bool | Whether reservations are enabled in the settings. |
Return value#
bool. True when reservations are enabled.
Example#
function my_reservations_enabled( $enabled ) {
return $enabled && is_main_site();
}
add_filter( 'rpress_reservations_enabled', 'my_reservations_enabled' );
Notes#
The first parameter is an expression that evaluates to a bool.
Source#
Applied in:
includes/features/reservations/pages.php(line 24), inrpress_reservations_enabled()
See also#
Was this page helpful?
