cat_ID] = $of_cat->cat_name;} $categories_tmp = array_unshift($of_categories, "Select a category:"); //Access the WordPress Pages via an Array $of_pages = array(); $of_pages_obj = get_pages('sort_column=post_parent,menu_order'); foreach ($of_pages_obj as $of_page) { $of_pages[$of_page->ID] = $of_page->post_name; } $of_pages_tmp = array_unshift($of_pages, "Select a page:"); // Image Alignment radio box $options_thumb_align = array("alignleft" => "Left","alignright" => "Right","aligncenter" => "Center"); // Image Links to Options $options_image_link_to = array("image" => "The Image","post" => "The Post"); //Testing $options_select = array("one","two","three","four","five"); $options_radio = array("one" => "One","two" => "Two","three" => "Three","four" => "Four","five" => "Five"); //Stylesheets Reader $alt_stylesheet_path = OF_FILEPATH . '/inc/styles/'; $alt_stylesheets = array(); if ( is_dir($alt_stylesheet_path) ) { if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) { while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) { if(stristr($alt_stylesheet_file, ".css") !== false) { $alt_stylesheets[] = $alt_stylesheet_file; } } } } //More Options $uploads_arr = wp_upload_dir(); $all_uploads_path = $uploads_arr['path']; $all_uploads = get_option('of_uploads'); $other_entries = array("Select a number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"); $body_repeat = array("no-repeat","repeat-x","repeat-y","repeat"); $body_pos = array("top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"); // Set the Options Array $options = array(); $options[] = array( "name" => "Layout Settings", "type" => "heading"); $url = get_bloginfo('template_url') . '/inc/images/'; $options[] = array( "name" => "Main Layout", "desc" => "Select main content and sidebar alignment. Choose between various layouts.", "id" => $shortname."_layout", "std" => "one-col", "type" => "images", "options" => array( 'one-col' => $url . '1c.png', 'two-col-left' => $url . '2cl.png', 'two-col-right' => $url . '2cr.png', 'three-col-middle' => $url . '3cm.png', 'three-col-right' => $url . '3cr.png', 'three-col-left' => $url . '3cl.png') ); $options[] = array( "name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme. Notice: lookslikeemire.css looks best with a two column layout. lookslikeambiru.css looks best with a single column layout. If using lookslikeambiru.css, you'll need to remove the original header image from Appearence > Header.", "id" => $shortname."_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets); $options[] = array( "name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block. Notice: Switching theme stylesheets will remove any custom changes!", "id" => $shortname."_custom_css", "std" => "", "type" => "textarea"); $options[] = array( "name" => "Footer Options", "type" => "heading"); $options[] = array( "name" => "Enable Custom Footer (Left)", "desc" => "Activate to add the custom text below to the theme footer.", "id" => $shortname."_footer_left", "std" => "false", "type" => "checkbox"); $options[] = array( "name" => "Custom Text (Left)", "desc" => "Custom HTML and Text that will appear in the footer of your theme.", "id" => $shortname."_footer_left_text", "std" => "", "type" => "textarea"); $options[] = array( "name" => "Enable Custom Footer (Right)", "desc" => "Activate to add the custom text below to the theme footer.", "id" => $shortname."_footer_right", "std" => "false", "type" => "checkbox"); $options[] = array( "name" => "Custom Text (Right)", "desc" => "Custom HTML and Text that will appear in the footer of your theme.", "id" => $shortname."_footer_right_text", "std" => "", "type" => "textarea"); $options[] = array( "name" => "Misc. Settings", "type" => "heading"); $options[] = array( "name" => "Custom Favicon", "desc" => "Upload a 16px x 16px Png/Gif image that will represent your website's favicon. Upload not working? Specify an image URL directly.", "id" => $shortname."_custom_favicon", "std" => "", "type" => "upload"); $options[] = array( "name" => "Google Analytics Code", "desc" => "Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.", "id" => $shortname."_google_analytics", "std" => "", "type" => "textarea"); update_option('of_template',$options); update_option('of_themename',$themename); update_option('of_shortname',$shortname); } } ?>