// Handle booking via AJAX add_action('wp_ajax_rbm_book_table', 'rbm_handle_booking'); add_action('wp_ajax_nopriv_rbm_book_table', 'rbm_handle_booking'); function rbm_handle_booking() { $date = sanitize_text_field($_POST['booking-date']); $time = sanitize_text_field($_POST['booking-time']); $party_size = intval($_POST['party-size']); // Check availability and book (logic to be added) $response = [ 'success' => true, 'message' => 'Booking successful!', ]; wp_send_json($response); } // Enqueue custom styles and scripts add_action('wp_enqueue_scripts', 'rbm_enqueue_frontend_assets'); add_action('admin_enqueue_scripts', 'rbm_enqueue_admin_assets'); function rbm_enqueue_frontend_assets() { wp_enqueue_style( 'rbm-booking-styles', plugin_dir_url(__FILE__) . 'assets/css/booking-styles.css' ); wp_enqueue_script( 'rbm-booking-scripts', plugin_dir_url(__FILE__) . 'assets/js/booking-scripts.js', ['jquery'], // Dependency on jQuery null, true ); wp_localize_script('rbm-booking-scripts', 'ajax_url', admin_url('admin-ajax.php')); } function rbm_enqueue_admin_assets() { wp_enqueue_style( 'rbm-admin-styles', plugin_dir_url(__FILE__) . 'assets/css/booking-styles.css' ); }{"id":8691,"date":"2021-01-05T07:14:27","date_gmt":"2021-01-05T07:14:27","guid":{"rendered":"https:\/\/6.swingerscloud.com\/?p=8691"},"modified":"2021-01-05T07:14:27","modified_gmt":"2021-01-05T07:14:27","slug":"selfies","status":"publish","type":"post","link":"https:\/\/6.swingerscloud.com\/selfies\/","title":{"rendered":"Selfies"},"content":{"rendered":"
[justified_image_grid preset=c2 filterby=media_category exclude_filter_terms=_no-pics,Amateur,Pro l2_filterby=on l2_exclude_filter_terms=_no-pics,Amateur,Pro ids=”
\n8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740″]<\/p>\n","protected":false},"excerpt":{"rendered":"
[justified_image_grid preset=c2 filterby=media_category exclude_filter_terms=_no-pics,Amateur,Pro l2_filterby=on l2_exclude_filter_terms=_no-pics,Amateur,Pro ids=” 8692,8693,8694,8695,8696,8697,8698,8699,8700,8701,8702,8703,8704,8705,8706,8707,8708,8709,8710,8711,8712,8713,8714,8715,8716,8717,8718,8719,8720,8721,8722,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740″]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1428],"tags":[],"class_list":["post-8691","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/posts\/8691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/comments?post=8691"}],"version-history":[{"count":0,"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/posts\/8691\/revisions"}],"wp:attachment":[{"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/media?parent=8691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/categories?post=8691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/6.swingerscloud.com\/wp-json\/wp\/v2\/tags?post=8691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}