Commits

Doug Stewart committed 0c3593f

Tabbed interface causing havok in saving options. Almost fixed.

Comments (0)

Files changed (2)

includes/functions/admin.php

 		lblg_options_walker( $lblg_options, $lblg_default_options, $lblg_shortname );
 	} else {
 		if( isset($_GET['tab'] )) {
-			$current_tab = $_GET['tab'];
+			$current_tab = esc_html( $_GET['tab'] );
 		} else {
 			$current_tab = 'general';
 		}
 		
+		echo '<input type="hidden" name="' . $lblg_shortname . '_theme_options[tab]" value="' . $current_tab . '" />';
+
 		lblg_options_walker( $lblg_options, $lblg_default_options[$current_tab]['contents'], $lblg_shortname );
 	}
 }

includes/functions/options.php

 	
 	$submit = ( ! empty( $input['save']) ? true : false );
 	$reset = ( ! empty( $input['reset']) ? true : false );
+	$tabbed = ( !empty( $input['tab']) ? true : false );
 		
 	if( $reset ){
 		$valid_input = lblg_get_options_from_defaults( $lblg_default_options );
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.