Filter
rpress_reservation_registered_settings
On this page
Filters the reservation settings fields.
Runs when the reservation settings are registered. The array holds every field, keyed by field ID, including the email subject and message fields. Fields whose keys match the built-in email fields are then placed under Emails > Reservation Notifications and all other fields under General > Reservations. Add a field with an id, name and type to show a new option.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | array | Settings fields keyed by field ID. |
Return value#
array. The settings fields, keyed by field ID.
Example#
function my_reservation_registered_settings( $fields ) {
$fields['my_reservation_footer_note'] = array(
'id' => 'my_reservation_footer_note',
'name' => __( 'Footer note', 'my-plugin' ),
'desc' => __( 'Shown under the reservation form.', 'my-plugin' ),
'type' => 'text',
);
return $fields;
}
add_filter( 'rpress_reservation_registered_settings', 'my_reservation_registered_settings' );
Notes#
The first parameter is the merged general and email fields. A new field is placed on the General tab; only the built-in email field keys go to the Emails tab.
Source#
Applied in:
includes/features/reservations/settings.php(line 231), inrpress_reservation_register_settings()
See also#
Was this page helpful?
