'button' , 'title' => '' // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ); */ function wpbm_bs_button( $item ) { $default_item_params = array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ); $item_params = wp_parse_args( $item, $default_item_params ); ?> title="" href="" onclick="javascript:" >'; // Img Icon } elseif ( ! empty( $item_params['font_icon'] ) ) { $btn_icon = ''; // Font Icon } if ( ( ! empty( $btn_icon ) ) && ( $item_params['icon_position'] == 'left' ) ) echo $btn_icon . ' '; // Text echo ''; echo $item_params['title']; if ( ( ! empty( $btn_icon ) ) && ( $item_params['icon_position'] == 'right' ) ) echo ' ' ; echo ''; if ( ( ! empty( $btn_icon ) ) && ( $item_params['icon_position'] == 'right' ) ) echo $btn_icon; ?> '' // HTML ID of element , 'value' => '' , 'placeholder' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ); */ function wpbm_bs_text( $item ) { $default_item_params = array( 'type' => 'text' , 'id' => '' , 'name' => '' , 'label' => '' , 'disabled' => false , 'class' => '' , 'style' => '' , 'placeholder' => '' , 'attr' => array() , 'value' => '' , 'onfocus' => '' ); $item_params = wp_parse_args( $item, $default_item_params ); ?> onfocus="javascript:" /> '' // HTML ID of element , 'name' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'multiple' => false , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'options' => array() // Associated array of titles and values , 'disabled_options' => array() // If some options disbaled, then its must list here , 'value' => '' // Some Value from optins array that selected by default , 'onfocus' => '' , 'onchange' => '' ) */ function wpbm_bs_select( $item ) { $default_item_params = array( 'id' => '' // HTML ID of element , 'name' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'multiple' => false , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'options' => array() // Associated array of titles and values , 'disabled_options' => array() // If some options disbaled, then its must list here , 'value' => '' // Some Value from optins array that selected by default , 'onfocus' => '' , 'onchange' => '' ); $item_params = wp_parse_args( $item, $default_item_params ); ?> 'radio' , 'id' => '' // HTML ID of element , 'name' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '' // Some Value from optins array that selected by default , 'selected' => false // Selected or not ); */ function wpbm_bs_radio( $item ) { $item['type'] = 'radio'; wpbm_bs_checkbox( $item ); } /** Show BS checkbox * * @param array $item array( 'type' => 'checkbox' , 'id' => '' // HTML ID of element , 'name' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '' // Some Value from optins array that selected by default , 'selected' => false // Selected or not ); */ function wpbm_bs_checkbox( $item ) { $default_item_params = array( 'type' => 'checkbox' , 'id' => '' // HTML ID of element , 'name' => '' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '' // Some Value from optins array that selected by default , 'selected' => false // Selected or not ); $item_params = wp_parse_args( $item, $default_item_params ); ?> /> 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => '' // Simple plain text showing , 'id' => '' // ID, if this radio | checkbox element , 'name' => '' // Name, if this radio | checkbox element , 'value' => '' // value, if this radio | checkbox element , 'selected' => false // Selected, if this radio | checkbox element , 'legend' => '' // aria-label parameter , if this radio | checkbox element , 'class' => '' // Any CSS class here , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'text' => '' // Text tp show for Text element ) */ function wpbm_bs_addon( $item ) { $milliseconds = round( microtime( true ) * 1000 ); //FixIn: 8.8.2.1 $default_item_params = array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => '' // Simple plain text showing , 'id' => '' // ID, if this radio | checkbox element , 'name' => '' // Name, if this radio | checkbox element , 'value' => '' // value, if this radio | checkbox element , 'selected' => false // Selected, if this radio | checkbox element , 'legend' => '' // aria-label parameter , if this radio | checkbox element , 'class' => '' // Any CSS class here , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'text' => '' // Text tp show for Text element , 'style' => '' ); $item_params = wp_parse_args( $item, $default_item_params ); ?> /> /> '' // HTML ID of element , 'default' => '' // Some Value from optins array that selected by default , 'hint' => '' // Hint // array( 'title' => __('Delete' , 'booking-manager') , 'position' => 'bottom' ) , 'class' => 'button-secondary' , 'style' => '' // Any CSS style , 'label' => '' // Label of element "at Top of element" , 'title' => '' // Title of element "Inside of element" , 'align' => 'left' // Align: left | right , 'attr' => array() , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'disabled' => array() // If some options disbaled, then its must list here , 'options' => array() // Associated array of titles and values ); $params = wp_parse_args( $item, $default_item_params ); $milliseconds = round(microtime(true) * 1000); if ( empty( $params['id'] ) ) $params['id'] = 'wpbm_bs_dropdown' . $milliseconds; // Check if this list Simple or Complex (with input elements) //////////// $is_this_simple_list = true; foreach ( $params['options'] as $key => $value ) { if ( is_array( $value ) ) { $is_this_simple_list = false; break; } } ?> onclick="javascript:jQuery('#_container').show();" data-toggle="dropdown" id="_selector" title="" class="button dropdown-toggle " style="" >'; // Img Icon } elseif ( ! empty( $params['font_icon'] ) ) { $btn_icon = ''; // Font Icon } if ( ( ! empty( $btn_icon ) ) && ( $params['icon_position'] == 'left' ) ) echo $btn_icon . ' '; // Text echo ''; echo $params['title']; if ( ( ! empty( $btn_icon ) ) && ( $params['icon_position'] == 'right' ) ) echo ' ' ; echo ''; if ( ( ! empty( $btn_icon ) ) && ( $params['icon_position'] == 'right' ) ) echo $btn_icon; ?>   $value ) { if ( is_array( $value ) ) { // Complex value constructions ?>
  • 'actions' // "For" parameter of button group element , 'label' => __('Actions:', 'booking-manager') // Label above the button group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'button' , 'title' => __('Delete', 'booking-manager') // Title of the button , 'hint' => array( 'title' => __('Delete' , 'booking-manager') , 'position' => 'bottom' ) // Hint , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => '' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Delete', 'booking-manager') , 'class' => 'button-primary' , 'font_icon' => 'glyphicon glyphicon-trash' , 'icon_position' => 'left' , 'action' => "jQuery('#opl_filters_formID').trigger( 'submit' );" , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). ) ) ); wpbm_bs_button_group( $params ); */ function wpbm_bs_button_group( $args = array() ) { $milliseconds = round(microtime(true) * 1000); $defaults = array( 'label_for' => 'btn_bs_' . $milliseconds // "For" parameter of label element , 'label' => '' // Label above element , 'style' => '' // CSS of entire div element , 'items' => array() // Array of elements ); $params = wp_parse_args( $args, $defaults ); ?>
    'min_cost' // "For" parameter of label element , 'label' => __('Min / Max cost:', 'booking-manager') // Label above the input group , 'style' => '' // CSS Style of entire div element , 'items' => array( array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => __('Cost', 'booking-manager') . ':' , 'class' => '' // Any CSS class here , 'style' => 'font-weight:600;' // CSS Style of entire div element ) , array( 'type' => 'addon' , 'element' => 'checkbox' // text | radio | checkbox , 'id' => 'apply_elem' // ID, if this radio | checkbox element , 'name' => 'apply_elem' // Name, if this radio | checkbox element , 'value' => 'On' // value, if this radio | checkbox element , 'selected' => false // Selected, if this radio | checkbox element , 'legend' => '' // aria-label parameter , if this radio | checkbox element , 'class' => '' // Any CSS class here , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) , array( 'type' => 'addon' , 'element' => 'radio' // text | radio | checkbox , 'id' => 'min_elem' // ID, if this radio | checkbox element , 'name' => 'cost_elem' // Name, if this radio | checkbox element , 'value' => 'min' // value, if this radio | checkbox element , 'selected' => false // Selected, if this radio | checkbox element , 'legend' => '' // aria-label parameter , if this radio | checkbox element , 'class' => '' // Any CSS class here , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) // Warning! Can be text or selectbox, not both OR you need to define width , array( 'type' => 'text' , 'id' => 'min_cost' // HTML ID of element , 'value' => '' // Value of Text field , 'placeholder' => __('Reason of Cancelation', 'booking-manager') , 'style' => 'width:100px;' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) , array( 'type' => 'addon' , 'element' => 'text' // text | radio | checkbox , 'text' => ' - ' // Simple plain text showing ) , array( 'type' => 'text' , 'id' => 'max_cost' // HTML ID of element , 'value' => '' // Value of Text field , 'placeholder' => __('Max Cost', 'booking-manager') , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) , array( 'type' => 'addon' , 'element' => 'radio' // text | radio | checkbox , 'id' => 'max_elem' // ID, if this radio | checkbox element , 'name' => 'cost_elem' // Name, if this radio | checkbox element , 'value' => 'max' // value, if this radio | checkbox element , 'selected' => false // Selected, if this radio | checkbox element , 'legend' => '' // aria-label parameter , if this radio | checkbox element , 'class' => '' // Any CSS class here , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) // Warning! Can be text or selectbox, not both OR you need to define width , array( 'type' => 'select' , 'id' => 'select_option' // HTML ID of element , 'options' => array( 'delete' => __('Delete', 'booking-manager'), 'any' => __('Any', 'booking-manager'), 'specific' => __('Specific', 'booking-manager') ) // Associated array of titles and values , 'disabled_options' => array( 'any' ) // If some options disbaled, then its must list here , 'default' => 'specific' // Some Value from optins array that selected by default , 'style' => 'width:200px;' // CSS of select element , 'class' => '' // CSS Class of select element , 'attr' => array() // Any additional attributes, if this radio | checkbox element ) // Select Advanced option list , array( 'type' => 'select' , 'id' => 'select_form_help_shortcode' , 'name' => 'select_form_help_shortcode' , 'style' => '' , 'class' => '' , 'multiple' => false , 'disabled' => false , 'disabled_options' => array() // If some options disbaled, then its must list here , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'options' => array( // Associated array of titles and values 'info' => array( 'title' => __('General Info', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'optgroup_sf_s' => array( 'optgroup' => true , 'close' => false , 'title' => ' ' . __('Standard Fields' , 'booking-manager') ) , 'text' => array( 'title' => __('Text', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'select' => array( 'title' => __('Select', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'textarea' => array( 'title' => __('Textarea', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'checkbox' => array( 'title' => __('Checkbox', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'optgroup_sf_e' => array( 'optgroup' => true, 'close' => true ) , 'optgroup_af_s' => array( 'optgroup' => true , 'close' => false , 'title' => ' ' . __('Advanced Fields' , 'booking-manager') ) , 'info_advanced' => array( 'title' => __('Info', 'booking-manager') , 'id' => '' , 'name' => '' , 'style' => '' , 'class' => '' , 'disabled' => false , 'selected' => false , 'attr' => array() ) , 'optgroup_af_e' => array( 'optgroup' => true, 'close' => true ) ) , 'value' => '' // Some Value from optins array that selected by default , 'onfocus' => '' , 'onchange' => "jQuery('.wpbm_field_generator').hide();jQuery('.wpbm_field_generator_' + this.options[this.selectedIndex].value ).show();" ) , array( 'type' => 'button' , 'title' => __('Delete', 'booking-manager') // Title of the button , 'hint' => array( 'title' => __('Delete' , 'booking-manager') , 'position' => 'bottom' ) // Hint , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => '' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Delete', 'booking-manager') , 'class' => 'button-primary' , 'font_icon' => 'glyphicon glyphicon-trash' , 'icon_position' => 'left' , 'action' => "jQuery('#bookingmanager_filters_formID').trigger( 'submit' );" ) ) ); ?>
    'btn_bs_' . $milliseconds // "For" parameter of label element , 'label' => '' // Label above element , 'style' => '' // CSS of entire div element , 'items' => array() // Array of elements ); $params = wp_parse_args( $args, $defaults ); ?>
    '' // HTML ID of element , 'id2' => '' // (optional) HTML ID of 2nd element , 'default' => '' // Some Value from optins array that selected by default , 'default2' => '' // (optional) Some Value from optins array that selected by default , 'hint' => '' // (optional) Hint: array( 'title' => __('Delete' , 'booking-manager') , 'position' => 'bottom' ) , 'css_classes' => '' // (optional) , 'label' => '' // (optional) Label of element "at Top of element" , 'title' => '' // Title of element "Inside of element" , 'align' => 'left' // (optional) Align: left | right , 'disabled' => array() // (optional) If some options disbaled, then its must list here , 'options' => array( // Associated array of titles and values __('Bla bla bla', 'booking-manager') => '1' , 'divider0' => 'divider' , __('Section Header', 'booking-manager') => 'header' ... , '_radio_or_checkbox' => array( array( 'type' => 'radio' // 'radio' or 'checkbox' , 'id' => $item_params['id'] // HTML ID of element , 'name' => $item_params['name'] , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '' // Some Value from optins array that selected by default , 'selected' => false // Selected or not , 'label' => '' // Label - title ) ) , '_select' => array( array( 'type' => 'select' , 'id' => '' // HTML ID of element , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'multiple' => false , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'options' => array() // Associated array of titles and values , 'disabled_options' => array() // If some options disbaled, then its must list here , 'value' => '' // Some Value from optins array that selected by default ) ) , '_texts' => array( array( 'type' => 'text' , 'id' => '' , 'name' => '' , 'label' => '' , 'disabled' => false , 'class' => '' , 'style' => '' , 'placeholder' => '' , 'attr' => array() , 'value' => '' ) ) , '_buttons' => array( array( 'type' => 'button' , 'title' => '' // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbm_close_dropdown_selectbox( '" . $params['id'] . "' )" // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) ) ) ); * Exmaple #1: $params = array( // Pending, Active, Suspended, Terminated, Cancelled, Fraud 'id' => 'wh_approved' , 'options' => array ( __('Pending', 'booking-manager') => '0', __('Approved', 'booking-manager') => '1', , 'divider0' => 'divider' , __('Section Header', 'booking-manager') => 'header' , __('Any', 'booking-manager') => '' ) , 'disabled' => array( '' ) // It will disable "Any" option , 'default' => ( isset( $_REQUEST[ 'wh_approved' ] ) ) ? esc_attr( $_REQUEST[ 'wh_approved' ] ) : '' , 'label' => ''//__('Status', 'booking-manager') . ':' , 'title' => __('Items', 'booking-manager') ); wpbm_bs_dropdown_list( $params ); Exmaple #2: $dates_interval = array( 1 => '1' . ' ' . __('day' , 'booking-manager') , 2 => '2' . ' ' . __('days' , 'booking-manager') , 3 => '3' . ' ' . __('days' , 'booking-manager') , 4 => '4' . ' ' . __('days' , 'booking-manager') , 5 => '5' . ' ' . __('days' , 'booking-manager') , 6 => '6' . ' ' . __('days' , 'booking-manager') , 7 => '1' . ' ' . __('week' , 'booking-manager') , 14 => '2' . ' ' . __('weeks' , 'booking-manager') , 30 => '1' . ' ' . __('month' , 'booking-manager') , 60 => '2' . ' ' . __('months' , 'booking-manager') , 90 => '3' . ' ' . __('months' , 'booking-manager') , 183 => '6' . ' ' . __('months' , 'booking-manager') , 365 => '1' . ' ' . __('Year' , 'booking-manager') ); $params = array( 'id' => 'wh_bookingmanager_date' , 'id2' => 'wh_bookingmanager_date2' , 'default' => ( isset( $_REQUEST[ 'wh_bookingmanager_date' ] ) ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_date' ] ) : '' , 'default2' => ( isset( $_REQUEST[ 'wh_bookingmanager_date2' ] ) ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_date2' ] ) : '' , 'hint' => array( 'title' => __('Filter itenms by dates' , 'booking-manager') , 'position' => 'top' ) , 'label' => ''//__('Booked Dates', 'booking-manager') . ':' , 'title' => __('Dates', 'booking-manager') , 'options' => array ( __('Current dates' , 'booking-manager') => '0' , __('Today' , 'booking-manager') => '1' , __('Previous dates' , 'booking-manager') => '2' , __('All dates' , 'booking-manager') => '3' , 'divider1' => 'divider' , __('Today check in/out' , 'booking-manager') => '9' , __('Check In - Tomorrow' , 'booking-manager') => '7' , __('Check Out - Tomorrow' , 'booking-manager') => '8' , 'divider2' => 'divider' , 'next' => array( array( 'type' => 'radio' , 'label' => __('Next' , 'booking-manager') , 'id' => 'wh_bookingmanager_datedays_interval1' , 'name' => 'wh_bookingmanager_datedays_interval_Radios' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '4' // Some Value from optins array that selected by default , 'selected' => ( isset($_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] ) && ( $_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] == '4' ) ) ? true : false ) , array( 'type' => 'select' , 'attr' => array() , 'name' => 'wh_bookingmanager_datenext' , 'id' => 'wh_bookingmanager_datenext' , 'options' => $dates_interval , 'value' => isset( $_REQUEST[ 'wh_bookingmanager_datenext'] ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_datenext'] ) : '' ) ) , 'prior' => array( array( 'type' => 'radio' , 'label' => __('Prior' , 'booking-manager') , 'id' => 'wh_bookingmanager_datedays_interval2' , 'name' => 'wh_bookingmanager_datedays_interval_Radios' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '5' // Some Value from optins array that selected by default , 'selected' => ( isset($_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] ) && ( $_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] == '5' ) ) ? true : false ) , array( 'type' => 'select' , 'attr' => array() , 'name' => 'wh_bookingmanager_dateprior' , 'id' => 'wh_bookingmanager_dateprior' , 'options' => $dates_interval , 'value' => isset( $_REQUEST[ 'wh_bookingmanager_dateprior'] ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_dateprior'] ) : '' ) ) , 'fixed' => array( array( 'type' => 'group', 'class' => 'input-group text-group'), array( 'type' => 'radio' , 'label' => __('Dates' , 'booking-manager') , 'id' => 'wh_bookingmanager_datedays_interval3' , 'name' => 'wh_bookingmanager_datedays_interval_Radios' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '6' // Some Value from optins array that selected by default , 'selected' => ( isset($_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] ) && ( $_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] == '6' ) ) ? true : false ) , array( 'type' => 'text' , 'id' => 'wh_bookingmanager_datefixeddates' , 'name' => 'wh_bookingmanager_datefixeddates' , 'label' => __('Check-in' , 'booking-manager') . ':' , 'disabled' => false , 'class' => 'wpdevbk-filters-section-calendar' // This class add datepicker , 'style' => '' , 'placeholder' => date( 'Y-m-d' ) , 'attr' => array() , 'value' => isset( $_REQUEST[ 'wh_bookingmanager_datefixeddates'] ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_datefixeddates'] ) : '' ) , array( 'type' => 'text' , 'id' => 'wh_bookingmanager_date2fixeddates' , 'name' => 'wh_bookingmanager_date2fixeddates' , 'label' => __('Check-out' , 'booking-manager') . ':' , 'disabled' => false , 'class' => 'wpdevbk-filters-section-calendar' // This class add datepicker , 'style' => '' , 'placeholder' => date( 'Y-m-d' ) , 'attr' => array() , 'value' => isset( $_REQUEST[ 'wh_bookingmanager_date2fixeddates'] ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_date2fixeddates'] ) : '' ) ) , 'divider3' => 'divider' , 'custom' => array( array( 'type' => 'group', 'class' => 'input-group text-group') , array( 'type' => 'radio' , 'label' => __('Tada' , 'booking-manager') , 'id' => 'wh_bookingmanager_datedays_interval4' , 'name' => 'wh_bookingmanager_datedays_interval_Radios' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '10' // Some Value from optins array that selected by default , 'selected' => ( isset($_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] ) && ( $_REQUEST[ 'wh_bookingmanager_datedays_interval_Radios'] == '10' ) ) ? true : false ) , array( 'type' => 'text' , 'id' => 'wh_bookingmanager_datecustom' , 'name' => 'wh_bookingmanager_datecustom' , 'label' => __('Custom' , 'booking-manager') . ':' , 'disabled' => false , 'class' => '' , 'style' => '' , 'placeholder' => date( 'Y' ) , 'attr' => array() , 'value' => isset( $_REQUEST[ 'wh_bookingmanager_datecustom'] ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_datecustom'] ) : '' ) ) , 'divider4' => 'divider' , 'buttons' => array( array( 'type' => 'group', 'class' => 'btn-group' ), array( 'type' => 'button' , 'title' => __('Apply' , 'booking-manager') // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbm_show_selected_in_dropdown__radio_select_option(" . " 'wh_bookingmanager_date'" . ", 'wh_bookingmanager_date2'" . ", 'wh_bookingmanager_datedays_interval_Radios' " . ");" // Some JavaScript to execure, for example run the function , 'class' => 'button-primary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Close' , 'booking-manager') // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it //, 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) ) ) ); wpbm_bs_dropdown_list( $params ); Exmaple #3: $params = array( 'id' => 'wh_pay_status' // , 'id2' => 'wh_bookingmanager_date2' , 'default' => ( isset( $_REQUEST[ 'wh_pay_status' ] ) ) ? esc_attr( $_REQUEST[ 'wh_pay_status' ] ) : 'all' // , 'default2' => ( isset( $_REQUEST[ 'wh_bookingmanager_date2' ] ) ) ? esc_attr( $_REQUEST[ 'wh_bookingmanager_date2' ] ) : '' , 'hint' => array( 'title' => __('Payment status' , 'booking-manager') , 'position' => 'top' ) , 'label' => ''//__('Booked Dates', 'booking-manager') . ':' , 'title' => __('Payment', 'booking-manager') , 'options' => array ( __('Any Status' , 'booking-manager') =>'all', 'divider0' => 'divider', __('Paid OK' , 'booking-manager') =>'group_ok', __('Unknown Status' , 'booking-manager') =>'group_unknown', __('Not Completed' , 'booking-manager') =>'group_pending', __('Failed' , 'booking-manager') =>'group_failed' , 'divider2' => 'divider' , 'custom' => array( array( 'type' => 'group', 'class' => 'input-group text-group') , array( 'type' => 'radio' , 'label' => __('Custom' , 'booking-manager') , 'id' => 'wh_pay_statuscustom_radios1' , 'name' => 'wh_pay_statuscustom_Radios' , 'style' => '' // CSS of select element , 'class' => '' // CSS Class of select element , 'disabled' => false , 'attr' => array() // Any additional attributes, if this radio | checkbox element , 'legend' => '' // aria-label parameter , 'value' => '1' // Some Value from optins array that selected by default , 'selected' => ( isset($_REQUEST[ 'wh_pay_statuscustom_Radios'] ) && ( $_REQUEST[ 'wh_pay_statuscustom_Radios'] == '1' ) ) ? true : false ) , array( 'type' => 'text' , 'id' => 'wh_pay_statuscustom' , 'name' => 'wh_pay_statuscustom' , 'label' => __('Payment status' , 'booking-manager') . ':' , 'disabled' => false , 'class' => '' , 'style' => '' , 'placeholder' => '' , 'attr' => array() , 'value' => isset( $_REQUEST[ 'wh_pay_statuscustom'] ) ? esc_attr( $_REQUEST[ 'wh_pay_statuscustom'] ) : '' ) ) , 'divider4' => 'divider' , 'buttons' => array( array( 'type' => 'group', 'class' => 'btn-group' ), array( 'type' => 'button' , 'title' => __('Apply' , 'booking-manager') // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it , 'action' => "wpbm_show_selected_in_dropdown__radio_select_option(" . " 'wh_pay_status'" . ", ''" . ", 'wh_pay_statuscustom_Radios' " . ");" // Some JavaScript to execure, for example run the function , 'class' => 'button-primary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) , array( 'type' => 'button' , 'title' => __('Close' , 'booking-manager') // Title of the button , 'hint' => '' // , 'hint' => array( 'title' => __('Select status' , 'booking-manager') , 'position' => 'bottom' ) , 'link' => 'javascript:void(0)' // Direct link or skip it //, 'action' => '' // Some JavaScript to execure, for example run the function , 'class' => 'button-secondary' // button-secondary | button-primary , 'icon' => '' , 'font_icon' => '' , 'icon_position' => 'left' // Position of icon relative to Text: left | right , 'style' => '' // Any CSS class here , 'mobile_show_text' => false // Show or hide text, when viewing on Mobile devices (small window size). , 'attr' => array() ) ) ) ); wpbm_bs_dropdown_list( $params ); */ function wpbm_bs_dropdown_list( $args = array() ) { $milliseconds = round(microtime(true) * 1000); $defaults = array( 'id' => '' // HTML ID of element , 'id2' => '' // HTML ID of 2nd element , 'default' => '' // Some Value from optins array that selected by default , 'default2' => '' // Some Value from optins array that selected by default , 'hint' => '' // Hint // array( 'title' => __('Delete' , 'booking-manager') , 'position' => 'bottom' ) , 'css_classes' => '' , 'label' => '' // Label of element "at Top of element" , 'title' => '' // Title of element "Inside of element" , 'align' => 'left' // Align: left | right , 'options' => array() // Associated array of titles and values , 'disabled' => array() // If some options disbaled, then its must list here ); $params = wp_parse_args( $args, $defaults ); // Check if this list Simple or Complex (with input elements) //////////// $is_this_simple_list = true; foreach ( $params['options'] as $key => $value ) { if ( is_array( $value ) ) { $is_this_simple_list = false; break; } } // Selected Value ////////////////////////////////////////////////////////// $wpbm_value = $params[ 'default' ]; $wpbm_selector_default = array_search( $wpbm_value, $params['options'] ); if ( $wpbm_selector_default === false ) { $wpbm_selector_default = key( $params['options'] ); $wpbm_selector_default_value = current( $params['options'] ); } else $wpbm_selector_default_value = $wpbm_value; $wpbm_selector_default_value2 = $params[ 'default2' ]; // Initial setting title, if already was request ///////////////////////// if ( isset( $_REQUEST[ esc_attr( $params['id'] ) ] ) ) { ?>
    __('Help', 'booking-manager') , 'hint' => array( 'title' => __('Help info' , 'booking-manager') , 'position' => 'bottom' ) , 'font_icon' => 'glyphicon glyphicon-question-sign' , 'position' => 'right' , 'items' => array( array( 'type' => 'link', 'title' => __('About Plugin', 'booking-manager'), 'url' => 'https://oplugins.com/plugins/booking-manager' ) , array( 'type' => 'divider' ) , array( 'type' => 'text', 'title' => __('Text', 'booking-manager') ) , array( 'type' => 'link', 'title' => __('Help', 'booking-manager'), 'url' => 'https://oplugins.com/plugins/booking-manager//help/' ) , array( 'type' => 'link', 'title' => __('FAQ', 'booking-manager'), 'url' => 'https://oplugins.com/plugins/booking-manager/#faq' ) , array( 'type' => 'link', 'title' => __('Technical Support', 'booking-manager'), 'url' => 'https://oplugins.com/plugins/booking-manager/#support' ) , array( 'type' => 'divider' ) , array( 'type' => 'link', 'title' => __('Upgrade Now', 'booking-manager'), 'url' => 'http://https://oplugins.com/plugins/booking-manager/', 'style' => 'font-weight: 600;' , 'attr' => array( 'target' => '_blank' ) ) ) ) ); * * @param array $args */ function wpbm_bs_dropdown_menu( $args = array() ) { $defaults = array( 'title' => '', 'hint' => '', 'icon' => '', 'font_icon' => '', 'position' => '', 'items' => array() ); $params = wp_parse_args( $args, $defaults ); ?> title="" class="dropdown-toggle nav-tab ">   '' , 'hint' => array( 'title' => __('Calendar Overview' , 'booking-manager') , 'position' => 'bottom' ) , 'selected' => ( $selected_view_mode == 'vm_calendar' ) ? true : false , 'link' => $bk_admin_url . '&view_mode=vm_calendar' , 'icon' => '' , 'font_icon' => 'glyphicon glyphicon-calendar' ); */ function wpbm_bs_vertical_buttons_group( $params ) { ?>
    $btn_params ) { ?> title="" " */ } ?> class="button button-secondary " href="" onclick="javascript:void(0)" > 
    '' // Title of TAB , 'hint' => array( 'title' => '', 'position' => 'bottom' ) // Hint , 'link' => 'javascript:void(0)' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link , 'onclick' => '' // JS action , 'position' => '' // 'left' || 'right' || '' , 'css_classes' => '' // CSS class(es) , 'icon' => '' // Icon - link to the real PNG img , 'font_icon' => '' // CSS definition of forn Icon , 'default' => false // Is it activated by default: true || false. , 'disabled' => false // Is this sub tab deactivated: true || false. , 'checkbox' => false // false or definition array for specific checkbox: array( 'checked' => true, 'name' => 'feature1_active_status', 'value' => '', 'onclick' => '' ) , 'top' => true // Top or Bottom TAB: true || false. ) */ function wpbm_bs_display_tab( $args = array() ) { $defaults = array( 'top' => true, 'title' => '', 'hint' => '', 'link' => 'javascript:void(0)', 'onclick' => '', 'css_classes' => '', 'icon' => '', 'font_icon' => '', 'checkbox' => false, 'disabled' => false, 'default' => false ); $tab = wp_parse_args( $args, $defaults ); if ( ( ! empty( $tab['hint'] ) ) && ( is_string( $tab['hint'] ) ) ) { // Compatibility with previous hint declaration if ( $tab['top'] === true ) $tab['hint'] = array( 'title' => $tab['hint'], 'position' => 'top' ); else $tab['hint'] = array( 'title' => $tab['hint'], 'position' => 'bottom' ); } $html_tag = 'a'; if ( $tab['disabled'] ) { $tab['link'] = 'javascript:void(0)'; $html_tag = 'span'; } echo '<' , $html_tag , ' '; // Start HTML Tag if ( $html_tag == 'a' ) { // Paramters for A tag echo ' href="' , $tab['link'] , '" '; //echo ' title="' , esc_js( $tab['title'] ) , '" '; if ( ! empty( $tab['onclick'] ) ) echo ' onclick="javascript:' , $tab['onclick'] , '" '; } if ( ! empty( $tab['hint'] ) ) { // Hint echo ' title="' , esc_js( $tab['hint']['title'] ) , '" '; } echo ' class="nav-tab'; // CSS Classes if ( $tab['top'] !== true ) echo ' wpdevelop-submenu-tab'; if ( $tab['default'] ) echo ' nav-tab-active'; if ( $tab['disabled'] ) echo ' wpdevelop-tab-disabled'; if ( ! empty( $tab['hint'] ) ) echo ' tooltip_' , $tab['hint']['position']; if ( ! empty( $tab['position'] ) ) echo ' nav-tab-position-' , $tab['position']; if ( ! empty( $tab['hided'] ) ) echo ' hide'; echo ' ' , $tab['css_classes']; echo '" '; echo wpbm_get_custom_attr( $tab ); echo '>'; // Close > for A or SPAN // Icon $is_icon_showed = true; if ( ! empty( $tab['icon'] ) ) { if ( substr( $tab['icon'], 0, 4 ) != 'http') $img_path = WPBM_PLUGIN_URL . '/assets/img/' . $tab['icon']; else $img_path = $tab['icon']; ?> name="_dublicated" id="_dublicated" value="" onchange="javascript: if ( jQuery('#').length > 0 ) { document.getElementById('').checked = this.checked; }" />'; if ( ( isset( $tab['top'] ) ) && ( $tab['top'] ) && ( isset( $tab['position'] ) ) && ( $tab['position'] !== 'right' ) //FixIn: 6.0.1.13 ) echo ' '; } function wpbm_bs_toolbar_tabs_html_container_start() { ?>
    $attr_v ) { $attributes[] = esc_attr( $attr ) . '="' . esc_attr( $attr_v ) . '"'; } } return implode( ' ', $attributes ); }