cat_ID] = $category_list->cat_name; } array_unshift($wp_cats, "Choose a category"); $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "General", "type" => "section"), array( "type" => "open"), array( "name" => "Colour Scheme", "desc" => "Select the colour scheme for the theme", "id" => $shortname."_color_scheme", "type" => "select", "options" => array("blue", "red", "green"), "std" => "red"), array( "name" => "Adsense user ID", "desc" => "Enter your id.
Lite users will have to copy+paste
adsense code into the boxes below.", "id" => $shortname."_adsense", "type" => "text", "disabled" => "yes", "std" => "pub-0"), array( "name" => "Header adcode", "desc" => "Add your header ad code here
(text links work best 728x15)", "id" => $shortname."_ads_header", "type" => "textarea", "std" => ''), array( "name" => "footer adcode", "desc" => "Add your footer ad code here (728x90)", "id" => $shortname."_ads_footer", "type" => "textarea", "std" => ""), array( "name" => "sidebar top adcode", "desc" => "Add your sidebar top ad code here (336x280)", "id" => $shortname."_ads_top_sidebar", "type" => "textarea", "std" => ""), array( "name" => "sidebar adcode", "desc" => "Add your sidebar ad code here (160x600)", "id" => $shortname."_ads_sidebar", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Advanced", "type" => "section"), array( "type" => "open"), array( "name" => "Google search code", "desc" => "Enter your cse code here.
Example: partner-pub-4092298816046576:1ezviuo0idi", "id" => $shortname."_gsearch", "type" => "text", "std" => ""), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Google Analytics Code", "desc" => "You can paste your Google Analytics or other tracking code in this box. This will be automatically added to the footer.", "id" => $shortname."_ga_code", "type" => "textarea", "std" => ""), array( "name" => "Feedburner URL", "desc" => "Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website", "id" => $shortname."_feedburner", "type" => "text", "std" => get_bloginfo('rss2_url')), array( "type" => "close") ); 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: admin.php?page=functions.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=functions.php&reset=true"); die; } } add_menu_page($themename, $themename, 'administrator', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("functions", $file_dir."/functions/functions.css", false, "1.0", "all"); wp_enqueue_script("rm_script", $file_dir."/functions/rm_script.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( $_REQUEST['saved'] ) echo '

'.$themename.' settings saved.

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

'.$themename.' settings reset.

'; ?>

Settings


To easily use the theme, you can use the menu below.

" name="" id="" type="" value="" />
/>

You must be logged in to post a comment.

/>

XHTML: You can use these tags:

ID); ?>