public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/admin/functions.php
/**
 * Generates the tab header for the page.
 *
 * @since 1.0.0
 *
 * @param array  $tabList The list of tabs to create (name => label)
 * @param string $tabID The CSS ID of the tab wrapper for the page.
 * @param string $currentTab The current tab to show (using name)
 *
 * @return string The rendered tab header for the page. A closing </div> is needed to complete this wrapper.
 */
Generates the tab header for the page.

@param array  $tabList The list of tabs to create (name => label)
@param string $tabID The CSS ID of the tab wrapper for the page.
@param string $currentTab The current tab to show (using name)

@return string The rendered tab header for the page. A closing  is needed to complete this wrapper.
Generates the tab header for the page . @param array $tabList The list of tabs to create ( name = > label ) @param string $tabID The CSS ID of the tab wrapper for the page . @param string $currentTab The current tab to show ( using name ) @return string The rendered tab header for the page . A closing is needed to complete this wrapper .
function WPCW_tabs_generateTabHeader( $tabList, $tabID, $currentTab = false ) {
	$html = false;
	$html .= sprintf( '<div class="wpcw_tab_wrapper" id="%s"><div class="wpcw_tab_wrapper_tabs">', $tabID );
	if ( ! $currentTab ) {
		$currentTab = current( array_keys( $tabList ) );
	}
	foreach ( $tabList as $tabName => $tabDetails ) {
		$class = ( $tabName == $currentTab ) ? ' wpcw_tab_active' : '';
		if ( isset( $tabDetails['cssclass'] ) ) {
			$class .= ' ' . $tabDetails['cssclass'];
		}
		$html .= sprintf( '<a class="wpcw_tab%s" href="#" data-tab="%s" id="wpcw_tab_%s">%s</a>', $class, $tabName, $tabName, $tabDetails['label'] );
	}
	$html .= '</div>'; 
	return $html;
}
function WPCW_tabs_generateTabHeader ( $ tabList , $ tabID , $ currentTab = false ) { $ html = false ; $ html .= sprintf ( '<div class="wpcw_tab_wrapper" id="%s"><div class="wpcw_tab_wrapper_tabs">' , $ tabID ) ; if ( ! $ currentTab ) { $ currentTab = current ( array_keys ( $ tabList ) ) ; } foreach ( $ tabList as $ tabName => $ tabDetails ) { $ class = ( $ tabName == $ currentTab ) ? ' wpcw_tab_active' : '' ; if ( isset ( $ tabDetails [ 'cssclass' ] ) ) { $ class .= ' ' . $ tabDetails [ 'cssclass' ] ; } $ html .= sprintf ( '<a class="wpcw_tab%s" href="#" data-tab="%s" id="wpcw_tab_%s">%s</a>' , $ class , $ tabName , $ tabName , $ tabDetails [ 'label' ] ) ; } $ html .= '</div>' ; return $ html ; }
Generates the tab header for the page.
Generates the tab header for the page .
// Generate the tabs // Select the first tab if no tab has been selected // Now render each of the tabs on the page. // Work out the CSS class if selected // Any extra classes // .wpcw_tab_wrapper_tabs