This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// An example of how to delete an existing booking status | |
// in the Five Star Restaurant Reservations plugin. | |
// You would place this somewhere like your child | |
// theme's functions.php file. | |
// Note that, if using this on a default status, this | |
// does not remove the entry for the status from the bulk | |
// action dropdown on the bookings overview admin screen. | |
add_filter( 'rtb_post_statuses_args', 'rtb_delete_status' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// An example of how to modify the availble | |
// options in the Early Bookings setting. | |
add_filter( 'rtb_setting_early_booking_options', 'change_early_bookings_options' ); | |
function change_early_bookings_options( $list ) { | |
$list['10'] = __( 'From 10 days in advance', 'restaurant-reservations' ); | |
$list['75'] = __( 'From 75 days in advance', 'restaurant-reservations' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// An example of how to add to the availble | |
// options in the Time Interval setting. | |
function add_time_interval_options( $time_options ) { | |
$time_options['45'] = __( 'Every 45 minutes', 'restaurant-reservations' ); | |
$time_options['150'] = __( 'Every 150 minutes', 'restaurant-reservations' ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// An example of how to modify the availble | |
// options in the Late Bookings setting. | |
add_filter( 'rtb_setting_late_booking_options', 'change_late_bookings_options' ); | |
function change_late_bookings_options( $list ) { | |
// Minutes equivalent to 2 hours | |
$list['120'] = __( 'At least 2 hours in advance', 'restaurant-reservations' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// An example of how to add a new "Paid" booking status | |
// in the Five Star Restaurant Reservations plugin. | |
// You would place this somewhere like your | |
// child theme's functions.php file. | |
add_filter( 'rtb_post_statuses_args', 'rtb_new_status' ); | |
function rtb_new_status( $booking_statuses ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of how to use the fdm_order_statuses filter to add a custom order status called "Quality Check" in the Five Star Restaurant Menu plugin. | |
// In this example, the slug of the new status is fdm_order_quality_check. | |
// The value (90) is used to fill in the tracking graphic. | |
// The label is the name of the status as you want it to appear on your site. | |
function add_quality_check_status( $order_statuses ) { | |
$order_statuses['fdm_order_quality_check'] = array( | |
'label' => 'Quality Check', | |
'value' => 90, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sample_function_name($current_redirect_location, $booking_status, $booking_data) { | |
// code... | |
return $current_redirect_location; | |
} | |
add_filter( 'rtb_booking_submit_success_redirect', 'sample_function_name' ); |