current_page_params = array();
$this->tags = array();
// Defining Name of parameter in GET request - $_GET[ 'tab' ] == 'payment'.
$this->tags['tab'] = 'tab';
// Defining Name of parameter in GET request - $_GET[ 'subtab' ] == 'paypal'.
$this->tags['subtab'] = 'subtab';
// This Hook fire after creation menu in class WPBC_Admin_Menus.
add_action( 'wpbc_define_nav_tabs', array( $this, 'wpbc_create_plugin_menu_structure_arr' ) );
// This Hook fire in the class WPBC_Admin_Menus for showing page content of specific menu.
add_action( 'wpbc_page_structure_show', array( $this, 'content_structure' ) );
}
// -----------------------------------------------------------------------------------------------------------------
// Abstract Methods
// -----------------------------------------------------------------------------------------------------------------
/**
* Define slug in what menu to show this page. // Parameter relative: $_GET['page'].
*
* @return string
*
* Example:
return 'wpbc-settings';
*/
abstract public function in_page();
/**
* Define Tabs and Subtabs of this Admin Page
*
* @return array();
* Example:
$tabs = array();
$tabs[ 'form' ] = array(
'title' => __('Form','booking') // Title of TAB
, 'hint' => __('Customization of Form Fields', 'booking') // Hint
, 'page_title' =>ucwords( __('Form fields', 'booking') ) // Title of Page
//, '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' => 'wpbc_icn_draw' // 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()
);
$tabs[ 'upgrade' ] = array(
'title' => __('Upgrade','booking') // Title of TAB
, 'hint' => __('Upgrade to higher version', 'booking') // Hint
//, 'page_title' => __('Upgrade', 'booking') // Title of Page
, 'link' => 'http://server.com/' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link
, 'position' => 'right' // 'left' || 'right' || ''
//, 'css_classes' => '' // CSS class(es)
//, 'icon' => '' // Icon - link to the real PNG img
, 'font_icon' => 'wpbc_icn_auto_graph'// CSS definition of forn Icon
//, 'default' => false // Is this tab activated by default or not: true || false.
//, 'subtabs' => array()
);
$subtabs = array();
$subtabs['fields'] = array(
'type' => 'subtab' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
, 'title' => __('Form','booking') // Title of TAB
, 'page_title' => __('Form Settings', 'booking') // Title of Page
, 'hint' => __('Customization of Form Settings', 'booking') // Hint
, 'link' => '' // link
, 'position' => '' // 'left' || 'right' || ''
, 'css_classes' => '' // CSS class(es)
//, 'icon' => 'https://www.paypalobjects.com/webstatic/icon/pp258.png' // Icon - link to the real PNG img
//, 'font_icon' => 'wpbc_icn_payment' // 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' )
, 'content' => 'content' // Function to load as conten of this TAB
);
$subtabs['form-separator'] = array(
'type' => 'separator' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
);
$subtabs['form-goto'] = array(
'type' => 'goto-link' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
, 'title' =>ucwords( __('Form fields', 'booking') ) // Title of TAB
, 'hint' => '' // Hint
, 'show_section' => 'id_of_show_section' // ID of HTML element, for scroll to.
);
ob_start();
...
$html_element_data = ob_get_clean();
$subtabs['form-selection'] = array(
'type' => 'html' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
, 'html' => $html_element_data
);
$subtabs['form-save'] = array(
'type' => 'button' // Required| Possible values: 'subtab' | 'separator' | 'button' | 'goto-link' | 'html'
, 'title' => __('Save Changes','booking') // Title of TAB
, 'form' => 'wpbc_form' // Required for 'button'! Name of Form to submit
);
$tabs[ 'form' ][ 'subtabs' ] = $subtabs;
return $tabs;
*/
abstract public function tabs();
/**
* Show Content of this page - Main function.
*
* In top of this function have to be checking ubout Update (saving POST request).
*
* Exmaple:
// S u b m i t ///////////////////////////////////////////////////////
$this_submit_form = 'wpbc_emails_toolbar'; // Define form name
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( isset( $_POST['is_form_sbmitted_'. $this_submit_form ] ) ) {
// Check N o n c e
check_admin_referer( 'wpbc_settings_page_' . $this_submit_form ); // Its stop show anything on submiting, if its not refear to the original page
// Make Update of settings
$edit_field_data = $this->update_wpbc_emails_toolbar( $menu_slug );
}
////////////////////////////////////////////////////////////////////////
*/
abstract public function content();
/**
* This function can be overridden by child classes for auto update / save options in main form
*
* @return void
*/
public function maybe_update() {
}
// -----------------------------------------------------------------------------------------------------------------
// C O N T E N T
// -----------------------------------------------------------------------------------------------------------------
/**
* General Page Structure
*
* @param string $page_tag - its the same that return $this->in_page ()
*/
public function content_structure( $page_tag ) {
if ( ! $this->is_page_activated() ) {
return false;
}
$this->maybe_update();
$active_page_tab = $active_page_subtab = '';
if ( ( isset( $this->current_page_params['tab'] ) ) && ( ! empty( $this->current_page_params['tab']['tag'] ) ) ) {
$active_page_tab = $this->current_page_params['tab']['tag'];
}
if ( ( isset( $this->current_page_params['subtab'] ) ) && ( ! empty( $this->current_page_params['subtab']['tag'] ) ) ) {
$active_page_subtab = $this->current_page_params['subtab']['tag'];
}
// Fires Before showing settings Content page
$is_show_this_page = apply_filters( 'wpbc_before_showing_settings_page_is_show_page', true, $page_tag, $active_page_tab, $active_page_subtab );
if ( $is_show_this_page === false ) {
return false;
}
// Fires Before showing settings Content page
do_action( 'wpbc_before_settings_content', $page_tag, $active_page_tab, $active_page_subtab );
?>
is_use_navigation_path ) ) {
$this->show_top_path( $page_tag ); // Show Top Path // FixIn: 10.4.0.2.
} else {
$this->show_tabs_line( $page_tag ); // T O P T A B S in Header
}
?>
is_use_left_navigation ) {
?>
show_tabs_structure( $page_tag );
?>
show_tabs_structure( $page_tag ); // T A B S.
}
wp_nonce_field( 'wpbc_ajax_admin_nonce', 'wpbc_admin_panel_nonce', true, true );
// C o n t e n t
if ( ( isset( $this->current_page_params['subtab'] ) ) && ( isset( $this->current_page_params['subtab']['content'] ) ) ) {
call_user_func( array( $this, $this->current_page_params['subtab']['content'] ) );
} else if ( ( isset( $this->current_page_params['tab'] ) ) && ( isset( $this->current_page_params['tab']['content'] ) ) ) {
call_user_func( array( $this, $this->current_page_params['tab']['content'] ) );
} else {
$this->content();
}
do_action('wpbc_show_settings_content' , $page_tag, $active_page_tab, $active_page_subtab );
if ( $this->is_use_left_navigation ) { ?>
in_page();
$this_page_arr = ( is_array( $this_page ) ) ? $this_page : array( $this_page );
foreach ( $this_page_arr as $this_page ) {
foreach ( $this->tabs() as $this_tab_tag => $this_tab ) { // Get First Tab Element, which MUST be subtab element, all other tabs, can be links, not really showing content!!!
break;
}
if ( empty( $this_tab ) ) {
return $this_page; // this page empty - tabs is empty array, probabaly its was redefined in child CLASS to $tabs = array(); for not ability to open this page.
}
$this_subtab_tag = 0;
$this_subtab = array( 'default' => false );
if ( isset( $this_tab['subtabs'] ) )
foreach ( $this_tab['subtabs'] as $temp_this_subtab_tag => $temp_this_subtab ) {
if ( $temp_this_subtab['type'] == 'subtab' ) { // Get First Subtab element from subtabs array
$this_subtab_tag = $temp_this_subtab_tag;
$this_subtab = $temp_this_subtab;
break;
}
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( ( isset( $_REQUEST['page'] ) ) && ( $this_page == $_REQUEST['page'] ) ) { // We are inside of this page. Menu item selected.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( ( ! isset( $_REQUEST[ $this->tags['tab'] ] ) ) // TAB NOT selected && Default.
// && ( ! isset( $_REQUEST[ $this->tags['subtab'] ] ) ) // SubTab NOT selected.
&& ( isset( $this_tab['default'] ) ) && ( $this_tab['default'] )
) {
$is_page_selected = true;
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( ( isset( $_REQUEST[ $this->tags['tab'] ] ) ) // TAB Selected.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( ! isset( $_REQUEST[ $this->tags['subtab'] ] ) ) // SubTab NOT selected && ! exist || Default.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( $_REQUEST[ $this->tags['tab'] ] === $this_tab_tag )
&& ( ( 0 === $this_subtab_tag ) || ( $this_subtab['default'] ) )
) {
$is_page_selected = true;
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( ( isset( $_REQUEST[ $this->tags['tab'] ] ) ) // TAB Selected.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( isset( $_REQUEST[ $this->tags['subtab'] ] ) ) // SubTab Selected.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( $_REQUEST[ $this->tags['tab'] ] === $this_tab_tag )
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( $_REQUEST[ $this->tags['subtab'] ] === $this_subtab_tag )
) {
$is_page_selected = true;
}
}
// If this page activated, then define Current Page parameters.
if ( $is_page_selected ) {
$this->define_current_page_parameters( $this_tab_tag, $this_tab, $this_subtab_tag, $this_subtab );
}
if ( $is_page_selected ) {
break;
}
}
return $is_page_selected;
}
/**
* Define parameters for current selected page
*
* @param type $paramas
*/
private function define_current_page_parameters( $this_tab_tag, $this_tab, $this_subtab_tag, $this_subtab ) {
$this->current_page_params = array(
'tab' => array_merge( $this_tab, array( 'tag' => $this_tab_tag ) )
, 'subtab' => array_merge( $this_subtab, array( 'tag' => $this_subtab_tag ) )
);
if ( ( ! empty( $this_subtab ) ) && ( ! empty( $this_subtab['is_use_left_navigation'] ) ) && ( true === $this_subtab['is_use_left_navigation'] ) ) {
$this->is_use_left_navigation = true;
}
if ( ( ! empty( $this_subtab ) ) && ( ! empty( $this_subtab['is_use_left_navigation_custom'] ) ) && ( true === $this_subtab['is_use_left_navigation_custom'] ) ) {
$this->is_use_left_navigation_custom = true;
}
// Use Top line as Path and nt the menu // FixIn: 10.4.0.2.
if ( ( ! empty( $this_subtab ) ) && ( ! empty( $this_subtab['is_use_navigation_path'] ) ) ) {
$this->is_use_navigation_path = $this_subtab['is_use_navigation_path'];
}
}
/**
* Get all SubTabs of current opened page Tab
*
* @param string $menu_in_page_tag - Optional. Menu Tag, the same as $this->in_page ();
* @return array
*/
private function get_all_sub_tabs_of_selected_tab( $menu_in_page_tag = false ) {
if ( $menu_in_page_tag === false ) {
//FixIn: 9.8.15.2.3
$this_page = $this->in_page();
$this_page_arr = ( is_array( $this_page ) ) ? $this_page : array( $this_page );
$menu_in_page_tag = $this_page_arr[0];
}
$all_sub_tabs_of_selected_tab = self::$nav_tabs[ $menu_in_page_tag ][ $this->current_page_params['tab']['tag'] ]['subtabs'];
return $all_sub_tabs_of_selected_tab;
}
// -----------------------------------------------------------------------------------------------------------------
// T A B s
// -----------------------------------------------------------------------------------------------------------------
// Define ------------------------------------------------------------------
/**
* Define TABS structure.
* General structure of tabs for every plugin menu page.
*/
public function wpbc_create_plugin_menu_structure_arr() { // Function executed after creation menu in class WPBC_Admin_Menus
/*
Array (
[wpbc-resources] => Array ()
[wpbc-settings] => Array
(
[general] => Array
(
[title] => General
[page_title] => General Settings
...
[subtabs] => Array ()
)
[help] => Array
(
[title] => Help
[page_title] =>
...
[subtabs] => Array ()
)
[form] => Array
(
[title] => Form
[hint] => Customization of Form Fields
[page_title] => Form Fields
...
[subtabs] => Array
(
[goto-form] => Array
(
[type] => goto-link
[title] => Booking Form Fields
...
[content] => content
[update] => update
)
[goto-content-data] => Array
(
[type] => button
[title] => Save Changes
[form] => wpbc_form
...
)
)
)
[payment] => Array
(
[title] => Payments
[hint] => Customization of Payment
[page_title] => Payment Gateways
...
[subtabs] => Array
(
[paypal] => Array
(
[type] => subtab
[title] => PayPal
...
)
[sage] => Array
(
[type] => subtab
[title] => Sage
...
)
)
)
)
)
*/
/**
* self::$nav_tabs =
*
* WP Left Menu | Top Horiz Menu | Vert Left Menu or top submenu
* ? page =wpbc-settings & tab=email & subtab=new-admin
*
* [
* wpbc-settings = [
* general = [...]
* form = [...]
* email = [...,
* subtabs = [
* new-admin = [
* type = "subtab"
* , ...
*/
$this_page = $this->in_page(); // e.g. 'wpbc-settings'
$this_page_arr = ( is_array( $this_page ) ) ? $this_page : array( $this_page ); // [ 'wpbc-settings' ]
// Menu Structure
foreach ( $this_page_arr as $this_page ) {
// WP Left Menu
if ( ! isset( self::$nav_tabs[ $this_page ] ) ) {
self::$nav_tabs[ $this_page ] = array();
}
// Top Horiz Menu - e.g. [ 'calendar_appearance' ] => [ ... ] ]
$local_top_main_menu_arr = $this->tabs();
// Vert Left Menu - or top submenu
$local_vert_left_menu_arr = array();
foreach ( $local_top_main_menu_arr as $tab_tag => $tab_array ) {
if ( isset( $tab_array[ 'subtabs' ] ) ) {
$local_vert_left_menu_arr[ $tab_tag ] = $tab_array[ 'subtabs' ]; // Create new Subtabs array
unset( $local_top_main_menu_arr[ $tab_tag ][ 'subtabs' ] ); // Detach Subtabs array from Tab array. It's required for do not overwrite subtabs with already exist subtabs in previlosly defined tab.
} else {
$local_vert_left_menu_arr[ $tab_tag ] = array();
}
}
foreach ( $local_top_main_menu_arr as $tab_tag => $tab_array ) {
if ( ! isset( self::$nav_tabs[ $this_page ][ $tab_tag ] ) ) { // If this tab ( for exmaple "payment") declared previously, then does not do anything
self::$nav_tabs[ $this_page ][ $tab_tag ] = $local_top_main_menu_arr[ $tab_tag ];
self::$nav_tabs[ $this_page ][ $tab_tag ][ 'subtabs' ] = array();
}
if ( isset(self::$nav_tabs[ $this_page ] ) ) {
// Merge subtabs (Ex: PayPal and Sage) and attach to current tab: (Ex: payment)
self::$nav_tabs[ $this_page ][ $tab_tag ][ 'subtabs' ] = array_merge(
self::$nav_tabs[ $this_page ][ $tab_tag ][ 'subtabs' ]
, $local_vert_left_menu_arr[ $tab_tag ]
);
}
}
}
}
/**
* Get array of visible TABs
* Tabs that do not hided or disbaled
*
* @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page ();
* @return type
*/
private function get_visible_tabs( $menu_in_page_tag ) {
$visible_tabs = array();
foreach ( self::$nav_tabs[ $menu_in_page_tag ] as $tab_tag => $tab ) {
if ( empty( $tab['disabled'] )
&& empty( $tab['hided'] )
) {
$visible_tabs[$tab_tag] = $tab;
}
}
return $visible_tabs;
}
// Showing -----------------------------------------------------------------
/**
*
* @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page ();
* @return boolean - true if nav tabs exist and false if does not exist
*/
public function show_tabs_structure( $menu_in_page_tag ) {
// Exit if no Tabs in this page.
if ( empty( self::$nav_tabs[ $menu_in_page_tag ] ) ) {
return false;
}
// If custom Left Nav.
if ( $this->is_use_left_navigation_custom ) {
do_action( 'wpbc_page_show_left_navigation_custom', $menu_in_page_tag );
return false;
}
// Exit if tabs hided or disabled
$visible_tabs = $this->get_visible_tabs( $menu_in_page_tag );
if ( empty( $visible_tabs ) ) {
return false;
}
if ( ! $this->is_use_left_navigation ) {
?>
get_all_sub_tabs_of_selected_tab( $menu_in_page_tag );
if ( ! empty( $bottom_tabs ) ) { // S U B T A B S
if ( ! $this->is_use_left_navigation ) {
wpbc_bs_toolbar_sub_html_container_start();
$this->show_subtabs_line( $bottom_tabs, $menu_in_page_tag );
wpbc_bs_toolbar_sub_html_container_end();
} else {
$this->show_subtabs_line( $bottom_tabs, $menu_in_page_tag );
}
} // Bottom Tabs
if ( ! $this->is_use_left_navigation ) {
?>in_page ();
*/
function show_top_path( $menu_in_page_tag ) {
$navigation_path_arr = $this->is_use_navigation_path;
if (! empty( $navigation_path_arr ) ) {
if ( ! empty( $navigation_path_arr['path'] ) ) {
foreach ( $navigation_path_arr['path'] as $el_id => $el_arr ) {
$defaults = array(
'tag' => 'a',
'title' => '',
'hint' => '',
'class' => '',
'icon' => false,
'url' => '',
'attr' => array(),
'html' => '',
);
$el_arr = wp_parse_args( $el_arr, $defaults );
$tag = 'span';
if ( in_array( $el_arr['tag'], array( 'a', 'span', 'div', '>', '|' ) ) ) {
$tag = $el_arr['tag'];
}
// Shortcut for 'Next' breadcrumb
if ( '>' === $tag ) {
$tag = 'span';
$el_arr['html'] = '';
$el_arr['attr'] = array( 'style' => 'padding-left: 0;padding-right: 0;' );
}
if ( '|' === $tag ) {
$tag = 'div';
$el_arr['html'] = '
';
$el_arr['attr'] = array( 'style' => 'padding-left: 0;padding-right: 0;' );
}
echo '<' . esc_attr( $tag );
if ( ! empty( $el_arr['action'] ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo ' onclick="javascript:' . $el_arr['action'] . '" ';
// URL .
echo ' href="javascript:void(0);" ';
} elseif ( ! empty( $el_arr['url'] ) ) {
// URL .
echo ' href="' . esc_url( $el_arr['url'] ) . '" ';
}
// Hints .
if ( ! empty( $el_arr['hint'] ) ) {
echo ' data-original-title="' . esc_attr( $el_arr['hint'] ) . '" ';
}
// CSS Class .
echo ' class="nav-tab ' .
( ( ! empty( $el_arr['class'] ) ) ? esc_attr( $el_arr['class'] ) : '' ) .
( ( ! empty( $el_arr['hint'] ) ) ? ' tooltip_top ' : '' ) .
'" ';
// Other attr .
if ( ! empty( $el_arr['attr'] ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo ' ' . WPBC_Settings_API::get_custom_attr_static( array( 'attr' => $el_arr['attr'] ) ) . ' ';
}
echo '>';
// In case if we insert ANY html .
if ( ! empty( $el_arr['html'] ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $el_arr['html'];
}
// Icon .
if ( ! empty( $el_arr['icon'] ) ) {
echo '';
}
// Title .
if ( ! empty( $el_arr['title'] ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '' . ( ( ! empty( $el_arr['icon'] ) ) ? ' ' : '' ) . $el_arr['title'] . '';
}
echo '' . esc_attr( $tag ) . '>';
}
}
}
}
/**
* Show Top nav TABs line
*
* @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page ();
*/
public function show_tabs_line( $menu_in_page_tag ) {
foreach ( self::$nav_tabs[ $menu_in_page_tag ] as $tab_tag => $tab ) {
$css_classes = ( ( isset( $tab['css_classes'] ) ) ? $tab['css_classes'] : '' );
if ( ( isset( $this->current_page_params['tab'] ) ) && ( $this->current_page_params['tab']['tag'] === $tab_tag ) ) {
$css_classes .= ' nav-tab-active';
}
if ( ! empty( $tab['position'] ) ) {
$css_classes .= ' nav-tab-position-' . $tab['position'];
}
if ( ! empty( $tab['hided'] ) ) {
$css_classes .= ' hide';
}
if ( ( isset( $tab['disabled'] ) ) && ( $tab['disabled'] ) ) {
$css_classes .= ' wpdevelop-tab-disabled';
}
$tab['css_classes'] = $css_classes;
$tab['link'] = ( ! empty( $tab['link'] ) ? $tab['link'] : $this->get_tab_url( $menu_in_page_tag, $tab_tag ) );
// Recheck active status of default TAB.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
if ( ( isset( $_REQUEST[ $this->tags['tab'] ] ) ) // Some Tab selected.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( $_REQUEST[ $this->tags['tab'] ] !== $tab_tag ) // This tag not in URL.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing
&& ( isset( $tab['default'] ) && ( $tab['default'] ) ) // This tab default, need to set it as not defaultm for not showing it selected.
) {
$tab['default'] = false;
}
wpbc_bs_display_tab( $tab );
}
}
/**
* Show Sub Menu Lines at the Settings page for Active Tab
*
* @param array $bottom_tabs
* @param string $menu_in_page_tag - Menu Tag, the same as $this->in_page ();
*/
public function show_subtabs_line( $bottom_tabs, $menu_in_page_tag ) {
if ( ! empty( $bottom_tabs ) )
foreach ( $bottom_tabs as $tab_tag => $tab ) {
switch ( $tab['type'] ) {
case 'separator': // Separator
?>
/>get_tab_url( $menu_in_page_tag, $this->current_page_params['tab']['tag'], $tab_tag ) );
if ( $this->is_use_left_navigation ) {
if ( $tab_tag == $this->current_page_params['subtab']['tag'] ) {
$css_classes .= ' wpbc_settings_navigation_item_active';
}
$hint_title = '';
$hint_css_classes = '';
if ( ( ! empty( $tab['hint'] ) ) && ( is_array( $tab['hint'] ) ) ) {
if ( ! empty( $tab['hint']['title'] ) ) {
$hint_title = $tab['hint']['title'];
}
if ( ! empty( $tab['hint']['position'] ) ){
$hint_css_classes .= ' tooltip_' . $tab['hint']['position'];
}
}
$html_tag = 'a';
if ( $tab['disabled'] ) {
$tab['link'] = 'javascript:void(0)';
$html_tag = 'span';
}
?>