Commits

Doug Stewart committed 0c3593f

Tabbed interface causing havok in saving options. Almost fixed.

  • Participants
  • Parent commits 2cb7bd1

Comments (0)

Files changed (2)

File 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 );
 	}
 }

File 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 );