Commits

Doug Stewart committed 5b1fca3

Starting to build tabbed functionality in the admin.

Comments (0)

Files changed (2)

includes/functions/admin.php

 }
 add_action( 'admin_init', 'lblg_admin_init' );
 
+function lblg_output_admin_tabs(){
+	if( isset($_GET['tab'] )) {
+		$current_tab = $_GET['tab'];
+	} else {
+		$current_tab = 'general';
+	}
+	
+	$tabs = lblg_get_admin_tabs();
+	echo '<h2 class="nav-tab-wrapper">';
+	echo '<a href="http://localhost" class="nav-tab">Localhost</a><a href="http://localhost" class="nav-tab nav-tab-active">Localhost Active</a></h2>';
+}
+//add_action( 'lblg_after_admin_header', 'lblg_output_admin_tabs' );
+
+function lblg_get_admin_tabs(){
+	global $lblg_default_options;
+	
+	print_r($lblg_default_options);
+}
+
 // Display the theme options page
 function lblg_admin() {
 	global $lblg_shortname, $lblg_themename, $lblg_version, $lblg_options, $lblg_default_options;
 <h2 class="updatehook"><?php echo $lblg_themename; ?> settings 
 <?php lblg_print_option_buttons(); ?>
 </h2>
+<?php
+	lblg_after_admin_header();
 
-<?php 
 	if ( isset( $_REQUEST['settings-updated'] ) ) echo '<div id="message" class="updated under-h2"><p><strong>'.$lblg_themename.' settings updated.</strong></p></div>';
 
 	settings_fields( $lblg_shortname . '_theme_options' ); 
 function lblg_option_wrapper_footer( $values ){
 	?>
 		<br /><br />
-		<?php echo $values['desc']; ?>
+		<span class="description"><?php echo $values['desc']; ?></span>
 	    </td>
 	</tr>
 	<?php 

includes/functions/hooks.php

 	do_action( 'lblg_set_themename' );
 }
 
+
+function lblg_after_admin_header(){
+	do_action( 'lblg_after_admin_header' );
+}
 function lblg_print_title(){
 	do_action( 'lblg_print_title' );
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.