1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class BKAP_Save_Meta_Box {
public $id;
public $title;
public $context;
public $priority;
public $post_types;
public function __construct() {
$this->id = 'bkap-booking-save';
$this->title = __( 'Booking actions', 'woocommerce-booking' );
$this->context = 'side';
$this->priority = 'high';
$this->post_types = array( 'bkap_booking' );
}
public function meta_box_inner( $post ) {
wp_nonce_field( 'bkap_save_booking_meta_box', 'bkap_save_booking_meta_box_nonce' );
?>
<!-- Should be uncommented when we stop using the custom plugin tables
<div id="delete-action"><a class="submitdelete deletion" href="<?php // echo esc_url( get_delete_post_link( $post->ID ) ); ?>"><?php </a></div> -->
<div id="delete-action"><a class="submitdelete deletion" href="javascript:void(0)" id="bkap_delete"><?php _e( 'Move to trash', 'woocommerce-booking' ); ?></a></div>
<br><br>
<input type="button" class="button bkap_cancel button-primary tips" name="bkap_cancel" value="<?php _e( 'Cancel', 'woocommerce-booking' ); ?>" data-tip="<?php _e( 'Cancel', 'woocommerce-booking' ); ?>" />
<input type="submit" style='margin-left:40px;' class="button save_order button-primary tips" name="bkap_save" value="<?php _e( 'Save Booking', 'woocommerce-booking' ); ?>" data-tip="<?php _e( 'Save/update the booking', 'woocommerce-booking' ); ?>" />
<?php
}
}
return new BKAP_Save_Meta_Box();