wpsc_admin_tabs()WPSCache 1.0

No Hooks.

Return

null. Nothing (null).

Usage

wpsc_admin_tabs( $current );
$current **
-
Default: ''

wpsc_admin_tabs() code WPSCache 1.11.0

function wpsc_admin_tabs( $current = '' ) {
	global $cache_enabled, $super_cache_enabled, $wp_cache_mod_rewrite;

	if ( '' === $current ) {
		$current = ! empty( $_GET['tab'] ) ? stripslashes( $_GET['tab'] ) : ''; // WPCS: CSRF ok, sanitization ok.
	}

	$admin_url  = admin_url( 'options-general.php?page=wpsupercache' );
	$admin_tabs = array(
		'easy'     => __( 'Easy', 'wp-super-cache' ),
		'settings' => __( 'Advanced', 'wp-super-cache' ),
		'cdn'      => __( 'CDN', 'wp-super-cache' ),
		'contents' => __( 'Contents', 'wp-super-cache' ),
		'preload'  => __( 'Preload', 'wp-super-cache' ),
		'plugins'  => __( 'Plugins', 'wp-super-cache' ),
		'debug'    => __( 'Debug', 'wp-super-cache' ),
	);

	echo '<div class="wpsc-nav-container"><ul class="wpsc-nav">';

	foreach ( $admin_tabs as $tab => $name ) {
		printf(
			'<li class="%s"><a href="%s">%s</a></li>',
			esc_attr( $tab === $current ? 'wpsc-nav-tab wpsc-nav-tab-selected' : 'wpsc-nav-tab' ),
			esc_url_raw( add_query_arg( 'tab', $tab, $admin_url ) ),
			esc_html( $name )
		);
	}

	echo '</ul></div>';
}