__( 'Settings', 'booking-manager' ) // Title of TAB
, 'page_title' => __( 'Settings', 'booking-manager' ) // Title of Page
, 'hint' => __( 'Settings', 'booking-manager' ) // Hint
, 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
, 'position' => '' // 'left' || 'right' || ''
, 'css_classes' => '' // CSS class(es)
, 'icon' => '' // Icon - link to the real PNG img
, 'font_icon' => 'glyphicon glyphicon-menu-hamburger' // CSS definition of forn Icon
, 'default' => false // Is this tab activated by default or not: true || false.
, 'disabled' => false // Is this tab disbaled: true || false.
, 'hided' => false // Is this tab hided: true || false.
, 'subtabs' => array()
);
// $subtabs = array();
// $tabs[ 'items' ][ 'subtabs' ] = $subtabs;
$subtabs['listing'] = array(
'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
, 'title' => __('Listing Template' , 'booking-manager') // Title of TAB
, 'page_title' => __('Listing Template', 'booking-manager') // Title of Page
, 'hint' => __('Listing Template' , 'booking-manager') // Hint
, 'link' => '' // link
, 'position' => '' // 'left' || 'right' || ''
, 'css_classes' => '' // CSS class(es)
//, 'icon' => 'http://.../icon.png' // Icon - link to the real PNG img
//, 'font_icon' => 'glyphicon glyphicon-envelope' // CSS definition of Font Icon
, 'default' => !true // Is this sub tab activated by default or not: true || false.
, 'disabled' => false // Is this sub tab deactivated: true || false.
, 'checkbox' => false // or definition array for specific checkbox: array( 'checked' => true, 'name' => 'feature1_active_status' ) //, 'checkbox' => array( 'checked' => $is_checked, 'name' => 'enabled_active_status' )
, 'content' => 'content' // Function to load as conten of this TAB
);
$tabs[ 'wpbm-settings' ]['subtabs'] = $subtabs;
return $tabs;
}
public function content() {
do_action( 'wpbm_hook_settings_page_header', array( 'page' => $this->in_page() ) ); // Define Notices Section and show some static messages, if needed.
////////////////////////////////////////////////////////////////////////
// Submit /////////////////////////////////////////////////////////////
$submit_form_name = 'wpbm_form_listing'; // Define form name
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( 'wpbm_settings_page_' . $submit_form_name ); // Its stop show anything on submiting, if its not refear to the original page
// Save Changes
$this->update();
}
////////////////////////////////////////////////////////////////////////
// Get Data from DB ////////////////////////////////////////////////////
$data_list_tmpl = get_wpbm_option( 'wpbm_listing_template' );
//$data_list_tmpl = wpbm_nl_after_br( $data_list_tmpl );
////////////////////////////////////////////////////////////////////////
// Toolbar /////////////////////////////////////////////////////////////
wpbm_bs_toolbar_sub_html_container_start();
?>