$themename ." Theme Options", "type" => "title"), array( "name" => "General Options", "type" => "section"), array( "type" => "open"), array( "name" => "Hide header titles", "desc" => "Hide the themes header title text", "id" => $shortname."_hide_titles", "type" => "checkbox", "std" => false), array( "name" => "Hide top menu", "desc" => "Hide the themes header top menu bar", "id" => $shortname."_hide_top_menu", "type" => "checkbox", "std" => false), array( "name" => "Hide main menu", "desc" => "Hide the themes main menu bar", "id" => $shortname."_hide_lower_menu", "type" => "checkbox", "std" => false), array( "name" => "Hide Side Icons", "desc" => "Hide the right vertical social icons", "id" => $shortname."_hide_vertical_icons", "type" => "checkbox", "std" => false), array( "name" => "Hide Footer Icons", "desc" => "Hide the horizontal footer social icons", "id" => $shortname."_hide_footer_icons", "type" => "checkbox", "std" => false), array( "type" => "close"), array( "name" => "Sidebar Widgets", "type" => "section"), array( "type" => "open"), array( "name" => "Hide Page Menu", "desc" => "Hide the sidebar page menu section", "id" => $shortname."_hide_menu", "type" => "checkbox", "std" => false), array( "name" => "Hide Categories", "desc" => "Hide the sidebar categories section", "id" => $shortname."_hide_categories", "type" => "checkbox", "std" => false), array( "name" => "Hide Archives", "desc" => "Hide the sidebar archive section", "id" => $shortname."_hide_archives", "type" => "checkbox", "std" => false), array( "name" => "Hide Calendar", "desc" => "Hide the sidebar calendar section", "id" => $shortname."_hide_calendar", "type" => "checkbox", "std" => false), array( "name" => "Hide Links", "desc" => "Hide the sidebar links section", "id" => $shortname."_hide_links", "type" => "checkbox", "std" => false), array( "name" => "Hide Meta", "desc" => "Hide the sidebar meta section", "id" => $shortname."_hide_meta", "type" => "checkbox", "std" => false), array( "name" => "Hide Search", "desc" => "Hide the sidebar search section", "id" => $shortname."_hide_search", "type" => "checkbox", "std" => false), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Footer Text", "desc" => "Company Footer Text", "id" => $shortname."_footer_text", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Social Icons", "type" => "section"), array( "type" => "open"), array( "name" => "RSS Icon", "desc" => "Option: select a different the rss icon", "id" => $shortname."_rss_icon", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Icon", "desc" => "Option: select a social media icon", "id" => $shortname."_icon_1", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Link", "desc" => "URL to your social media, starting http:// or mailto:", "id" => $shortname."_icon_1_url", "type" => "text", "std" => ""), array( "name" => "Social Media Alt Text", "desc" => "Enter alternate text for social the media icon", "id" => $shortname."_icon_1_alt", "type" => "text", "std" => ""), array( "name" => "Social Media Icon", "desc" => "Option: select a social media icon", "id" => $shortname."_icon_2", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Link", "desc" => "URL to your social media, starting http:// or mailto:", "id" => $shortname."_icon_2_url", "type" => "text", "std" => ""), array( "name" => "Social Media Alt Text", "desc" => "Enter alternate text for social the media icon", "id" => $shortname."_icon_2_alt", "type" => "text", "std" => ""), array( "name" => "Social Media Icon", "desc" => "Option: select a social media icon", "id" => $shortname."_icon_3", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Link", "desc" => "URL to your social media, starting http:// or mailto:", "id" => $shortname."_icon_3_url", "type" => "text", "std" => ""), array( "name" => "Social Media Alt Text", "desc" => "Enter alternate text for the media icon", "id" => $shortname."_icon_3_alt", "type" => "text", "std" => ""), array( "name" => "Social Media Icon", "desc" => "Option: select a social media icon", "id" => $shortname."_icon_4", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Link", "desc" => "URL to your social media, starting http:// or mailto:", "id" => $shortname."_icon_4_url", "type" => "text", "std" => ""), array( "name" => "Social Media Alt Text", "desc" => "Enter alternate text for the media icon", "id" => $shortname."_icon_4_alt", "type" => "text", "std" => ""), array( "name" => "Social Media Icon", "desc" => "Option: select a social media icon", "id" => $shortname."_icon_5", "type" => "select", "options" => $icons, "std" => ""), array( "name" => "Social Media Link", "desc" => "URL to your social media, starting http:// or mailto:", "id" => $shortname."_icon_5_url", "type" => "text", "std" => ""), array( "name" => "Social Media Alt Text", "desc" => "Enter alternate text for the media icon", "id" => $shortname."_icon_5_alt", "type" => "text", "std" => ""), array( "type" => "close"), ); function mytheme_style_init() { global $shortname; $file_dir=get_bloginfo('template_directory'); wp_enqueue_style("theme_functions", $file_dir."/admin.css", false, "1.0", "all"); } function mytheme_add_admin() { global $themename, $shortname, $adminOptions, $selectedPageID; if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__file__) ) { if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) { foreach ($adminOptions as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($adminOptions as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=admin-options.php&saved=true"); die; } else if( isset( $_REQUEST['action'] ) && 'reset' == $_REQUEST['action'] ) { foreach ($adminOptions as $value) { delete_option( $value['id'] ); } header("Location: themes.php?page=admin-options.php&reset=true"); die; } } add_theme_page("Theme Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $adminOptions, $selectedPageID, $mypagename; $i=0; if ( isset( $_REQUEST['saved'] ) && $_REQUEST['saved'] ) echo '

'.$themename. ' '.$mypagename .' page settings saved.

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

'.$themename.' '.$mypagename .' page settings reset.

'; ?>

Theme Settings


" /> " />
" /> " />
/>

WARNING: Reset will clear all the values!