Commits

Doug Stewart committed 7730cd9

Let's make the display of options hookable, so as to make child theme options that much easier.

Comments (0)

Files changed (2)

includes/functions/admin.php

 	$themename = $lblg_themename;
 	$shortname = $lblg_shortname;
 	$options = $lblg_default_options;
-
-    if ( isset( $_GET['save'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
-    if ( isset( $_GET['reset'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
 ?>
 <div class="wrap">
 <form method="post" action="options.php">
 </h2>
 
 <?php 
+	if ( isset( $_REQUEST['settings-updated'] ) ) echo '<div id="message" class="updated under-h2"><p><strong>'.$themename.' settings updated.</strong></p></div>';
+
 	settings_fields( $lblg_shortname . '_lblg_options' ); 
 	//do_settings_sections( 'lblg_options_group' );
 ?>
 }
 
 /*
- * lblg_print_options() is responsible for printing all the theme options in the theme's
+ * lblg_options_walker() is responsible for printing all the theme options in the theme's
  * options screen.
  */
-function lblg_print_options(){
+function lblg_options_walker(){
 	global $lblg_options, $lblg_default_options, $lblg_shortname;
 	$section = '';
 	$lblg_options_group = $lblg_shortname . '_lblg_options';

includes/functions/hooks.php

 	do_action( 'lblg_print_credits' );
 }
 
+function lblg_print_options(){
+	do_action( 'lblg_print_options' );
+}
+
 function lblg_enqueue_styles(){
 	do_action( 'lblg_enqueue_styles' );
 }
 add_action( 'lblg_print_copyright', 'lblg_echo_copyright' );
 add_action( 'lblg_print_credits', 'lblg_credits' );
 add_action( 'lblg_enqueue_styles', 'lblg_styles' );
+add_action( 'lblg_print_options', 'lblg_options_walker' );
 
 // WordPress core hooks
 add_action( 'wp_head', 'lblg_wp_head' );