Skip to content
Docs
Get RestroPress

Filter

rpress_reservations_enabled

Updated
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#

ParameterTypeDescription
$valueboolWhether 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), in rpress_reservations_enabled()

See also#

Was this page helpful?