Resource page * @category Settings page * @author wpdevelop * * @web-site https://wpbookingcalendar.com/ * @email info@wpbookingcalendar.com * * @modified 2023-12-29 * */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly // FixIn: 9.8.15.7. /** * Show Content * Update Content * Define Slug * Define where to show */ class WPBC_Page_Settings__bresource extends WPBC_Page_Structure { public function in_page() { if ( class_exists( 'wpdev_bk_personal' ) ) { return (string) wp_rand( 100000, 1000000 ); } return 'wpbc-resources'; } public function tabs() { $tabs = array(); $tabs[ 'resources' ] = array( 'title' => __('Resource','booking') // Title of TAB , 'hint' => __('Create unique calendars with individual availability.', 'booking') // Hint , 'page_title' => ucwords( __('Booking resource','booking') ) // Title of Page //, 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be external link //, 'position' => 'left' // 'left' || 'right' || '' //, 'css_classes'=> '' // CSS class(es) //, 'icon' => '' // Icon - link to the real PNG img , 'font_icon' => 'wpbc-bi-list 0wpbc_icn_checklist' // CSS definition of font Icon , 'default' => ( ! class_exists( 'wpdev_bk_personal' ) ) // Is this tab activated by default or not: true || false. //, 'disabled' => false // Is this tab disabled: true || false. , 'hided' => true // Is this tab hided: true || false. , 'subtabs' => array() ); return $tabs; } /** Show Content of Settings page */ public function content() { $this->css(); //////////////////////////////////////////////////////////////////////// // Checking //////////////////////////////////////////////////////////////////////// do_action( 'wpbc_hook_settings_page_header', 'resources'); // Define Notices Section and show some static messages, if needed //////////////////////////////////////////////////////////////////////// // S u b m i t Main Form //////////////////////////////////////////////////////////////////////// $submit_form_name = 'wpbc_bresources'; // Define form name /* // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing if ( isset( $_POST['is_form_sbmitted_'. $submit_form_name ] ) ) { // Nonce checking {Return false if invalid, 1 if generated between, 0-12 hours ago, 2 if generated between 12-24 hours ago. } $nonce_gen_time = check_admin_referer( 'wpbc_settings_page_' . $submit_form_name ); // Its stop show anything on submiting, if its not refear to the original page // Save Changes $this->update(); } */ do_action('wpbc_bresources_check_submit_actions'); //////////////////////////////////////////////////////////////////////// // JavaScript: Tooltips, Popover, Datepick (js & css) //////////////////////////////////////////////////////////////////////// echo ''; wpbc_js_for_bookings_page(); // Toolbar $this->toolbar(); echo ''; ?>