cat_ID] = $mx_cat->cat_name; } $categories_tmp = array_unshift($mx_categories, "Select a category:"); $number_entries = array("Select a Number:","1","2","3","4","5","6","7","8","9","10", "12","14", "16", "18", "20" ); $options = array ( array( "name" => "Featured Panel Settings", "type" => "heading", "desc" => "This section customizes the sliding panel area and the number of panels to be displayed.", ), array( "name" => "Featured Panel category", "desc" => "Select the category that you would like to have displayed on the sliding.", "id" => $shortname."_slide_category", "std" => "Uncategorized", "type" => "select", "options" => $mx_categories), array( "name" => "Number of sliding panels", "desc" => "Select the number of panels to display .", "id" => $shortname."_slide_count", "std" => "1", "type" => "select", "options" => $number_entries), array( "name" => "About Me Settings", "type" => "heading", "desc" => "Set your About me image and text from here .", ), array("name" => "About me Image", "desc" => "Enter your avatar image url here.", "id" => $shortname."_img", "std" => "My image", "type" => "text"), array("name" => "About me text", "desc" => "Enter some descriptive text about you, or your site.", "id" => $shortname."_about", "std" => "There is something about me..", "type" => "textarea"), ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=dashboard.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); update_option( $value['id'], $value['std'] );} header("Location: themes.php?page=dashboard.php&reset=true"); die; } } add_theme_page($themename." Options", "$themename Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

'; if ( $_REQUEST['reset'] ) echo '

'.$themename.' settings reset.

'; ?>

theme options

: " size="40" />

:

:


Preview (updated when options are saved)

For support related issues visit the dannci.com