示例#1
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "Wootique";
     $themeslug = "wootique";
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = "woo";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $other_entries = array("Select a number:", "4", "8", "12");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     // General
     $options[] = array("name" => "General Settings", "type" => "heading", "icon" => "general");
     //$options[] = array( "name" => "Theme Stylesheet",
     //					"desc" => "Select your themes alternative color scheme.",
     //					"id" => $shortname."_alt_stylesheet",
     //					"std" => "default.css",
     //					"type" => "select",
     //					"options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable text-based Site Title and Tagline. Setup title & tagline in <a href='" . home_url() . "/wp-admin/options-general.php'>General Settings</a>.", "id" => $shortname . "_texttitle", "std" => "true", "type" => "checkbox");
     //$options[] = array( "name" => "Site Title",
     //					"desc" => "Change the site title typography.",
     //					"id" => $shortname."_font_site_title",
     //					"std" => array( 'size' => '30','unit' => 'px','face' => 'Droid Serif','style' => 'bold','color' => '#333333'),
     //					"class" => "hidden",
     //					"type" => "typography" );
     $options[] = array("name" => "Site Description", "desc" => "Enable the site description/tagline under site title.", "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     //$options[] = array( "name" => "Site Description",
     //					"desc" => "Change the site description typography.",
     //					"id" => $shortname."_font_tagline",
     //					"std" => array( 'size' => '12','unit' => 'px','face' => 'Droid Sans','style' => '','color' => '#999999'),
     //					"class" => "hidden last",
     //					"type" => "typography" );
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => "E-Mail Subscription URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting 'Contact Form' as page template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Search scope", "desc" => "Select whether you want the search in the header to search for products or posts ", "id" => $shortname . "_header_search_scope", "type" => "select2", "options" => array("products" => "Products", "posts" => "Posts"));
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Post Author Box", "desc" => "This will enable the post author box on the single posts page. Edit description in <a href='" . home_url() . "/wp-admin/profile.php'>Profile</a>.", "id" => $shortname . "_post_author", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Display Breadcrumbs", "desc" => "Display dynamic breadcrumbs on each page of your website.", "id" => $shortname . "_breadcrumbs_show", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Pagination Style", "desc" => "Select the style of pagination you would like to use on the blog.", "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => "Numbers", "simple" => "Next/Previous"));
     /* Homepage settings */
     $options[] = array("name" => "Homepage Settings", "icon" => "slider", "type" => "heading");
     $options[] = array("name" => "Homepage content", "desc" => "Display your latest post on the homepage above the slider.", "id" => $shortname . "_homepage_content", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Homepage Featured Products", "desc" => "Display featured products as a slider or a static grid", "id" => $shortname . "_featured_product_style", "type" => "select2", "options" => array("slider" => "Slider", "simple" => "Static grid"));
     $options[] = array("name" => "Featured Entries", "desc" => "Select the number of entries that should appear in the featured slider/grid.", "id" => $shortname . "_featured_product_limit", "std" => "8", "type" => "select", "options" => $other_entries);
     // Styling
     $options[] = array("name" => "Styling Options", "type" => "heading", "icon" => "styling");
     $options[] = array("name" => "Background Color", "desc" => "Pick a custom color for the background of your website e.g. #697e09.", "id" => "woo_background_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Menu /Footer Opacity", "desc" => "Define a different opacity for your menu and footer (from 0 - 1)", "id" => $shortname . "_menu_opacity", "std" => "0.3", "type" => "select", "options" => array('0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'));
     $options[] = array("name" => "Container Shadow Strength", "desc" => "Define the strength of the drop shadow on the main container (from 0 - 1, 0 will disable the drop shadow)", "id" => $shortname . "_container_shadow", "std" => "0.3", "type" => "select", "options" => array('0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'));
     $options[] = array("name" => "Background Image", "desc" => "Upload an image for the theme's background", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background Image Repeat", "desc" => "Select how you would like to repeat the background-image", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Background Image Position", "desc" => "Select how you would like to position the background", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Background Attachment", "desc" => "Select whether the background should be fixed or move when the page scrolls", "id" => $shortname . "_body_attachment", "std" => "scroll", "type" => "select", "options" => array("scroll", "fixed"));
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     /* Typography */
     $options[] = array("name" => "Typography", "type" => "heading", "icon" => "typography");
     $options[] = array("name" => "Enable Custom Typography", "desc" => "Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.", "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "General Typography", "desc" => "Change the general font.", "id" => $shortname . "_font_body", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Georgia', 'style' => 'normal', 'color' => ''), "type" => "typography");
     $options[] = array("name" => "Navigation", "desc" => "Change the navigation font.", "id" => $shortname . "_font_nav", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Varela Round', 'style' => 'normal', 'color' => ''), "type" => "typography");
     $options[] = array("name" => "Post Title", "desc" => "Change the post title.", "id" => $shortname . "_font_post_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Varela Round', 'style' => 'normal', 'color' => ''), "type" => "typography");
     $options[] = array("name" => "Post Meta", "desc" => "Change the post meta.", "id" => $shortname . "_font_post_meta", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => "Post Entry", "desc" => "Change the post entry.", "id" => $shortname . "_font_post_entry", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Varela Round', 'style' => 'normal', 'color' => ''), "type" => "typography");
     $options[] = array("name" => "Widget Titles", "desc" => "Change the widget titles.", "id" => $shortname . "_font_widget_titles", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'Varela Round', 'style' => 'normal', 'color' => ''), "type" => "typography");
     /* Layout */
     $options[] = array("name" => "Layout Options", "type" => "heading", "icon" => "layout");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => "Main Layout", "desc" => "Select which layout you want for your site.", "id" => $shortname . "_site_layout", "std" => "layout-left-content", "type" => "images", "options" => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array("name" => "Category Exclude - Homepage", "desc" => "Specify a comma seperated list of category IDs or slugs that you'd like to exclude from your homepage (eg: uncategorized).", "id" => $shortname . "_exclude_cats_home", "std" => "", "type" => "text");
     $options[] = array("name" => "Category Exclude - Blog Page Template", "desc" => "Specify a comma seperated list of category IDs or slugs that you'd like to exclude from your 'Blog' page template (eg: uncategorized).", "id" => $shortname . "_exclude_cats_blog", "std" => "", "type" => "text");
     /* Dynamic Images */
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => 'Dynamic Image Resizing', "desc" => "", "id" => $shortname . "_wpthumb_notice", "std" => 'There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', "type" => "info");
     $options[] = array("name" => "WP Post Thumbnail", "desc" => "Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Dynamic Image Resizing", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Hard Crop", "desc" => "The post thumbnail will be cropped to match the target aspect ratio (only used if 'Dynamic Image Resizing' is enabled).", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "TimThumb - Custom Settings Panel", "desc" => "This will enable the <a href='http://code.google.com/p/timthumb/'>TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. <a href='http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/'>Need help?</a>", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbnail", "desc" => "If no thumbnail is specifified then the first uploaded image in the post is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => 'Height')));
     $options[] = array("name" => "Thumbnail Alignment", "desc" => "Select how to align your thumbnails with posts.", "id" => $shortname . "_thumb_align", "std" => "alignleft", "type" => "select2", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Single Post - Show Thumbnail", "desc" => "Show the thumbnail in the single post page.", "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Single Post - Thumbnail Dimensions", "desc" => "Enter an integer value i.e. 250 for the image size. Max width is 576.", "id" => $shortname . "_image_dimensions", "std" => "", "class" => "hidden last", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => 'Width'), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => 'Height')));
     $options[] = array("name" => "Single Post - Thumbnail Alignment", "desc" => "Select how to align your thumbnail with single posts.", "id" => $shortname . "_thumb_single_align", "std" => "alignright", "type" => "select2", "class" => "hidden", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings panel to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     /* Footer */
     $options[] = array("name" => "Footer Customization", "type" => "heading", "icon" => "footer");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => "Footer Widget Areas", "desc" => "Select how many footer widget areas you want to display.", "id" => $shortname . "_footer_sidebars", "std" => "3", "type" => "images", "options" => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $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");
     /* Subscribe & Connect */
     $options[] = array("name" => "Subscribe & Connect", "type" => "heading", "icon" => "connect");
     $options[] = array("name" => "Enable Subscribe & Connect - Single Post", "desc" => "Enable the subscribe & connect area on single posts. You can also add this as a <a href='" . home_url() . "/wp-admin/widgets.php'>widget</a> in your sidebar.", "id" => $shortname . "_connect", "std" => 'false', "type" => "checkbox");
     $options[] = array("name" => "Subscribe Title", "desc" => "Enter the title to show in your subscribe & connect area.", "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => "Text", "desc" => "Change the default text in this area.", "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => "Subscribe By E-mail ID (Feedburner)", "desc" => "Enter your <a href='http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78982'>Feedburner ID</a> for the e-mail subscription form.", "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => 'Subscribe By E-mail to MailChimp', 'woothemes', "desc" => 'If you have a MailChimp account you can enter the <a href="http://woochimp.heroku.com" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', "id" => $shortname . "_connect_mailchimp_list_url", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable RSS", "desc" => "Enable the subscribe and RSS icon.", "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => "Twitter URL", "desc" => "Enter your  <a href='http://www.twitter.com/'>Twitter</a> URL e.g. http://www.twitter.com/woothemes", "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => "Facebook URL", "desc" => "Enter your  <a href='http://www.facebook.com/'>Facebook</a> URL e.g. http://www.facebook.com/woothemes", "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => "YouTube URL", "desc" => "Enter your  <a href='http://www.youtube.com/'>YouTube</a> URL e.g. http://www.youtube.com/woothemes", "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => "Flickr URL", "desc" => "Enter your  <a href='http://www.flickr.com/'>Flickr</a> URL e.g. http://www.flickr.com/woothemes", "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => "LinkedIn URL", "desc" => "Enter your  <a href='http://www.www.linkedin.com.com/'>LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes", "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => "Delicious URL", "desc" => "Enter your <a href='http://www.delicious.com/'>Delicious</a> URL e.g. http://www.delicious.com/woothemes", "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => "Google+ URL", "desc" => "Enter your <a href='http://plus.google.com/'>Google+</a> URL e.g. https://plus.google.com/104560124403688998123/", "id" => $shortname . "_connect_googleplus", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable Related Posts", "desc" => "Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.", "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     /* Advertising */
     //$options[] = array( "name" => "Top Ad (468x60px)",
     //					"type" => "heading",
     //					"icon" => "ads" );
     //$options[] = array( "name" => "Enable Ad",
     //					"desc" => "Enable the ad space",
     //					"id" => $shortname."_ad_top",
     //					"std" => "false",
     //					"type" => "checkbox" );
     //$options[] = array( "name" => "Adsense code",
     //					"desc" => "Enter your adsense code (or other ad network code) here.",
     //					"id" => $shortname."_ad_top_adsense",
     //					"std" => "",
     //					"type" => "textarea" );
     //$options[] = array( "name" => "Image Location",
     //					"desc" => "Enter the URL to the banner ad image location.",
     //					"id" => $shortname."_ad_top_image",
     //					"std" => "http://www.woothemes.com/ads/468x60b.jpg",
     //					"type" => "upload" );
     //$options[] = array( "name" => "Destination URL",
     //					"desc" => "Enter the URL where this banner ad points to.",
     //					"id" => $shortname."_ad_top_url",
     //					"std" => "http://www.woothemes.com",
     //					"type" => "text" );
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     $woo_metaboxes = array();
     global $post;
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "Center", "label" => "Image Crop Alignment", "type" => "select2", "desc" => "Select crop alignment for resized image", "options" => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar)");
     }
     // End post
     $woo_metaboxes[] = array("name" => "_layout", "std" => "normal", "label" => "Layout", "type" => "images", "desc" => "Select the layout you want on this specific post/page.", "options" => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
         $woo_metaboxes[] = array("name" => "slide_layout", "label" => "Slider Overlay Layout", "desc" => "Specify where you want the slider overlay content to display", "std" => "right", "type" => "select2", "options" => array("left" => "Left", "right" => "Right", "top" => "Top", "bottom" => "Bottom"));
         $woo_metaboxes[] = array("name" => "slide-url", "label" => "Slide URL", "type" => "text", "desc" => "Enter a URL for the slide to click through to.");
     }
     // End post
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
 function woo_options()
 {
     // VARIABLES
     $themename = "Premiere";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/premiere/';
     $shortname = "woo";
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = TEMPLATEPATH . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     // General
     $options[] = array("name" => "General Settings", "type" => "heading", "icon" => "general");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable text-based Site Title and Tagline. Setup title & tagline in <a href='" . home_url() . "/wp-admin/options-general.php'>General Settings</a>.", "id" => $shortname . "_texttitle", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Site Title", "desc" => "Change the site title typography.", "id" => $shortname . "_font_site_title", "std" => array('size' => '32', 'unit' => 'px', 'face' => 'PT Sans', 'style' => '', 'color' => '#00ADB3'), "class" => "hidden", "type" => "typography");
     $options[] = array("name" => "Site Description", "desc" => "Enable the site description/tagline under site title.", "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Site Description", "desc" => "Change the site description typography.", "id" => $shortname . "_font_tagline", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'PT Sans', 'style' => '', 'color' => '#FFFEFE'), "class" => "hidden last", "type" => "typography");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => "E-Mail Subscription URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting 'Contact Form' as page template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Post Author Box", "desc" => "This will enable the post author box on the single posts page. Edit description in <a href='" . home_url() . "/wp-admin/profile.php'>Profile</a>.", "id" => $shortname . "_post_author", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Display Breadcrumbs", "desc" => "Display dynamic breadcrumbs on each page of your website.", "id" => $shortname . "_breadcrumbs_show", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Pagination Style", "desc" => "Select the style of pagination you would like to use on the blog.", "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => "Numbers", "simple" => "Next/Previous"));
     // Styling
     $options[] = array("name" => "Styling Options", "type" => "heading", "icon" => "styling");
     $options[] = array("name" => "Body Background Color", "desc" => "Pick a custom color for background color of the theme e.g. #697e09", "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Body background image", "desc" => "Upload an image for the theme's background", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background image repeat", "desc" => "Select how you would like to repeat the background-image", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Background image position", "desc" => "Select how you would like to position the background", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Button Color", "desc" => "Pick a custom color for buttons or add a hex color code e.g. #697e09", "id" => "woo_button_color", "std" => "", "type" => "color");
     /* Typography */
     $options[] = array("name" => "Typography", "type" => "heading", "icon" => "typography");
     $options[] = array("name" => "Enable Custom Typography", "desc" => "Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.", "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "General Typography", "desc" => "Change the general font.", "id" => $shortname . "_font_body", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Navigation", "desc" => "Change the navigation font.", "id" => $shortname . "_font_nav", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'PT Sans', 'style' => '', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => "Post Title", "desc" => "Change the post title.", "id" => $shortname . "_font_post_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'PT Sans', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => "Post Meta", "desc" => "Change the post meta.", "id" => $shortname . "_font_post_meta", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => "Post Entry", "desc" => "Change the post entry.", "id" => $shortname . "_font_post_entry", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Widget Titles", "desc" => "Change the widget titles.", "id" => $shortname . "_font_widget_titles", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'PT Sans', 'style' => 'bold', 'color' => '#999999'), "type" => "typography");
     /* Layout */
     $options[] = array("name" => "Layout Options", "type" => "heading", "icon" => "layout");
     $url = get_bloginfo('template_url') . '/functions/images/';
     $options[] = array("name" => "Main Layout", "desc" => "Select which layout you want for your site.", "id" => $shortname . "_site_layout", "std" => "layout-left-content", "type" => "images", "options" => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array("name" => "Homepage - Latest News Entries", "desc" => "Select the number of entries that should appear in the latest news panel.", "id" => $shortname . "_recent_posts", "std" => "8", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Homepage - Popular Entries", "desc" => "Select the number of entries that should appear in the popular panel.", "id" => $shortname . "_popular_entries", "std" => "8", "type" => "select", "options" => $other_entries);
     /* Slider */
     $options[] = array("name" => "Featured Video Slider", "icon" => "featured", "type" => "heading");
     $options[] = array("name" => "Enable Slider", "desc" => "Enable the slider on the homepage.", "id" => $shortname . "_slider", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Tag", "desc" => "Add comma separated list for the tags that you would like to have displayed in the Slider section on your homepage. For example, if you add 'tag1, tag3' here, then all properties tagged with either 'tag1' or 'tag3' will be shown in the Slider area.", "id" => $shortname . "_slider_tags", "std" => "", "type" => "text");
     $options[] = array("name" => "Slider Entries", "desc" => "Select the number of entries that should appear in the home page slider.", "id" => $shortname . "_slider_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Effect", "desc" => "Select the animation effect. ", "id" => $shortname . "_slider_effect", "type" => "select2", "options" => array("slide" => "Slide", "fade" => "Fade"));
     $options[] = array("name" => "Hover Pause", "desc" => "Hovering over slideshow will pause it", "id" => $shortname . "_slider_hover", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Randomize", "desc" => "Select to randomize slides.", "id" => $shortname . "_slider_random", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Animation Speed", "desc" => "The time in <b>seconds</b> the animation between frames will take.", "id" => $shortname . "_slider_speed", "std" => "0.6", "type" => "select", "options" => array('0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2.0'));
     $options[] = array("name" => "Auto Start", "desc" => "Set the slider to start sliding automatically.", "id" => $shortname . "_slider_auto", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Auto Slide Interval", "desc" => "The time in <b>seconds</b> each slide pauses for, before sliding to the next.", "id" => $shortname . "_slider_interval", "std" => "6", "type" => "select", "options" => array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10'));
     $options[] = array("name" => "Featured Slider Title", "desc" => "Show the post title in slider.", "id" => $shortname . "_slider_title", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Featured Slider Content", "desc" => "Show the post content in slider.", "id" => $shortname . "_slider_content", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Next/Previous", "desc" => "Select to display next/previous buttons.", "id" => $shortname . "_slider_nextprev", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Pagination", "desc" => "Select to display pagination.", "id" => $shortname . "_slider_pagination", "std" => "true", "type" => "checkbox");
     /* Dynamic Images */
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => 'Dynamic Image Resizing', "desc" => "", "id" => $shortname . "_wpthumb_notice", "std" => 'There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', "type" => "info");
     $options[] = array("name" => "WP Post Thumbnail", "desc" => "Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Dynamic Image Resizing", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Hard Crop", "desc" => "The post thumbnail will be cropped to match the target aspect ratio (only used if 'Dynamic Image Resizing' is enabled).", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "TimThumb - Custom Settings Panel", "desc" => "This will enable the <a href='http://code.google.com/p/timthumb/'>TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. <a href='http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/'>Need help?</a>", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbnail", "desc" => "If no thumbnail is specifified then the first uploaded image in the post is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => 'Height')));
     $options[] = array("name" => "Thumbnail Image alignment", "desc" => "Select how to align your thumbnails with posts.", "id" => $shortname . "_thumb_align", "std" => "alignleft", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Show thumbnail in Single Posts", "desc" => "Show the attached image in the single post page.", "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Single Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the image size. Max width is 600.", "id" => $shortname . "_image_dimensions", "std" => "", "class" => "hidden last", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 150, 'meta' => 'Width'), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 150, 'meta' => 'Height')));
     $options[] = array("name" => "Single Post Image alignment", "desc" => "Select how to align your thumbnail with single posts.", "id" => $shortname . "_thumb_single_align", "std" => "alignright", "type" => "radio", "class" => "hidden", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     /* Footer */
     $options[] = array("name" => "Footer Customization", "type" => "heading", "icon" => "footer");
     $url = get_bloginfo('template_url') . '/functions/images/';
     $options[] = array("name" => "Footer Widget Areas", "desc" => "Select how many footer widget areas you want to display.", "id" => $shortname . "_footer_sidebars", "std" => "4", "type" => "images", "options" => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $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");
     // Upload Video Page Template
     $options[] = array("name" => "Upload Video", "icon" => "upload", "id" => $shortname . "_upload_listing_heading", "type" => "heading");
     $options[] = array("name" => "Only Register Users may post a Video", "desc" => "This forces users to register before being able to add a video.", "id" => $shortname . "_upload_user_logged_in", "std" => "false", "type" => "checkbox");
     /* Subscribe & Connect */
     $options[] = array("name" => "Subscribe & Connect", "type" => "heading", "icon" => "connect");
     $options[] = array("name" => "Enable Subscribe & Connect - Single Post", "desc" => "Enable the subscribe & connect area on single posts. You can also add this as a <a href='" . home_url() . "/wp-admin/widgets.php'>widget</a> in your sidebar.", "id" => $shortname . "_connect", "std" => 'false', "type" => "checkbox");
     $options[] = array("name" => "Subscribe Title", "desc" => "Enter the title to show in your subscribe & connect area.", "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => "Text", "desc" => "Change the default text in this area.", "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => "Subscribe By E-mail ID (Feedburner)", "desc" => "Enter your <a href='http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78982'>Feedburner ID</a> for the e-mail subscription form.", "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => 'Subscribe By E-mail to MailChimp', 'woothemes', "desc" => 'If you have a MailChimp account you can enter the <a href="http://woochimp.heroku.com" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', "id" => $shortname . "_connect_mailchimp_list_url", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable RSS", "desc" => "Enable the subscribe and RSS icon.", "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => "Twitter URL", "desc" => "Enter your  <a href='http://www.twitter.com/'>Twitter</a> URL e.g. http://www.twitter.com/woothemes", "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => "Facebook URL", "desc" => "Enter your  <a href='http://www.facebook.com/'>Facebook</a> URL e.g. http://www.facebook.com/woothemes", "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => "YouTube URL", "desc" => "Enter your  <a href='http://www.youtube.com/'>YouTube</a> URL e.g. http://www.youtube.com/woothemes", "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => "Flickr URL", "desc" => "Enter your  <a href='http://www.flickr.com/'>Flickr</a> URL e.g. http://www.flickr.com/woothemes", "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => "LinkedIn URL", "desc" => "Enter your  <a href='http://www.www.linkedin.com.com/'>LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes", "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => "Delicious URL", "desc" => "Enter your <a href='http://www.delicious.com/'>Delicious</a> URL e.g. http://www.delicious.com/woothemes", "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => "Google+ URL", "desc" => "Enter your <a href='http://plus.google.com/'>Google+</a> URL e.g. https://plus.google.com/104560124403688998123/", "id" => $shortname . "_connect_googleplus", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable Related Posts", "desc" => "Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.", "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     /* Advertising */
     $options[] = array("name" => "Video Ad (234x60)", "icon" => "ads", "type" => "heading");
     $options[] = array("name" => "Enable Ad", "desc" => "Enable the ad space in the featured video area.", "id" => $shortname . "_ad_panel", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Adsense code", "desc" => "Enter your adsense code (or other ad network code) here.", "id" => $shortname . "_ad_panel_adsense", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Image Location", "desc" => "Enter the URL to the banner ad image location.", "id" => $shortname . "_ad_panel_image", "std" => "http://www.woothemes.com/ads/234x60a.jpg", "type" => "upload");
     $options[] = array("name" => "Destination URL", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_panel_url", "std" => "http://www.woothemes.com", "type" => "text");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     $woo_metaboxes = array();
     global $post;
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "Center", "label" => "Image Crop Alignment", "type" => "select2", "desc" => "Select crop alignment for resized image", "options" => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
         }
     }
     // End post
     // Fields for `woo_video` Custom Post Type.
     if (get_post_type() == 'woo_video' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar)");
         $woo_metaboxes[] = array("name" => "slider_output", "label" => "Slider Output", "desc" => "Select what to display in the slider.", "std" => "image", "type" => "radio", "options" => array("image" => "Image", "video" => "Video"));
         $woo_metaboxes[] = array("name" => "slide_layout", "label" => "Slider Overlay Layout", "desc" => "Specify where you want the slider overlay content to display", "std" => "left", "type" => "radio", "options" => array("left" => __("Left Aligned", "woothemes"), "right" => __("Right Aligned", "woothemes"), "top" => __("Top Aligned", "woothemes"), "bottom" => __("Bottom Aligned", "woothemes")));
         $woo_metaboxes[] = array("name" => "uploader_name", "label" => "Uploader Name", "desc" => "Your full name.", "id" => $shortname . "_uploader_name", "std" => '', "type" => "text");
         $woo_metaboxes[] = array("name" => "uploader_email", "label" => "Uploader E-mail Address", "desc" => "Your e-mail address.", "id" => $shortname . "_uploader_email", "std" => '', "type" => "text");
     }
     // End IF Statement
     $woo_metaboxes[] = array("name" => "_layout", "std" => "normal", "label" => "Page Layout", "type" => "images", "desc" => "Select the layout you want on this specific post/page.", "options" => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_bloginfo('template_url') . '/functions/images/' . '1c.png', 'layout-left-content' => get_bloginfo('template_url') . '/functions/images/' . '2cl.png', 'layout-right-content' => get_bloginfo('template_url') . '/functions/images/' . '2cr.png'));
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#3
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "Canvas";
     $themeslug = "canvas";
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = "woo";
     $manualurl = 'http://docs.woothemes.com/document/' . $themeslug . '/';
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $options_pixels = array();
     $other_entries = array(__('Select a number:', 'woothemes'), '0');
     $other_entries_2 = array(__('Select a number:', 'woothemes'));
     $total_possible_numbers = intval(apply_filters('woo_total_possible_numbers', 20));
     for ($i = 0; $i <= $total_possible_numbers; $i++) {
         $options_pixels[] = $i . 'px';
         $other_entries[] = $i;
         $other_entries_2[] = $i;
     }
     $tumblog_options = array(__('Disabled', 'woothemes'), __('Before', 'woothemes'), __('After', 'woothemes'));
     $options_image_link_to = array('image' => __('The Image', 'woothemes'), 'post' => __('The Post', 'woothemes'));
     // Setup an array of slide-page terms for a dropdown.
     $slide_groups = array();
     if (taxonomy_exists('slide-page')) {
         $args = array('echo' => 0, 'hierarchical' => 1, 'taxonomy' => 'slide-page');
         $cats_dropdown = wp_dropdown_categories($args);
         $cats = array();
         // Quick string hack to make sure we get the pages with the indents.
         $cats_dropdown = str_replace("<select name='cat' id='cat' class='postform' >", '', $cats_dropdown);
         $cats_dropdown = str_replace('</select>', '', $cats_dropdown);
         $cats_split = explode('</option>', $cats_dropdown);
         $cats[] = __('Select a Slide Group:', 'woothemes');
         foreach ($cats_split as $k => $v) {
             $id = '';
             // Get the ID value.
             preg_match('/value="(.*?)"/i', $v, $matches);
             if (isset($matches[1])) {
                 $id = $matches[1];
                 $cats[$id] = trim(strip_tags($v));
             }
         }
         $slide_groups = $cats;
     }
     // Below are the various theme options.
     /* General Settings */
     $options = array();
     $options[] = array("name" => __('General Settings', 'woothemes'), "icon" => "general", "type" => "heading");
     $options[] = array('name' => __('Quick Start', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Custom Logo', 'woothemes'), "desc" => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Custom Favicon', 'woothemes'), "desc" => __('Upload a 16px x 16px Png/Gif image that will represent your website\'s favicon.', 'woothemes'), "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Tracking Code', 'woothemes'), "desc" => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), "id" => $shortname . "_google_analytics", "std" => "", "type" => "textarea");
     $options[] = array('name' => __('Subscription Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('RSS URL', 'woothemes'), "desc" => __('Enter your preferred RSS URL. (Feedburner or other)', 'woothemes'), "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array('name' => __('Display Options', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Custom CSS', 'woothemes'), "desc" => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => __('Post/Page Comments', 'woothemes'), "desc" => __('Select if you want to comments on posts and/or pages.', 'woothemes'), "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => __('Posts Only', 'woothemes'), "page" => __('Pages Only', 'woothemes'), "both" => __('Pages / Posts', 'woothemes'), "none" => __('None', 'woothemes')));
     $options[] = array("name" => __('Post Content', 'woothemes'), "desc" => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => __('The Excerpt', 'woothemes'), "content" => __('Full Content', 'woothemes')));
     $options[] = array("name" => __('Display Breadcrumbs', 'woothemes'), "desc" => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), "id" => $shortname . "_breadcrumbs_show", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Pagination Style', 'woothemes'), "desc" => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => __('Numbers', 'woothemes'), "simple" => __('Next/Previous', 'woothemes')));
     /* General Styling */
     $options[] = array("name" => __('General Styling', 'woothemes'), "icon" => "styling", "type" => "heading");
     $options[] = array('name' => __('Base Styling', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Disable ALL Custom Styling', 'woothemes'), "desc" => __('Disable output of all custom styling (CSS) from the theme options and use default styles from the stylesheet.', 'woothemes'), "id" => $shortname . "_style_disable", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Background Options', 'woothemes'), "desc" => "", "id" => $shortname . "_background_notice", "std" => sprintf(__('Background options can also be set in <a href="%s">Appearance > Customize</a>. The options on that page <strong>override</strong> the background options bellow.', 'woothemes'), admin_url('customize.php')), "type" => "info");
     $options[] = array("name" => __('Background Color', 'woothemes'), "desc" => __('Pick a custom color for site background or add a hex color code e.g. #e6e6e6', 'woothemes'), "id" => $shortname . "_style_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Background Image', 'woothemes'), "desc" => __('Upload a background image, or specify the image address of your image. (http://yoursite.com/image.png)', 'woothemes'), "id" => $shortname . "_style_bg_image", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Background Image Repeat', 'woothemes'), "desc" => __('Select how you want your background image to display.', 'woothemes'), "id" => $shortname . "_style_bg_image_repeat", "type" => "select", "options" => array("No Repeat" => "no-repeat", "Repeat" => "repeat", "Repeat Horizontally" => "repeat-x", "Repeat Vertically" => "repeat-y"));
     $options[] = array('name' => __('Background image position', 'woothemes'), 'desc' => __('Select how you would like to position the background', 'woothemes'), 'id' => $shortname . '_style_bg_image_pos', 'std' => 'top left', 'type' => 'select', 'options' => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => __('Background Attachment', 'woothemes'), "desc" => __('Select whether the background should be fixed or move when the user scrolls', 'woothemes'), "id" => $shortname . "_style_bg_image_attach", "std" => "scroll", "type" => "select", "options" => array("scroll", "fixed"));
     $options[] = array("name" => __('Top Border', 'woothemes'), "desc" => __('Specify border properties for the top border.', 'woothemes'), "id" => $shortname . "_border_top", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#000000'), "type" => "border");
     /*
     $options[] = array( 'name' => __( 'Links', 'woothemes' ),
     					'type' => 'subheading' );
     */
     $options[] = array("name" => __('Link Color', 'woothemes'), "desc" => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), "id" => $shortname . "_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Link Hover Color', 'woothemes'), "desc" => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), "id" => $shortname . "_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Button Color', 'woothemes'), "desc" => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), "id" => $shortname . "_button_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Button Hover Color', 'woothemes'), "desc" => __('Pick a custom hover color for buttons or add a hex color code e.g. #697e09', 'woothemes'), "id" => $shortname . "_button_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('General Border Color', 'woothemes'), "desc" => __('Pick a custom color for general border colors or add a hex color code e.g. #e6e6e6', 'woothemes'), "id" => $shortname . "_style_border", "std" => "", "type" => "color");
     /* Misc Typography */
     $options[] = array('name' => __('Misc Typography', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Misc Typography', 'woothemes'), "desc" => "", "id" => $shortname . "_general_font_notice", "std" => __('The misc typography options below only control typography not covered by other typography options. You can control specific typography on post title, post content, widget titles etc. in the other sections in the options panel.', 'woothemes'), "type" => "info");
     $options[] = array("name" => __('General Text Font Style', 'woothemes'), "desc" => __('Select typography for general text.', 'woothemes'), "id" => $shortname . "_font_text", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => __('H1 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H1.', 'woothemes'), "id" => $shortname . "_font_h1", "std" => array('size' => '28', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('H2 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H2.', 'woothemes'), "id" => $shortname . "_font_h2", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('H3 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H3.', 'woothemes'), "id" => $shortname . "_font_h3", "std" => array('size' => '20', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('H4 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H4.', 'woothemes'), "id" => $shortname . "_font_h4", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('H5 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H5.', 'woothemes'), "id" => $shortname . "_font_h5", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('H6 Font Style', 'woothemes'), "desc" => __('Select the typography you want for header H6.', 'woothemes'), "id" => $shortname . "_font_h6", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('Layout', 'woothemes'), "icon" => "styling", "type" => "heading");
     $options[] = array('name' => __('General Layout', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Layout Manager', 'woothemes'), "desc" => "", "id" => $shortname . "_layout_manager_notice", "std" => sprintf(__('Below you can set the general site width and layout. To control the width of the columns in your themes layout, please visit the <a href="%s">Layout Manager</a>.', 'woothemes'), admin_url('admin.php?page=woo-layout-manager')), "type" => "info");
     $options[] = array("name" => __('Site Width', 'woothemes'), "desc" => "Set the width (in px) that you would like your content column to be (recommended max-width is 1600px)", "id" => $shortname . "_layout_width", "std" => "960", "min" => "600", "max" => "1600", "increment" => "10", "type" => 'slider');
     $images_dir = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => __('Main Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_layout", "std" => "two-col-left", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => __('Footer Widget Areas', 'woothemes'), "desc" => __('Select how many footer widget areas you want to display.', 'woothemes'), "id" => $shortname . "_footer_sidebars", "std" => "4", "type" => "images", "options" => array('0' => $url . 'footer-widgets-0.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => __('Enable Fixed Mobile Layout', 'woothemes'), "desc" => __('Canvas is responsive, meaning it adapts its layout on mobile devices. Enabling Fixed Layout will remove the responsive layout on mobile devices.', 'woothemes'), "id" => $shortname . "_remove_responsive", "std" => "false", "type" => "checkbox");
     /* Boxed Layout */
     $options[] = array('name' => __('Boxed Layout', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Boxed Layout Style', 'woothemes'), "desc" => __('Enable the boxed layout style.', 'woothemes'), "id" => $shortname . "_layout_boxed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Box Background Color', 'woothemes'), "desc" => __('Pick a custom color for the boxed background or add a hex color code e.g. #ffffff', 'woothemes'), "id" => $shortname . "_style_box_bg", "std" => "#ffffff", "type" => "color");
     $options[] = array("name" => __('Box Margin', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired top and bottom margin.', 'woothemes'), "id" => $shortname . "_box_margin", "std" => "", "type" => array(array('id' => $shortname . '_box_margin_top', 'type' => 'text', 'std' => '0', 'meta' => __('Top', 'woothemes')), array('id' => $shortname . '_box_margin_bottom', 'type' => 'text', 'std' => '0', 'meta' => __('Bottom', 'woothemes'))));
     $options[] = array("name" => __('Box Border Top/Bottom', 'woothemes'), "desc" => __('Specify border properties for the boxed layout.', 'woothemes'), "id" => $shortname . "_box_border_tb", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Box Border Left/Right', 'woothemes'), "desc" => __('Specify border properties for the boxed layout.', 'woothemes'), "id" => $shortname . "_box_border_lr", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Box Rounded Corners', 'woothemes'), "desc" => __('Set amount of pixels for border radius (rounded corners). Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_box_border_radius", "type" => "select", "std" => "0px", "options" => $options_pixels);
     $options[] = array("name" => __('Box Shadow', 'woothemes'), "desc" => __('Enable box shadow. Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_box_shadow", "std" => "true", "type" => "checkbox");
     /* Full width Layout */
     $options[] = array('name' => __('Full Width Layout', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Full Width Layout', 'woothemes'), "desc" => "", "id" => $shortname . "_full_width_notice", "std" => __('Below you can enable full width header and footer areas and set the background. You can set the styling options for the full width navigation under the Primary Navigation options. Please note that Boxed Layout must be disabled.', 'woothemes'), "type" => "info");
     $options[] = array("name" => __('Enable Full Width Header', 'woothemes'), "desc" => __('Set header container to display full width.', 'woothemes'), "id" => $shortname . "_header_full_width", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Header Background Color', 'woothemes'), "desc" => __('Select the background color you want for your full width header.', 'woothemes'), "id" => $shortname . "_full_header_full_width_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Header Background Image', 'woothemes'), "desc" => __('Upload a background image, or specify the image address of your image (http://yoursite.com/image.png). <br/>Image should be same width as your site width.', 'woothemes'), "id" => $shortname . "_full_header_bg_image", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Header Background Image Repeat', 'woothemes'), "desc" => __('Select how you want your background image to display.', 'woothemes'), "id" => $shortname . "_full_header_bg_image_repeat", "type" => "select", "options" => array("No Repeat" => "no-repeat", "Repeat" => "repeat", "Repeat Horizontally" => "repeat-x", "Repeat Vertically" => "repeat-y"));
     $options[] = array("name" => __('Enable Full Width Footer', 'woothemes'), "desc" => __('Set footer widget area and footer container to display full width.', 'woothemes'), "id" => $shortname . "_footer_full_width", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Footer Widget Area Background Color', 'woothemes'), "desc" => __('Select the background color you want for your full width widget area.', 'woothemes'), "id" => $shortname . "_foot_full_width_widget_bg", "std" => "#f0f0f0", "type" => "color");
     $options[] = array("name" => __('Footer Background Color', 'woothemes'), "desc" => __('Select the background color you want for your full width footer.', 'woothemes'), "id" => $shortname . "_footer_full_width_bg", "std" => "#222222", "type" => "color");
     $options[] = array("name" => __('Header &amp; Footer', 'woothemes'), "icon" => "styling", "type" => "heading");
     /* Header Styling */
     $options[] = array('name' => __('Header', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Header Background Color', 'woothemes'), "desc" => __('Pick a custom color for header background or add a hex color code e.g. #e6e6e6', 'woothemes'), "id" => $shortname . "_header_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Header Background Image', 'woothemes'), "desc" => __('Upload a background image, or specify the image address of your image (http://yoursite.com/image.png). <br/>Image should be same width as your site width.', 'woothemes'), "id" => $shortname . "_header_bg_image", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Header Background Image Repeat', 'woothemes'), "desc" => __('Select how you want your background image to display.', 'woothemes'), "id" => $shortname . "_header_bg_image_repeat", "type" => "select", "options" => array("No Repeat" => "no-repeat", "Repeat" => "repeat", "Repeat Horizontally" => "repeat-x", "Repeat Vertically" => "repeat-y"));
     $options[] = array("name" => __('Header Border', 'woothemes'), "desc" => __('Specify border properties for the header.', 'woothemes'), "id" => $shortname . "_header_border", "std" => array('width' => '0', 'style' => 'solid', 'color' => ''), "type" => "border");
     $options[] = array("name" => __('Header Margin Top/Bottom', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired header margin.', 'woothemes'), "id" => $shortname . "_header_margin_tb", "std" => "", "type" => array(array('id' => $shortname . '_header_margin_top', 'type' => 'text', 'std' => '0', 'meta' => __('Top', 'woothemes')), array('id' => $shortname . '_header_margin_bottom', 'type' => 'text', 'std' => '0', 'meta' => __('Bottom', 'woothemes'))));
     $options[] = array("name" => __('Header Padding Top/Bottom', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired header padding.', 'woothemes'), "id" => $shortname . "_header_padding_tb", "std" => "", "type" => array(array('id' => $shortname . '_header_padding_top', 'type' => 'text', 'std' => '40', 'meta' => __('Top', 'woothemes')), array('id' => $shortname . '_header_padding_bottom', 'type' => 'text', 'std' => '40', 'meta' => __('Bottom', 'woothemes'))));
     $options[] = array("name" => __('Header Padding Left/Right', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired header padding.', 'woothemes'), "id" => $shortname . "_header_padding_lr", "std" => "", "type" => array(array('id' => $shortname . '_header_padding_left', 'type' => 'text', 'std' => '', 'meta' => __('Left', 'woothemes')), array('id' => $shortname . '_header_padding_right', 'type' => 'text', 'std' => '', 'meta' => __('Right', 'woothemes'))));
     $options[] = array("name" => __('Site Title Font Style', 'woothemes'), "desc" => __('Select typography for site title.', 'woothemes'), "id" => $shortname . "_font_logo", "std" => array('size' => '40', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('Site Description Font Style', 'woothemes'), "desc" => __('Select typography for site description.', 'woothemes'), "id" => $shortname . "_font_desc", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#999999'), "type" => "typography");
     /* Footer */
     $options[] = array('name' => __('Footer', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Footer Font Style', 'woothemes'), "desc" => __('Select typography for footer.', 'woothemes'), "id" => $shortname . "_footer_font", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => __('Footer Background', 'woothemes'), "desc" => __('Select the background color you want for your footer.', 'woothemes'), "id" => $shortname . "_footer_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Footer Border Top', 'woothemes'), "desc" => __('Specify top border properties for the footer.', 'woothemes'), "id" => $shortname . "_footer_border_top", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Footer Border Bottom', 'woothemes'), "desc" => __('Specify bottom border properties for the footer.', 'woothemes'), "id" => $shortname . "_footer_border_bottom", "std" => array('width' => '0', 'style' => 'solid', 'color' => ''), "type" => "border");
     $options[] = array("name" => __('Footer Border Left/Right', 'woothemes'), "desc" => __('Specify left/right border properties for the footer.', 'woothemes'), "id" => $shortname . "_footer_border_lr", "std" => array('width' => '0', 'style' => 'solid', 'color' => ''), "type" => "border");
     $options[] = array("name" => __('Footer Rounded Corners', 'woothemes'), "desc" => __('Set amount of pixels for border radius (rounded corners). Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_footer_border_radius", "type" => "select", "options" => $options_pixels);
     $options[] = array("name" => __('Enable Custom Footer (Left)', 'woothemes'), "desc" => __('Activate to add the custom text below to the theme footer.', 'woothemes'), "id" => $shortname . "_footer_left", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Custom Text (Left)', 'woothemes'), "desc" => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), "id" => $shortname . "_footer_left_text", "class" => "hidden last", "std" => "<p></p>", "type" => "textarea");
     $options[] = array("name" => __('Enable Custom Footer (Right)', 'woothemes'), "desc" => __('Activate to add the custom text below to the theme footer.', 'woothemes'), "id" => $shortname . "_footer_right", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Custom Text (Right)', 'woothemes'), "desc" => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), "id" => $shortname . "_footer_right_text", "class" => "hidden last", "std" => "<p></p>", "type" => "textarea");
     $options[] = array("name" => __('Navigation', 'woothemes'), "icon" => "styling", "type" => "heading");
     /* Top Navigation */
     $options[] = array('name' => __('Top Navigation', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Top Navigation - Background Color', 'woothemes'), "desc" => sprintf(__('Pick a custom color for the top navigation background or add a hex color code e.g. #000.<br />Top Navigation can be added with <a href="%s">WP Menus</a>', 'woothemes'), admin_url('nav-menus.php')), "id" => $shortname . "_top_nav_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Top Navigation - Hover / Sub Menu Color', 'woothemes'), "desc" => __('Pick a custom color for the top navigation hover text color or add a hex color code e.g. #000', 'woothemes'), "id" => $shortname . "_top_nav_hover", "std" => "", "type" => "color");
     $options[] = array("name" => __('Top Navigation - Hover / Sub Menu Background Color', 'woothemes'), "desc" => __('Pick a custom color for the top navigation hover background color or add a hex color code e.g. #000', 'woothemes'), "id" => $shortname . "_top_nav_hover_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Top Navigation Font Style', 'woothemes'), "desc" => __('Select typography for navigation.', 'woothemes'), "id" => $shortname . "_top_nav_font", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#ddd'), "type" => "typography");
     /* Primary Navigation */
     $options[] = array('name' => __('Primary Navigation', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Background Color', 'woothemes'), "desc" => __('Pick a custom color for the navigation background or add a hex color code e.g. #cccccc', 'woothemes'), "id" => $shortname . "_nav_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Navigation Font Style', 'woothemes'), "desc" => __('Select typography for navigation.', 'woothemes'), "id" => $shortname . "_nav_font", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => '', 'color' => '#666666'), "type" => "typography");
     $options[] = array("name" => __('Hover / Sub Menu Text Color', 'woothemes'), "desc" => __('Pick a custom color for the navigation hover / sub menu text color or add a hex color code e.g. #eeeeee', 'woothemes'), "id" => $shortname . "_nav_hover", "std" => "", "type" => "color");
     $options[] = array("name" => __('Hover / Sub Menu Background Color', 'woothemes'), "desc" => __('Pick a custom color for the navigation hover / sub menu background color or add a hex color code e.g. #eeeeee', 'woothemes'), "id" => $shortname . "_nav_hover_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Divider', 'woothemes'), "desc" => __('Specify border properties for the menu items dividers.', 'woothemes'), "id" => $shortname . "_nav_divider_border", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Dropdown menu border', 'woothemes'), "desc" => __('Specify border properties for the navigation dropdown menu.', 'woothemes'), "id" => $shortname . "_nav_dropdown_border", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Border Top', 'woothemes'), "desc" => __('Specify border properties for the navigation.', 'woothemes'), "id" => $shortname . "_nav_border_top", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Border Bottom', 'woothemes'), "desc" => __('Specify border properties for the navigation.', 'woothemes'), "id" => $shortname . "_nav_border_bot", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Border Left/Right', 'woothemes'), "desc" => __('Specify border properties for the navigation.', 'woothemes'), "id" => $shortname . "_nav_border_lr", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Navigation Rounded Corners', 'woothemes'), "desc" => __('Set amount of pixels for border radius (rounded corners). Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_nav_border_radius", "type" => "select", "std" => "0px", "options" => $options_pixels);
     $options[] = array("name" => __('Navigation Margin Top/Bottom', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired header margin.', 'woothemes'), "id" => $shortname . "_nav_margin_tb", "std" => "", "type" => array(array('id' => $shortname . '_nav_margin_top', 'type' => 'text', 'std' => '', 'meta' => __('Top', 'woothemes')), array('id' => $shortname . '_nav_margin_bottom', 'type' => 'text', 'std' => '', 'meta' => __('Bottom', 'woothemes'))));
     $options[] = array("name" => __('Enable Subscribe Icon', 'woothemes'), "desc" => __('Enable the Subscribe to RSS icon in right navigation.', 'woothemes'), "id" => $shortname . "_nav_rss", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Enable E-mail Icon', 'woothemes'), "desc" => __('Enter an URL for the mail icon in the right navigation', 'woothemes'), "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => __('Enable Search', 'woothemes'), "desc" => __('Enable Search in the right navigation.', 'woothemes'), "id" => $shortname . "_nav_search", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Posts', 'woothemes'), "icon" => "styling", "type" => "heading");
     /* Post Styling */
     $options[] = array('name' => __('Posts / Pages', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Post/Page Title Font Style', 'woothemes'), "desc" => __('Specify typography for post/page title text.', 'woothemes'), "id" => $shortname . "_font_post_title", "std" => array('size' => '28', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('Post Meta Font Style', 'woothemes'), "desc" => __('Specify typography for post meta.', 'woothemes'), "id" => $shortname . "_font_post_meta", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => __('Post/Page Text Font Style', 'woothemes'), "desc" => __('Specify typography for post/page content text.', 'woothemes'), "id" => $shortname . "_font_post_text", "std" => array('size' => '15', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => '300', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => __('Post More (bottom) Font Style', 'woothemes'), "desc" => __('Specify typography for post bottom text.', 'woothemes'), "id" => $shortname . "_font_post_more", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => ''), "type" => "typography");
     $options[] = array("name" => __('Post More (bottom) Border Top', 'woothemes'), "desc" => __('Specify border properties for post more section.', 'woothemes'), "id" => $shortname . "_post_more_border_top", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Post More (bottom) Border Bottom', 'woothemes'), "desc" => __('Specify border properties for post more section.', 'woothemes'), "id" => $shortname . "_post_more_border_bottom", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Post Author Background Color', 'woothemes'), "desc" => __('Pick a custom background color for the post author section or add a hex color code e.g. #fafafa', 'woothemes'), "id" => $shortname . "_post_author_bg", "std" => "#fafafa", "type" => "color");
     $options[] = array("name" => __('Post Author Border Top', 'woothemes'), "desc" => __('Specify border properties for post author section.', 'woothemes'), "id" => $shortname . "_post_author_border_top", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Post Author Border Bottom', 'woothemes'), "desc" => __('Specify border properties for post author section.', 'woothemes'), "id" => $shortname . "_post_author_border_bottom", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Post Author Border Left/Right', 'woothemes'), "desc" => __('Specify border properties for the navigation.', 'woothemes'), "id" => $shortname . "_post_author_border_lr", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Post Author Rounded Corners', 'woothemes'), "desc" => __('Set amount of pixels for border radius (rounded corners). Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_post_author_border_radius", "type" => "select", "std" => "5px", "options" => $options_pixels);
     $options[] = array("name" => __('Disable Post Author', 'woothemes'), "desc" => __('Disable post author below post?', 'woothemes'), "id" => $shortname . "_disable_post_author", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Comments Background Color (even threads)', 'woothemes'), "desc" => __('Pick a custom background color for the post comments even threads or add a hex color code e.g. #fafafa', 'woothemes'), "id" => $shortname . "_post_comments_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Page Navigation Font Style', 'woothemes'), "desc" => __('Select typography for Page Navigation text.', 'woothemes'), "id" => $shortname . "_pagenav_font", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#888'), "type" => "typography");
     $options[] = array("name" => __('Page Navigation Background Color', 'woothemes'), "desc" => __('Pick a custom color for the Page Navigation background or add a hex color code e.g. #fafafa', 'woothemes'), "id" => $shortname . "_pagenav_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Page Navigation Border Top', 'woothemes'), "desc" => __('Specify border properties for Page Navigation section.', 'woothemes'), "id" => $shortname . "_pagenav_border_top", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Page Navigation Border Bottom', 'woothemes'), "desc" => __('Specify border properties for Page Navigation section.', 'woothemes'), "id" => $shortname . "_pagenav_border_bottom", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array('name' => __('Archives', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Archive Header Font Style', 'woothemes'), "desc" => __('Select typography for Archive header.', 'woothemes'), "id" => $shortname . "_archive_header_font", "std" => array('size' => '18', 'unit' => 'px', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('Archive Header Border Bottom', 'woothemes'), "desc" => __('Specify border properties for Archive header', 'woothemes'), "id" => $shortname . "_archive_header_border_bottom", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Disable Archive Header RSS link', 'woothemes'), "desc" => __('Disable RSS link in Archive header', 'woothemes'), "id" => $shortname . "_archive_header_disable_rss", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Widgets', 'woothemes'), "icon" => "styling", "type" => "heading");
     $options[] = array("name" => __('Widget Background Color', 'woothemes'), "desc" => __('Pick a custom color for the widget background or add a hex color code e.g. #cccccc', 'woothemes'), "id" => $shortname . "_widget_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Widget Border', 'woothemes'), "desc" => __('Specify border properties for widgets.', 'woothemes'), "id" => $shortname . "_widget_border", "std" => array('width' => '0', 'style' => 'solid', 'color' => '#dbdbdb'), "type" => "border");
     $options[] = array("name" => __('Widget Padding', 'woothemes'), "desc" => __('Enter an integer value i.e. 20 for the desired widget padding.', 'woothemes'), "id" => $shortname . "_widget_padding", "std" => "", "type" => array(array('id' => $shortname . '_widget_padding_tb', 'type' => 'text', 'std' => '', 'meta' => __('Top/Bottom', 'woothemes')), array('id' => $shortname . '_widget_padding_lr', 'type' => 'text', 'std' => '', 'meta' => __('Left/Right', 'woothemes'))));
     $options[] = array("name" => __('Widget Title', 'woothemes'), "desc" => __('Select the typography you want for the widget title.', 'woothemes'), "id" => $shortname . "_widget_font_title", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => __('Widget Title Bottom Border', 'woothemes'), "desc" => __('Specify border property for the widget title.', 'woothemes'), "id" => $shortname . "_widget_title_border", "std" => array('width' => '1', 'style' => 'solid', 'color' => '#e6e6e6'), "type" => "border");
     $options[] = array("name" => __('Widget Text', 'woothemes'), "desc" => __('Select the typography you want for the widget text.', 'woothemes'), "id" => $shortname . "_widget_font_text", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => __('Widget Rounded Corners', 'woothemes'), "desc" => __('Set amount of pixels for border radius (rounded corners). Will only show in CSS3 compatible browser.', 'woothemes'), "id" => $shortname . "_widget_border_radius", "type" => "select", "options" => $options_pixels);
     $options[] = array("name" => __('Tabs Widget Background color', 'woothemes'), "desc" => __('Pick a custom color for the tabs widget or add a hex color code e.g. #cccccc', 'woothemes'), "id" => $shortname . "_widget_tabs_bg", "std" => "", "type" => "color");
     $options[] = array("name" => __('Tabs Widget Inside Background Color', 'woothemes'), "desc" => __('Pick a custom color for the tabs widget or add a hex color code e.g. #cccccc', 'woothemes'), "id" => $shortname . "_widget_tabs_bg_inside", "std" => "", "type" => "color");
     $options[] = array("name" => __('Tabs Widget Title', 'woothemes'), "desc" => __('Select the typography you want for the widget text.', 'woothemes'), "id" => $shortname . "_widget_tabs_font", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => __('Tabs Widget Meta / Tabber Font', 'woothemes'), "desc" => __('Select the typography you want for the widget text.', 'woothemes'), "id" => $shortname . "_widget_tabs_font_meta", "std" => array('size' => '11', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'thin', 'color' => '#999999'), "type" => "typography");
     /* Template: Magazine */
     $options[] = array("name" => __('Magazine Template', 'woothemes'), "icon" => "layout", "type" => "heading");
     $options[] = array('name' => __('Posts Slider', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Magazine Page Template', 'woothemes'), "desc" => "", "id" => $shortname . "_woo_magazine_notice", "std" => sprintf(__('Below you can control settings for the Magazine page template. Please refer to <a href="%s">documentation</a> on how to setup the page template.'), 'http://www.woothemes.com/support/theme-documentation/canvas/'), "type" => "info");
     $options[] = array("name" => __('Enable Featured Slider', 'woothemes'), "desc" => __('Enable the featured slider on the "Magazine" page template.', 'woothemes'), "id" => $shortname . "_slider_magazine", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Post Tag(s)', 'woothemes'), "desc" => __('Add comma separated list for the tags that you would like to have displayed in the featured slider on the "Magazine" page template. For example, if you add "tag1, tag3" here, then all posts tagged with either "tag1" or "tag3" will be shown in the featured area. These posts will be excluded from normal posts below slider.', 'woothemes'), "id" => $shortname . "_slider_magazine_tags", "std" => "", "type" => "text");
     $options[] = array("name" => __('Number Of Posts To Display', 'woothemes'), "desc" => __('Select the number of entries that should appear in the Featured Slider.', 'woothemes'), "id" => $shortname . "_slider_magazine_entries", "std" => "3", "type" => "select", "options" => $other_entries_2);
     $options[] = array("name" => __('Exclude Posts', 'woothemes'), "desc" => __('Exclude the slider posts from the posts grid below slider.', 'woothemes'), "id" => $shortname . "_slider_magazine_exclude", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Display The Post Titles', 'woothemes'), "desc" => __('Show the post title in the "Posts" slider.', 'woothemes'), "id" => $shortname . "_slider_magazine_title", "std" => "true", 'class' => 'collapsed', "type" => "checkbox");
     $options[] = array("name" => __('Title Font Style', 'woothemes'), "desc" => __('Select typography for title.', 'woothemes'), "id" => $shortname . "_slider_magazine_font_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#ffffff'), 'class' => 'hidden last', "type" => "typography");
     $options[] = array("name" => __('Display The Post Excerpts', 'woothemes'), "desc" => __('Show the post excerpt in the "Posts" slider.', 'woothemes'), "id" => $shortname . "_slider_magazine_excerpt", "std" => "true", 'class' => 'collapsed', "type" => "checkbox");
     $options[] = array("name" => __('Excerpt Font Style', 'woothemes'), "desc" => __('Select typography for excerpt text.', 'woothemes'), "id" => $shortname . "_slider_magazine_font_excerpt", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial, sans-serif', 'style' => 'thin', 'color' => '#cccccc'), 'class' => 'hidden', "type" => "typography");
     $options[] = array("name" => __('Excerpt Length', 'woothemes'), "desc" => __('Total number of words to show in the excerpt.', 'woothemes'), "id" => $shortname . "_slider_magazine_excerpt_length", "std" => "15", 'class' => 'hidden last', "type" => "text");
     $options[] = array('name' => __('Featured Posts', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Number Of Featured Posts', 'woothemes'), "desc" => __('Select how many featured (full width) posts you would like to show before your two-column posts. Set total number of posts in Settings > Reading.', 'woothemes'), "id" => $shortname . "_magazine_feat_posts", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => __('Post Content for "Featured" Posts', 'woothemes'), "desc" => __('Select if you want to show the full content or the excerpt on posts in the "Featured" section.', 'woothemes'), "id" => $shortname . "_magazine_featured_post_content", "std" => 'excerpt', "type" => "select2", "options" => array("excerpt" => __('The Excerpt', 'woothemes'), "content" => __('Full Content', 'woothemes')));
     $options[] = array("name" => __('Featured Image Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the image size.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_magazine_f_w', 'type' => 'text', 'std' => 100, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_magazine_f_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Featured Post Image Alignment', 'woothemes'), "desc" => __('Select how to align your featured post images.', 'woothemes'), "id" => $shortname . "_magazine_f_align", "std" => "alignleft", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array('name' => __('Posts Grid', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Post Content for "Grid" Posts', 'woothemes'), "desc" => __('Select if you want to show the full content or the excerpt on posts in the "Grid" section.', 'woothemes'), "id" => $shortname . "_magazine_grid_post_content", "std" => 'excerpt', "type" => "select2", "options" => array("excerpt" => __('The Excerpt', 'woothemes'), "content" => __('Full Content', 'woothemes')));
     $options[] = array("name" => __('Post Title Font Style', 'woothemes'), "desc" => __('Specify typography for post title.', 'woothemes'), "id" => $shortname . "_magazine_grid_font_post_title", "std" => array('size' => '18', 'unit' => 'px', 'face' => 'Helvetica, Arial, sans-serif', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => __('Post Image Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the image size.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_magazine_b_w', 'type' => 'text', 'std' => 100, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_magazine_b_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Post Image Alignment', 'woothemes'), "desc" => __('Select how to align your normal post images.', 'woothemes'), "id" => $shortname . "_magazine_b_align", "std" => "alignleft", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     /* Template: Business */
     $options[] = array("name" => __('Business Template', 'woothemes'), "icon" => "layout", "type" => "heading");
     $options[] = array('name' => __('"Business" Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Business Page Template', 'woothemes'), "desc" => "", "id" => $shortname . "_woo_biz_notice", "std" => sprintf(__('Below you can control settings for the Business page template. Please refer to <a href="%s">documentation</a> on how to setup the page template. You can add slider posts with the <strong><em>Slides</em></strong> custom post type.'), 'http://www.woothemes.com/support/theme-documentation/canvas/'), "type" => "info");
     $options[] = array("name" => __('Disable Footer Widgets', 'woothemes'), "desc" => __('Disable the footer widgets on this template.', 'woothemes'), "id" => $shortname . "_biz_disable_footer_widgets", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Disable Slides Admin Menu', 'woothemes'), "desc" => __('Disable the slides admin menu functionality.', 'woothemes'), "id" => $shortname . "_biz_slides_disable", "std" => "false", "type" => "checkbox");
     $options[] = array('name' => __('Featured Slider', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Featured Slider', 'woothemes'), "desc" => __('Enable the featured slider.', 'woothemes'), "id" => $shortname . "_slider_biz", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Full Width Slider', 'woothemes'), "desc" => __('Enable the slider to be full width.', 'woothemes'), "id" => $shortname . "_slider_biz_full", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Number of Slides', 'woothemes'), "desc" => __('Select how many slides you would like to show in the slider.', 'woothemes'), "id" => $shortname . "_slider_biz_number", "std" => "10", "type" => "select", "options" => $other_entries_2);
     if (!empty($slide_groups)) {
         $options[] = array('name' => __('Slide Group', 'woothemes'), 'desc' => __('Optionally choose to display only slides from a specific slide group.', 'woothemes'), 'id' => $shortname . '_slider_biz_slide_group', 'std' => '0', 'type' => 'select2', 'options' => $slide_groups);
     }
     $options[] = array("name" => __('Display Order', 'woothemes'), "desc" => __('Select the order in which you want to show your slides.', 'woothemes'), "id" => $shortname . "_slider_biz_order", "type" => "select2", "std" => "DESC", "options" => array("DESC" => __('Newest first', 'woothemes'), "ASC" => __('Oldest first', 'woothemes')));
     $options[] = array("name" => __('Featured Slider Title', 'woothemes'), "desc" => __('Show the page title in slider when using Featured Image as background image.', 'woothemes'), "id" => $shortname . "_slider_biz_title", "std" => "true", 'class' => 'collapsed', "type" => "checkbox");
     $options[] = array("name" => __('Featured Slider Title Font Style', 'woothemes'), "desc" => __('Select typography for title (when using image background).', 'woothemes'), "id" => $shortname . "_slider_biz_font_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Arial, sans-serif', 'style' => 'bold', 'color' => '#ffffff'), 'class' => 'hidden last', "type" => "typography");
     $options[] = array("name" => __('Featured Slider Content Font Style', 'woothemes'), "desc" => __('Select typography for content text (when using image background).', 'woothemes'), "id" => $shortname . "_slider_biz_font_excerpt", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial, sans-serif', 'style' => 'thin', 'color' => '#cccccc'), "type" => "typography");
     $options[] = array("name" => __('Featured Slider Content Overlay', 'woothemes'), "desc" => __('Select the position of the slider content overlay which is shown when using a featured image in the slide post.', 'woothemes'), "id" => $shortname . "_slider_biz_overlay", "type" => "select2", "std" => "bottom", "options" => array("none" => __('None', 'woothemes'), "left" => __('Left', 'woothemes'), "right" => __('Right', 'woothemes'), "bottom" => __('Bottom', 'woothemes'), "center" => __('Center', 'woothemes'), "full" => __('Full', 'woothemes')));
     /* Slider Settings */
     $options[] = array("name" => __('Slider Settings', 'woothemes'), "icon" => "slider", "type" => "heading");
     $options[] = array("name" => __('Slider Settings', 'woothemes'), "desc" => "", "id" => $shortname . "_woo_slider_notice", "std" => __('Below you can control the generic slider settings which will apply to both Business and Magazine templates.', 'woothemes'), "type" => "info");
     $options[] = array("name" => __('Auto Start', 'woothemes'), "desc" => __('Set the slider to start sliding automatically. Adjust the speed of sliding underneath.', 'woothemes'), "id" => $shortname . "_slider_auto", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Hover Pause', 'woothemes'), "desc" => __('Hovering over slideshow will pause it', 'woothemes'), "id" => $shortname . "_slider_hover", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Animation Speed', 'woothemes'), "desc" => __('The time in <b>seconds</b> the animation between frames will take e.g. 0.6', 'woothemes'), "id" => $shortname . "_slider_speed", "std" => 0.6, "type" => "select", "options" => array('0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2.0'));
     $options[] = array("name" => __('Auto Slide Interval', 'woothemes'), "desc" => __('The time in <b>seconds</b> each slide pauses for, before sliding to the next. Only when using Auto Start option above.', 'woothemes'), "id" => $shortname . "_slider_interval", "std" => "4", "type" => "select", "options" => array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10'));
     $options[] = array("name" => __('Features Slider Effect', 'woothemes'), "desc" => __('Select the effect used when transitioning between posts (default: <strong>slide</strong>).', 'woothemes'), "id" => $shortname . "_slider_effect", "type" => "select2", "std" => "slide", "options" => array("slide" => __('Slide', 'woothemes'), "fade" => __('Fade', 'woothemes')));
     $options[] = array("name" => __('Slider Pagination', 'woothemes'), "desc" => __('Enable/disable the display of pagination in the sliders.', 'woothemes'), "id" => $shortname . "_slider_pagination", "std" => "true", "type" => "checkbox");
     if (is_woocommerce_activated()) {
         $options[] = array("name" => __('WooCommerce', 'woothemes'), "icon" => "woocommerce", "type" => "heading");
         $options[] = array("name" => __('WooCommerce Page Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_wc_layout", "std" => "one-col", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
         $options[] = array("name" => __('Search scope', 'woothemes'), "desc" => __('Select whether you want the search widget to search for products or posts', 'woothemes'), "id" => $shortname . "_header_search_scope", "type" => "select2", "options" => array('products' => __('Products', 'woothemes'), 'posts' => __('Posts', 'woothemes')));
         $options[] = array('name' => __('Custom Placeholder', 'woothemes'), 'desc' => __('Upload a custom placeholder to be displayed when there is no product image.', 'woothemes'), 'id' => $shortname . '_placeholder_url', 'std' => '', 'type' => 'upload');
         $options[] = array('name' => __('Header Cart Link', 'woothemes'), 'desc' => __('Display a link to the cart in the main navigation', 'woothemes'), 'id' => $shortname . '_header_cart_link', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Header Cart Totals', 'woothemes'), 'desc' => __('Display item and amount totals in the cart in the main navigation', 'woothemes'), 'id' => $shortname . '_header_cart_total', 'std' => 'false', 'type' => 'checkbox');
     }
     /* Portfolio */
     if (woo_has_portfolio_items()) {
         $options[] = array("name" => __('Portfolio', 'woothemes'), "icon" => "portfolio", "type" => "heading");
         $options[] = array("name" => __('Portfolio Setup', 'woothemes'), "desc" => "", "id" => $shortname . "_portfolio_notice", "std" => sprintf(__('<strong>Important:</strong> This feature will be removed from the theme in the future and replaced with %s. Please download and install the plugin. <br /><br />Below you can setup and enable/disable the portfolio settings. When modifying the portfolio settings, please visit the <a href="%s">Settings - Permalinks</a> screen to refresh your WordPress URLs.', 'woothemes'), '<a href="http://wordpress.org/plugins/projects-by-woothemes/">' . __('Projects by WooThemes', 'woothemes') . '</a>', admin_url('options-permalink.php')), "type" => "info");
         $options[] = array("name" => __('Disable Portfolio', 'woothemes'), "desc" => __('Disable the portfolio functionality.', 'woothemes'), "id" => $shortname . "_portfolio_disable", "std" => "false", "type" => "checkbox");
         $options[] = array("name" => __('Enable Single Portfolio Gallery', 'woothemes'), "desc" => __('Enable the gallery feature in the single portfolio page layout.', 'woothemes'), "id" => $shortname . "_portfolio_gallery", "std" => "true", "type" => "checkbox");
         $options[] = array("name" => __('Portfolio Items URL Base', 'woothemes'), "desc" => sprintf(__('The base of all portfolio item URLs (visit the %s screen after changing this setting).', 'woothemes'), '<a href="' . admin_url('options-permalink.php') . '">' . __('Settings- Permalinks', 'woothemes') . '</a>'), "id" => $shortname . "_portfolioitems_rewrite", "std" => "portfolio-items", "type" => "text");
         $options[] = array("name" => __('Exclude Galleries from the Portfolio Navigation', 'woothemes'), "desc" => __('Optionally exclude portfolio galleries from the portfolio gallery navigation switcher. Place the gallery slugs here, separated by commas <br />(eg: one,two,three)', 'woothemes'), "id" => $shortname . "_portfolio_excludenav", "std" => "", "type" => "text");
         $options[] = array("name" => __('Portfolio Thumbnail Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the image size.', 'woothemes'), "id" => $shortname . "_portfolio_thumb_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_portfolio_thumb_width', 'type' => 'text', 'std' => 210, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_portfolio_thumb_height', 'type' => 'text', 'std' => 157, 'meta' => __('Height', 'woothemes'))));
         $options[] = array("name" => __('Portfolio Galleries Page Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_portfolio_layout", "std" => "one-col", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
         $options[] = array("name" => __('Portfolio Single Post Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_portfolio_layout_single", "std" => "one-col", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
         $options[] = array("name" => __('Exclude Portfolio Items from Search Results', 'woothemes'), "desc" => __('Exclude portfolio items from results when searching your website.', 'woothemes'), "id" => $shortname . "_portfolio_excludesearch", "std" => "false", "type" => "checkbox");
         $options[] = array("name" => __('Portfolio Items Link To', 'woothemes'), "desc" => __('Do the portfolio items link to the lightbox, or to the single portfolio item screen?', 'woothemes'), "id" => $shortname . "_portfolio_linkto", "std" => "lightbox", "type" => "select2", "options" => array('lightbox' => __('Lightbox', 'woothemes'), 'post' => __('Portfolio Item', 'woothemes')));
     }
     /* Dynamic Images */
     $options[] = array("name" => __('Dynamic Images', 'woothemes'), "icon" => "image", "type" => "heading");
     $options[] = array('name' => __('Resizer Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Dynamic Image Resizing', 'woothemes'), "desc" => "", "id" => $shortname . "_wpthumb_notice", "std" => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> (default) or <strong>TimThumb</strong>.', 'woothemes'), "type" => "info");
     $options[] = array("name" => __('WP Post Thumbnail', 'woothemes'), "desc" => __('Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => __('WP Post Thumbnail - Dynamic Image Resizing', 'woothemes'), "desc" => __('The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => __('WP Post Thumbnail - Hard Crop', 'woothemes'), "desc" => __('The post thumbnail will be cropped to match the target aspect ratio (only used if <em>Dynamic Image Resizing</em> is enabled).', 'woothemes'), "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => __('TimThumb', 'woothemes'), "desc" => __('This will enable the <a href="http://code.google.com/p/timthumb/">TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel</strong>  below the post editor. Make sure your themes <em>cache</em> folder is writable.', 'woothemes'), "id" => $shortname . "_resize", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Automatic Image Thumbnail', 'woothemes'), "desc" => __('If no thumbnail is specified then the first uploaded image in the post is used.', 'woothemes'), "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array('name' => __('Thumbnail Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Thumbnail Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => "100", 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Thumbnail Alignment', 'woothemes'), "desc" => __('Select how to align your thumbnails with posts.', 'woothemes'), "id" => $shortname . "_thumb_align", "std" => "alignleft", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => __('Single Post - Show Thumbnail', 'woothemes'), "desc" => __('Show the thumbnail in the single post page.', 'woothemes'), "id" => $shortname . "_thumb_single", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Single Post - Thumbnail Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the image size.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Single Post - Thumbnail Alignment', 'woothemes'), "desc" => __('Select how to align your thumbnails with single posts.', 'woothemes'), "id" => $shortname . "_thumb_align_single", "std" => "alignright", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => __('Add Featured Image to RSS feed', 'woothemes'), "desc" => __('Add the featured image to your RSS feed', 'woothemes'), "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Enable Lightbox', 'woothemes'), "desc" => __('Enable the PrettyPhoto lightbox script on images within your website\'s content.', 'woothemes'), "id" => $shortname . "_enable_lightbox", "std" => "false", "type" => "checkbox");
     /* Tumblog Settings - will be depreceated. Hide if not already active. */
     if (get_option($shortname . '_woo_tumblog_switch') == "true") {
         $options[] = array("name" => __('Tumblog', 'woothemes'), "icon" => "tumblog", "type" => "heading");
         $options[] = array('name' => __('Tumblog Setup', 'woothemes'), 'type' => 'subheading');
         $options[] = array("name" => __('Tumblog Functionality', 'woothemes'), "desc" => "", "id" => $shortname . "_woo_tumblog_notice", "std" => sprintf(__('Tumblog will allow you to publish content using the WooTumblog functionality, including the Express for WordPress iPhone App. If you would like to use the iPhone app, you will need to enable XML-RPC publishing under Settings->Writing. Find out more at %s.', 'woothemes'), '<a href="http://express-app.com/" target="_blank">Express-App.com</a>'), "type" => "info");
         $options[] = array("name" => __('Enable Tumblog Functionality', 'woothemes'), "desc" => __('Enable Tumblog functionality in Canvas.', 'woothemes'), "id" => $shortname . "_woo_tumblog_switch", "std" => "false", "type" => "checkbox");
         $content_option_array = array('taxonomy' => __('Taxonomy', 'woothemes'), 'post_format' => __('Post Formats', 'woothemes'));
         $options[] = array("name" => __('Tumblog Content Method', 'woothemes'), "desc" => __('Select if you would like to use a Taxonomy of Post Formats to categorize your Tumblog content.', 'woothemes'), "id" => $shortname . "_tumblog_content_method", "std" => "post_format", "type" => "select2", "options" => $content_option_array);
         $options[] = array("name" => __('Use Custom Tumblog RSS Feed', 'woothemes'), "desc" => __('Replaces the default WordPress RSS feed output with Tumblog RSS output.', 'woothemes'), "id" => $shortname . "_custom_rss", "std" => "true", "type" => "checkbox");
         $options[] = array("name" => __('Tumblog Media Widths on the "Magazine" Page Template\'s Grid', 'woothemes'), "desc" => __('The output width for Tumblog media (images, videos, audio) on the "Magazine" page template\'s grid.', 'woothemes'), "id" => $shortname . "_tumblog_magazine_media_width", "std" => "300", "type" => "text");
         $options[] = array('name' => __('Content Formats', 'woothemes'), 'type' => 'subheading');
         $options[] = array("name" => __('Images Link to', 'woothemes'), "desc" => __('Select where your Tumblog Images will link to when clicked.', 'woothemes'), "id" => $shortname . "_image_link_to", "std" => "post", "type" => "radio", "options" => $options_image_link_to);
         $options[] = array("name" => __('Tumblog Images Width', 'woothemes'), "desc" => __('The output width for Tumblog image post images.', 'woothemes'), "id" => $shortname . "_tumblog_image_width", "std" => "610", "type" => "text");
         $options[] = array("name" => __('Tumblog Content Position: Images', 'woothemes'), "desc" => __('Select where you would like the Tumblog Specific content to be output around the standard content.', 'woothemes'), "id" => $shortname . "_woo_tumblog_images_content", "std" => 'Before', "type" => "select", "options" => $tumblog_options);
         $options[] = array("name" => __('Tumblog Audio Width', 'woothemes'), "desc" => __('The output width for Tumblog Audio player.', 'woothemes'), "id" => $shortname . "_tumblog_audio_width", "std" => "440", "type" => "text");
         $options[] = array("name" => __('Tumblog Content Position: Audio', 'woothemes'), "desc" => __('Select where you would like the Tumblog Specific content to be output around the standard content.', 'woothemes'), "id" => $shortname . "_woo_tumblog_audio_content", "std" => 'Before', "type" => "select", "options" => $tumblog_options);
         $options[] = array("name" => __('Tumblog Video Width', 'woothemes'), "desc" => __('The output width for Tumblog Videos.', 'woothemes'), "id" => $shortname . "_tumblog_video_width", "std" => "610", "type" => "text");
         $options[] = array("name" => __('Tumblog Content Position: Video', 'woothemes'), "desc" => __('Select where you would like the Tumblog Specific content to be output around the standard content.', 'woothemes'), "id" => $shortname . "_woo_tumblog_videos_content", "std" => "Before", "type" => "select", "options" => $tumblog_options);
         $options[] = array("name" => __('Tumblog Content Position: Quotes', 'woothemes'), "desc" => __('Select where you would like the Tumblog Specific content to be output around the standard content.', 'woothemes'), "id" => $shortname . "_woo_tumblog_quotes_content", "std" => "Before", "type" => "select", "options" => $tumblog_options);
     }
     // ENDIF Tumblog section
     /* Subscribe & Connect */
     $options[] = array("name" => __('Subscribe & Connect', 'woothemes'), "type" => "heading", "icon" => "connect");
     $options[] = array('name' => __('S&C Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Enable Subscribe & Connect - Single Post', 'woothemes'), "desc" => sprintf(__('Enable the subscribe & connect area on single posts. You can also add this as a <a href="%s">widget</a> in your sidebar.', 'woothemes'), admin_url('widgets.php')), "id" => $shortname . "_connect", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => __('Subscribe Title', 'woothemes'), "desc" => __('Enter the title to show in your subscribe & connect area.', 'woothemes'), "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => __('Text', 'woothemes'), "desc" => __('Change the default text in this area.', 'woothemes'), "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => __('Enable Related Posts', 'woothemes'), "desc" => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     $options[] = array('name' => __('Subscribe', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), "desc" => sprintf(__('Enter your <a href="%s">Feedburner ID</a> for the e-mail subscription form.', 'woothemes'), 'http://www.woothemes.com/tutorials/how-to-find-your-feedburner-id-for-email-subscription/'), "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => __('Subscribe By E-mail to MailChimp', 'woothemes'), "desc" => sprintf(__('If you have a MailChimp account you can enter the <a href="%s" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', 'woothemes'), 'http://woochimp.heroku.com'), "id" => $shortname . "_connect_mailchimp_list_url", "std" => '', "type" => "text");
     $options[] = array('name' => __('Connect', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Enable RSS', 'woothemes'), "desc" => __('Enable the subscribe and RSS icon.', 'woothemes'), "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => __('Twitter URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.twitter.com/">Twitter</a> URL e.g. http://www.twitter.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => __('Facebook URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.facebook.com/">Facebook</a> URL e.g. http://www.facebook.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => __('YouTube URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.youtube.com/">YouTube</a> URL e.g. http://www.youtube.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => __('Flickr URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.flickr.com/">Flickr</a> URL e.g. http://www.flickr.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => __('LinkedIn URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.www.linkedin.com.com/">LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => __('Delicious URL', 'woothemes'), "desc" => __('Enter your <a href="http://www.delicious.com/">Delicious</a> URL e.g. http://www.delicious.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => __('Google+ URL', 'woothemes'), "desc" => __('Enter your <a href="http://plus.google.com/">Google+</a> URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), "id" => $shortname . "_connect_googleplus", "std" => '', "type" => "text");
     $options[] = array('name' => __('Dribbble', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://dribbble.com/woothemes', 'woothemes'), '<a href="http://dribbble.com/">' . __('Dribbble', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_dribbble', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Instagram', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://instagram.com/woothemes', 'woothemes'), '<a href="http://instagram.com">' . __('Instagram', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_instagram', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Vimeo', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://vimeo.com/woothemes', 'woothemes'), '<a href="http://vimeo.com/">' . __('Vimeo', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_vimeo', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Pinterest', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://pinterest.com/woothemes', 'woothemes'), '<a href="http://pinterest.com/">' . __('Pinterest', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_pinterest', 'std' => '', 'type' => 'text');
     /* Contact Template Settings */
     $options[] = array('name' => __('Contact Page', 'woothemes'), 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => __('Contact Information', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Contact Information Panel', 'woothemes'), "desc" => __('Enable the contact information panel on your contact page template.', 'woothemes'), "id" => $shortname . "_contact_panel", "std" => "false", "class" => 'collapsed', "type" => "checkbox");
     $options[] = array('name' => __('Location Name', 'woothemes'), 'desc' => __('Enter the location name. Example: London Office', 'woothemes'), 'id' => $shortname . '_contact_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Location Address', 'woothemes'), 'desc' => __('Enter your company\'s address', 'woothemes'), 'id' => $shortname . '_contact_address', 'std' => '', 'class' => 'hidden', 'type' => "textarea");
     $options[] = array('name' => __('Telephone', 'woothemes'), 'desc' => __('Enter your telephone number', 'woothemes'), 'id' => $shortname . '_contact_number', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Fax', 'woothemes'), 'desc' => __('Enter your fax number', 'woothemes'), 'id' => $shortname . '_contact_fax', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array("name" => __('Contact Form E-Mail', 'woothemes'), "desc" => __('Enter your E-mail address to use on the "Contact Form" page Template.', 'woothemes'), "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => __('Enable Subscribe and Connect', 'woothemes'), "desc" => __('Enable the subscribe and connect functionality on the contact page template', 'woothemes'), "id" => $shortname . "_contact_subscribe_and_connect", "std" => "false", "type" => "checkbox");
     $options[] = array('name' => __('Maps', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Contact Form Google Maps Coordinates', 'woothemes'), 'desc' => sprintf(__('Enter your Google Map coordinates to display a map on the Contact Form page template. You can get these details from %sGoogle Maps%s', 'woothemes'), '<a href="' . esc_url('http://itouchmap.com/latlong.html') . '" target="_blank">', '</a>'), 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Disable Mousescroll', 'woothemes'), 'desc' => __('Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.', 'woothemes'), 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => __('Map Height', 'woothemes'), 'desc' => __('Height in pixels for the maps displayed on Single.php pages.', 'woothemes'), 'id' => $shortname . '_maps_single_height', 'std' => "250", 'type' => 'text');
     $options[] = array('name' => __('Default Map Zoom Level', 'woothemes'), 'desc' => __('Set this to adjust the default in the post & page edit backend.', 'woothemes'), 'id' => $shortname . '_maps_default_mapzoom', 'std' => "9", 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => __('Default Map Type', 'woothemes'), 'desc' => __('Set this to the default rendered in the post backend.', 'woothemes'), 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => __('Normal', 'woothemes'), 'G_SATELLITE_MAP' => __('Satellite', 'woothemes'), 'G_HYBRID_MAP' => __('Hybrid', 'woothemes'), 'G_PHYSICAL_MAP' => __('Terrain', 'woothemes')));
     $options[] = array('name' => __('Map Callout Text', 'woothemes'), 'desc' => __('Text or HTML that will be output when you click on the map marker for your location.', 'woothemes'), 'id' => $shortname . '_maps_callout_text', 'std' => "", 'type' => 'textarea');
     /* Projects */
     if (class_exists('Projects')) {
         $options[] = array('name' => __('Projects', 'woothemes'), 'type' => 'heading');
         $options[] = array("name" => __('Enable Old Portfolio Look', 'woothemes'), "desc" => __('This alternative design resembles the old Portfolio layout.', 'woothemes'), "id" => $shortname . "_projects_old_look", "std" => "false", "type" => "checkbox");
         $options[] = array("name" => __('Galleries Page Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_projects_layout", "std" => "two-col-left", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
         $options[] = array("name" => __('Single Project Layout', 'woothemes'), "desc" => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'woothemes'), "id" => $shortname . "_projects_layout_single", "std" => "two-col-left", "type" => "images", "options" => array('one-col' => $images_dir . '1c.png', 'two-col-left' => $images_dir . '2cl.png', 'two-col-right' => $images_dir . '2cr.png', 'three-col-left' => $images_dir . '3cl.png', 'three-col-middle' => $images_dir . '3cm.png', 'three-col-right' => $images_dir . '3cr.png'));
     }
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     $woo_metaboxes = array();
     if (get_post_type() == 'post' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array('name' => 'image', 'label' => __('Image', 'woothemes'), 'type' => 'upload', 'desc' => __('Upload an image or enter an URL.', 'woothemes'));
             $woo_metaboxes[] = array('name' => '_image_alignment', 'std' => __('Center', 'woothemes'), 'label' => __('Image Crop Alignment', 'woothemes'), 'type' => 'select2', 'desc' => __('Select crop alignment for resized image', 'woothemes'), 'options' => array('c' => 'Center', 't' => 'Top', 'b' => 'Bottom', 'l' => 'Left', 'r' => 'Right'));
         }
         $url = get_template_directory_uri() . '/functions/images/';
         $woo_metaboxes[] = array("name" => "layout", "label" => __('Layout', 'woothemes'), "type" => "images", "desc" => __('Select a specific layout for this post/page. Overrides default site layout.', 'woothemes'), "options" => array('' => $url . 'layout-off.png', 'one-col' => $url . '1c.png', 'two-col-left' => $url . '2cl.png', 'two-col-right' => $url . '2cr.png', 'three-col-left' => $url . '3cl.png', 'three-col-middle' => $url . '3cm.png', 'three-col-right' => $url . '3cr.png'));
         $woo_metaboxes[] = array("name" => "embed", "label" => __('Embed', 'woothemes'), "type" => "textarea", "desc" => __('Enter embed code for use on single posts and with the Video widget.', 'woothemes'));
         if (get_option('woo_woo_tumblog_switch') == 'true') {
             $woo_metaboxes[] = array("name" => "video-embed", "label" => __('Tumblog : Embed Code (Videos)', 'woothemes'), "type" => "textarea", "desc" => __('Add embed code for video services like Youtube or Vimeo - Tumblog only.', 'woothemes'));
             $woo_metaboxes[] = array("name" => "quote-author", "std" => "Unknown", "label" => __('Tumblog : Quote Author', 'woothemes'), "type" => "text", "desc" => __('Enter the name of the Quote Author.', 'woothemes'));
             $woo_metaboxes[] = array("name" => "quote-url", "std" => "http://", "label" => __('Tumblog : Link to Quote', 'woothemes'), "type" => "text", "desc" => __('Enter the url/web address of the Quote if available.', 'woothemes'));
             $woo_metaboxes[] = array("name" => "quote-copy", "std" => "Unknown", "label" => __('Tumblog : Quote', 'woothemes'), "type" => "textarea", "desc" => __('Enter the Quote.', 'woothemes'));
             $woo_metaboxes[] = array("name" => "audio", "std" => "http://", "label" => __('Tumblog : Audio URL', 'woothemes'), "type" => "text", "desc" => __('Enter the url/web address of the Audio file.', 'woothemes'));
             $woo_metaboxes[] = array("name" => "link-url", "std" => "http://", "label" => __('Tumblog : Link URL', 'woothemes'), "type" => "text", "desc" => __('Enter the url/web address of the Link.', 'woothemes'));
         }
     }
     // End post
     if (get_post_type() == 'slide' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array("name" => "image", "label" => __('Image', 'woothemes'), "type" => "upload", "desc" => __('Upload an image to be used as background of this slide. (optional)', 'woothemes'));
         }
         $woo_metaboxes[] = array("name" => "url", "label" => __('URL', 'woothemes'), "type" => "text", "desc" => __('Enter URL if you want to add a link to the uploaded image. (optional)', 'woothemes'));
     }
     // End slide
     /* "portfolio" Custom Post Type. */
     if (get_post_type() == 'portfolio' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array("name" => "portfolio-image", "label" => __('Portfolio Image', 'woothemes'), "type" => "upload", "desc" => __('Upload an image or enter an URL to your portfolio image', 'woothemes'));
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "c", "label" => __('Image Crop Alignment', 'woothemes'), "type" => "select2", "desc" => __('Select crop alignment for resized image', 'woothemes'), "options" => array("c" => __('Center', 'woothemes'), "t" => __('Top', 'woothemes'), "b" => __('Bottom', 'woothemes'), "l" => __('Left', 'woothemes'), "r" => __('Right', 'woothemes')));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => __('Video Embed Code', 'woothemes'), "type" => "textarea", "desc" => __('Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.', 'woothemes'));
         $woo_metaboxes['lightbox-url'] = array("name" => "lightbox-url", "label" => __('Lightbox URL', 'woothemes'), "type" => "text", "desc" => sprintf(__('Enter an optional URL to show in the %s for this portfolio item.', 'woothemes'), '<a href="http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/">' . __('PrettyPhoto lightbox', 'woothemes') . '</a>'));
         $woo_metaboxes['testimonial'] = array("name" => "testimonial", "label" => __('Testimonial', 'woothemes'), "type" => "textarea", "desc" => __('Enter a testimonial from your client to be displayed on the single portfolio page', 'woothemes'));
         $woo_metaboxes['testimonial_author'] = array("name" => "testimonial_author", "label" => __('Testimonial Author', 'woothemes'), "type" => "text", "desc" => __('Enter the name of the author of the testimonial e.g. Joe Bloggs', 'woothemes'));
         $woo_metaboxes[] = array("name" => "url", "label" => __('URL', 'woothemes'), "type" => "text", "desc" => __('Enter URL of your clients site. (optional)', 'woothemes'));
     }
     //End portfolio
     // Page fields.
     if (get_post_type() == 'page' || !get_post_type()) {
         // Create an array of the available "Slide Groups".
         $slide_pages = array('0' => __('All', 'woothemes'));
         $terms = get_terms('slide-page');
         if (is_array($terms) && count($terms) > 0) {
             foreach ($terms as $k => $v) {
                 $slide_pages[$v->term_id] = $v->name;
             }
         }
         $woo_metaboxes[] = array("name" => "_slide-page", "std" => "", "label" => __('Slide Group', 'woothemes'), "type" => "select2", "desc" => __('Optionally select a "Slide Group" to show slides from only that "Slide Group".', 'woothemes'), "options" => $slide_pages);
     }
     // End slide
     // Show layout option on all pages
     if (get_post_type() != 'post' && get_post_type() != 'slide') {
         $url = get_template_directory_uri() . '/functions/images/';
         $woo_metaboxes[] = array("name" => "layout", "label" => __('Layout', 'woothemes'), "type" => "images", "desc" => __('Select a specific layout for this post/page. Overrides default site layout.', 'woothemes'), "options" => array('' => $url . 'layout-off.png', 'one-col' => $url . '1c.png', 'two-col-left' => $url . '2cl.png', 'two-col-right' => $url . '2cr.png', 'three-col-left' => $url . '3cl.png', 'three-col-middle' => $url . '3cm.png', 'three-col-right' => $url . '3cr.png'));
     }
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
function woo_options()
{
    // VARIABLES
    $themename = "BlogTheme";
    $manualurl = 'http://www.woothemes.com/support/theme-documentation/blogtheme/';
    $shortname = "woo";
    $GLOBALS['template_path'] = get_bloginfo('template_directory');
    //Access the WordPress Categories via an Array
    $woo_categories = array();
    $woo_categories_obj = get_categories('hide_empty=0');
    foreach ($woo_categories_obj as $woo_cat) {
        $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
    }
    $categories_tmp = array_unshift($woo_categories, "Select a category:");
    //Access the WordPress Pages via an Array
    $woo_pages = array();
    $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
    foreach ($woo_pages_obj as $woo_page) {
        $woo_pages[$woo_page->ID] = $woo_page->post_name;
    }
    $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
    //Stylesheets Reader
    $alt_stylesheet_path = TEMPLATEPATH . '/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
    $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");
    // THIS IS THE DIFFERENT FIELDS
    $options = array();
    // THIS IS THE DIFFERENT FIELDS
    $options[] = array("name" => "General Settings", "icon" => "general", "type" => "heading");
    $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
    $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
    $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
    $options[] = array("name" => "Tracking 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");
    $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feedburner_url", "std" => "", "type" => "text");
    $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
    $options[] = array("name" => "Twitter Username", "desc" => "Enter your Twitter Username here.", "id" => $shortname . "_twitter", "std" => "", "type" => "text");
    $options[] = array("name" => "Layout Options", "icon" => "layout", "type" => "heading");
    $options[] = array("name" => "Exclude pages from menu", "desc" => "Enter a comma-separated list of the <a href'http://faq.wordpress.com/2008/05/29/how-to-find-page-id-numbers/'>page ID's</a> that you'd like to exclude from the main top navigation. (ie. 1,2,3,4)", "id" => $shortname . "_menupages", "std" => "", "type" => "text");
    $options[] = array("name" => "Display Full Post or Excerpt?", "desc" => "If checked, the homepage will display the full post content. If unchecked it will display the excerpt only.", "id" => $shortname . "_the_content", "std" => "false", "type" => "checkbox");
    // Add extra options through function
    if (function_exists("woo_options_add")) {
        $options = woo_options_add($options);
    }
    if (get_option('woo_template') != $options) {
        update_option('woo_template', $options);
    }
    if (get_option('woo_themename') != $themename) {
        update_option('woo_themename', $themename);
    }
    if (get_option('woo_shortname') != $shortname) {
        update_option('woo_shortname', $shortname);
    }
    if (get_option('woo_manual') != $manualurl) {
        update_option('woo_manual', $manualurl);
    }
    // Woo Metabox Options
    $woo_metaboxes = array("page-description" => array("name" => "page-description", "default" => "", "label" => "Page Description", "type" => "text"));
    // Add extra metaboxes through function
    if (function_exists("woo_metaboxes_add")) {
        $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
    }
    if (get_option('woo_custom_template') != $woo_metaboxes) {
        update_option('woo_custom_template', $woo_metaboxes);
    }
    /*
    function woo_update_options(){
            $options = get_option('woo_template',$options);  
            foreach ($options as $option){
                update_option($option['id'],$option['std']);
            }   
    }
    
    function woo_add_options(){
            $options = get_option('woo_template',$options);  
            foreach ($options as $option){
                update_option($option['id'],$option['std']);
            }   
    }
    
    
    //add_action('switch_theme', 'woo_update_options'); 
    if(get_option('template') == 'wooframework'){       
        woo_add_options();
    } // end function 
    */
}
示例#5
0
 function woo_options()
 {
     // VARIABLES
     $themename = "Inspire";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/inspire/';
     $shortname = "woo";
     $GLOBALS['template_path'] = get_bloginfo('template_directory');
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_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");
     //URL Shorteners
     if (_iscurlinstalled()) {
         $options_select = array("Off", "TinyURL", "Bit.ly");
         $short_url_msg = 'Select the URL shortening service you would like to use.';
     } else {
         $options_select = array("Off");
         $short_url_msg = '<strong>cURL was not detected on your server, and is required in order to use the URL shortening services.</strong>';
     }
     //Stylesheets Reader
     $alt_stylesheet_path = TEMPLATEPATH . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     $options[] = array("name" => "General Settings", "icon" => "general", "type" => "heading");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your theme's alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable if you want Blog Title and Tagline to be text-based. Setup title/tagline in WP -> Settings -> General.", "id" => $shortname . "_texttitle", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => "E-Mail URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting 'Contact Form' as page template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Styling Options", "icon" => "styling", "type" => "heading");
     $options[] = array("name" => "Use Google Font", "desc" => "Use <a target='_blank' href='http://code.google.com/webfonts/family?family=Droid+Sans'>Google font replacement</a>. Fonts used are 'Droid Sans' and 'Droid Serif'. ", "id" => "woo_google_fonts", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Body Background Color", "desc" => "Pick a custom color for background color of the theme e.g. #697e09", "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Body Background Image", "desc" => "Upload an image for the theme's background.", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background Image Repeat", "desc" => "Select how you would like to repeat the background-image.", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => $body_repeat);
     $options[] = array("name" => "Background Image Position", "desc" => "Select how you would like to position the background.", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => $body_pos);
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Button Color", "desc" => "Pick a custom color for buttons or add a hex color code e.g. #697e09", "id" => "woo_button_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Home - Featured", "icon" => "featured", "type" => "heading");
     $options[] = array("name" => "Disable Featured Area", "desc" => "Check this if you don't want to use the featured area.", "id" => $shortname . "_featured_disable", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Featured Image Bottom Margin", "desc" => "Enter a custom bottom margin for the featured image e.g -65 or 20", "id" => $shortname . "_featured_image_margin", "std" => "-65", "type" => "text");
     $options[] = array("name" => "Featured Fade Speed", "desc" => "Enter a time in milliseconds for the fade transition e.g. 500", "id" => $shortname . "_featured_speed", "std" => "500", "type" => "text");
     $options[] = array("name" => "Featured Timeout", "desc" => "Enter a time in milliseconds to wait between page transitions e.g. 6000. Set to 0 to disable auto fade.", "id" => $shortname . "_featured_timeout", "std" => "6000", "type" => "text");
     $options[] = array("name" => "Featured Auto Resize", "desc" => "Enable automatic resizing of the featured area with animation to fit the featured page content.", "id" => $shortname . "_featured_resize", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Custom Height", "desc" => "Change the default featured height from 325px to your own preferred height. <strong>Example: '300'</strong>.", "id" => $shortname . "_featured_height", "std" => "", "type" => "text");
     $options[] = array("name" => "Home - Main Area", "icon" => "homepage", "type" => "heading");
     $options[] = array("name" => "Mini-Features Area", "desc" => "Enable the front page Mini-Features features area.", "id" => $shortname . "_main_pages", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Mini-Features More Link URL", "desc" => "Enter a URL for the more features link under mini-features.", "id" => $shortname . "_main_pages_link", "std" => "", "type" => "text");
     $options[] = array("name" => "Mini-Features More Link Text", "desc" => "Enter a text for the more features link under mini-features.", "id" => $shortname . "_main_pages_link_text", "std" => "View all features", "type" => "text");
     $options[] = array("name" => "Custom permalink", "desc" => "This option allows you to change the permalink on the individual mini-features pages. (e.g /infobox/pagename to /features/pagename/). Please update <a href='" . admin_url('options-permalink.php') . "'>Permalinks</a> after any changes.", "id" => $shortname . "_infobox_rewrite", "std" => "infobox", "type" => "text");
     $options[] = array("name" => "Homepage content #1", "desc" => "(Optional) Select a page that you'd like to display on the front page <strong>above the mini features area</strong>.", "id" => $shortname . "_main_page1", "std" => "Select a page:", "type" => "select", "options" => $woo_pages);
     $options[] = array("name" => "Homepage content #2", "desc" => "(Optional) Select a page that you'd like to display on the front page <strong>below the mini features area.</strong>", "id" => $shortname . "_main_page2", "std" => "Select a page:", "type" => "select", "options" => $woo_pages);
     $options[] = array("name" => "Portfolio", "icon" => "portfolio", "type" => "heading");
     $options[] = array("name" => "Use Lightbox?", "desc" => "Show the portfolio URL or large image in a javascript lightbox.", "id" => $shortname . "_portfolio_lightbox", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Use Dynamic Image Resizer?", "desc" => "Use the dynamic image resizer (thumb.php) to resize the portfolio thumbnail. Remember to CHMOD your cache folder to 777. <a href='http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/'>Need help?</a>", "id" => $shortname . "_portfolio_resize", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Portfolio Tags", "desc" => "Enter comma seperated tags for portfolio sorting (e.g. web, print, icons). You must add these tags to the portfolio items you want to sort.", "id" => $shortname . "_portfolio_tags", "std" => "", "type" => "text");
     $options[] = array("name" => "Layout Options", "icon" => "layout", "type" => "heading");
     $options[] = array("name" => "Show Breadcrumbs bar?", "desc" => "Check this box if you'd like to show breadcrumbs at the top of your pages, posts and archives. <a href='http://yoast.com/wordpress/breadcrumbs/'>Yoast Breadcrumbs Plugin</a> is supported in the breadcrumbs bar.", "id" => $shortname . "_breadcrumbs", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Blog Excerpt", "desc" => "Show only the excerpt in the blog section. ", "id" => $shortname . "_excerpt", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => "Enable WordPress Post Thumbnail Support", "desc" => "Use WordPress post thumbnail support to assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Dynamically Resize Post Thumbnail", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Hard Crop Post Thumbnail", "desc" => "The image will be cropped to match the target aspect ratio.", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "Enable Dynamic Image Resizer", "desc" => "This will enable the thumb.php script which dynamically resizes images on your site.", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbs", "desc" => "If no image is specified in the 'image' custom field then the first uploaded post image is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => 'Height')));
     $options[] = array("name" => "Thumbnail Image alignment", "desc" => "Select how to align your thumbnails with posts.", "id" => $shortname . "_thumb_align", "std" => "alignleft", "type" => "radio", "options" => $options_thumb_align);
     $options[] = array("name" => "Show thumbnail in Single Posts", "desc" => "Show the attached image in the single post page.", "id" => $shortname . "_thumb_single", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Single Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the image size. Max width is 576.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => 'Width'), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => 'Height')));
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     //Footer
     $options[] = array("name" => "Footer Customization", "icon" => "footer", "type" => "heading");
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $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" => "<p></p>", "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" => "<p></p>", "type" => "textarea");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     $woo_metaboxes = array();
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload image for use with blog posts");
     }
     // End post
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes["slide_image"] = array("name" => "slide_image", "label" => "Slider Image", "type" => "upload", "desc" => "Upload image for use in the featured area on the homepage");
         $woo_metaboxes["slide_url"] = array("name" => "slide_url", "label" => "Slider Link out", "type" => "text", "desc" => "Enter a custom URL for the featured image on homepage");
         $woo_metaboxes["slide_embed"] = array("name" => "slide_embed", "label" => "Slider Embed Code", "type" => "textarea", "desc" => "Enter a video embed code to use in featured area.");
     }
     // End slide
     if (get_post_type() == 'infobox' || !get_post_type()) {
         $woo_metaboxes['mini'] = array("name" => "mini", "label" => "Mini-features Icon", "type" => "upload", "desc" => "Upload icon for use with the Mini-Feature on the homepage (optimal size: 32x32px) (optional)");
         $woo_metaboxes['mini_excerpt'] = array("name" => "mini_excerpt", "label" => "Mini-features Excerpt", "type" => "textarea", "desc" => "Enter the text to show in your Mini-Feature. ");
         $woo_metaboxes['mini_readmore'] = array("name" => "mini_readmore", "std" => "", "label" => "Mini-features URL", "type" => "text", "desc" => "Add an URL for your Read More button in your Mini-Feature on homepage (optional)");
     }
     // End mini
     if (get_post_type() == 'portfolio' || !get_post_type()) {
         $woo_metaboxes['portfolio'] = array("name" => "portfolio", "label" => "Portfolio Thumbnail", "type" => "upload", "desc" => "Upload an image for use in the portfolio (optimal size: 450x210)");
         $woo_metaboxes['portfolio-large'] = array("name" => "portfolio-large", "label" => "Portfolio Large", "type" => "upload", "desc" => "Add an URL OR upload an image for use as the large portfolio image");
     }
     // End portfolio
     if (get_post_type() == 'feedback' || !get_post_type()) {
         $woo_metaboxes['feedback_citation'] = array("name" => "feedback_citation", "label" => "Citation", "type" => "text", "desc" => "Enter a citation for this feedback post.");
     }
     // End portfolio
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "Whitelight";
     $themeslug = "whitelight";
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = "woo";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the NXTClass Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_raw = $woo_pages;
     $woo_pages_raw[0] = "Select a page:";
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     // General
     $options[] = array("name" => "General Settings", "type" => "heading", "icon" => "general");
     $options[] = array("name" => "Quick Start", "type" => "subheading");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable text-based Site Title and Tagline. Setup title & tagline in <a href='" . home_url() . "/nxt-admin/options-general.php'>General Settings</a>.", "id" => $shortname . "_texttitle", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Site Title", "desc" => "Change the site title typography.", "id" => $shortname . "_font_site_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Arial', 'style' => 'bold', 'color' => '#222222'), "class" => "hidden", "type" => "typography");
     $options[] = array("name" => "Site Description", "desc" => "Enable the site description/tagline under site title.", "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Site Description", "desc" => "Change the site description typography.", "id" => $shortname . "_font_tagline", "std" => array('size' => '10', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#666666'), "class" => "hidden last", "type" => "typography");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "Subscription Settings", "type" => "subheading");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     /*
     $options[] = array( "name" => "E-Mail Subscription URL",
     					"desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)",
     					"id" => $shortname."_subscribe_email",
     					"std" => "",
     					"type" => "text" );
     */
     $options[] = array("name" => "Display Options", "type" => "subheading");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Post Author Box", "desc" => "This will enable the post author box on the single posts page. Edit description in <a href='" . home_url() . "/nxt-admin/profile.php'>Profile</a>.", "id" => $shortname . "_post_author", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Display Breadcrumbs", "desc" => "Display dynamic breadcrumbs on each page of your website.", "id" => $shortname . "_breadcrumbs_show", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Pagination Style", "desc" => "Select the style of pagination you would like to use on the blog.", "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => "Numbers", "simple" => "Next/Previous"));
     // Styling
     $options[] = array("name" => "Styling Options", "type" => "heading", "icon" => "styling");
     $options[] = array("name" => "Background", "type" => "subheading");
     $options[] = array("name" => "Background Color", "desc" => "Pick a custom color for background color of the theme e.g. #697e09", "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Background Image", "desc" => "Upload an image for the theme's background", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background Image Repeat", "desc" => "Select how you would like to repeat the background-image", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Background Image Position", "desc" => "Select how you would like to position the background", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Header", "type" => "subheading");
     $options[] = array("name" => "Header Background Color", "desc" => "Pick a custom color for background color of the theme's header e.g. #697e09", "id" => "woo_header_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Header Background Image", "desc" => "Upload an image for the theme's header background", "id" => $shortname . "_header_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Header Background Image Repeat", "desc" => "Select how you would like to repeat the header background-image", "id" => $shortname . "_header_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Header Background Image Position", "desc" => "Select how you would like to position the header background", "id" => $shortname . "_header_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Slider", "type" => "subheading");
     $options[] = array("name" => "Slider Background Color", "desc" => "Pick a custom color for background color of the theme's slider e.g. #697e09", "id" => "woo_slider_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Slider Background Image", "desc" => "Upload an image for the theme's header background", "id" => $shortname . "_slider_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Slider Background Image Repeat", "desc" => "Select how you would like to repeat the slider background-image", "id" => $shortname . "_slider_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Slider Background Image Position", "desc" => "Select how you would like to position the slider background", "id" => $shortname . "_slider_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Intro Section", "type" => "subheading");
     $options[] = array("name" => "Intro Section Background Color", "desc" => "Pick a custom color for background color of the theme's intro section e.g. #697e09", "id" => "woo_intro_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Intro Section Background Image", "desc" => "Upload an image for the theme's intro section background", "id" => $shortname . "_intro_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Intro Section Background Image Repeat", "desc" => "Select how you would like to repeat the intro section background-image", "id" => $shortname . "_intro_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Intro Section Background Image Position", "desc" => "Select how you would like to position the intro section background", "id" => $shortname . "_intro_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Links", "type" => "subheading");
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Button Color", "desc" => "Pick a custom color for buttons or add a hex color code e.g. #697e09", "id" => "woo_button_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Navigation Hover &amp; Dropdowns Color", "desc" => "Pick a custom color for navigation hover &amp; dropdowns or add a hex color code e.g. #697e09", "id" => "woo_navhover_color", "std" => "", "type" => "color");
     /* Typography */
     $options[] = array("name" => "Typography", "type" => "heading", "icon" => "typography");
     $options[] = array("name" => "Enable Custom Typography", "desc" => "Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.", "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "General Typography", "desc" => "Change the general font.", "id" => $shortname . "_font_body", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => 'normal', 'color' => '#585858'), "type" => "typography");
     $options[] = array("name" => "Navigation", "desc" => "Change the navigation font.", "id" => $shortname . "_font_nav", "std" => array('size' => '17', 'unit' => 'px', 'face' => 'Signika', 'style' => 'normal', 'color' => '#4B4B4B'), "type" => "typography");
     $options[] = array("name" => "Intro Section", "desc" => "Change the page title.", "id" => $shortname . "_font_intro_section", "std" => array('size' => '23', 'unit' => 'px', 'face' => 'Signika', 'style' => 'normal', 'color' => '#585858'), "type" => "typography");
     $options[] = array("name" => "Page Title", "desc" => "Change the page title.", "id" => $shortname . "_font_page_title", "std" => array('size' => '22', 'unit' => 'px', 'face' => 'Signika', 'style' => 'bold', 'color' => '#252525'), "type" => "typography");
     $options[] = array("name" => "Post Title", "desc" => "Change the post title.", "id" => $shortname . "_font_post_title", "std" => array('size' => '22', 'unit' => 'px', 'face' => 'Signika', 'style' => 'bold', 'color' => '#252525'), "type" => "typography");
     $options[] = array("name" => "Post Meta", "desc" => "Change the post meta.", "id" => $shortname . "_font_post_meta", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#727272'), "type" => "typography");
     $options[] = array("name" => "Post Entry", "desc" => "Change the post entry.", "id" => $shortname . "_font_post_entry", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#585858'), "type" => "typography");
     $options[] = array("name" => "Widget Titles", "desc" => "Change the widget titles.", "id" => $shortname . "_font_widget_titles", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => 'bold', 'color' => '#585858'), "type" => "typography");
     /* Layout */
     $options[] = array("name" => "Layout Options", "type" => "heading", "icon" => "layout");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => "Main Layout", "desc" => "Select which layout you want for your site.", "id" => $shortname . "_site_layout", "std" => "layout-left-content", "type" => "images", "options" => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array("name" => "Header - Search Field", "desc" => "Enable the search field in the header area.", "id" => $shortname . "_header_search", "std" => "true", "type" => "checkbox");
     /* Homepage */
     $options[] = array("name" => "Homepage Options", "type" => "heading", "icon" => "homepage");
     $options[] = array("name" => "Intro Message", "type" => "subheading");
     $options[] = array("name" => "Enable Homepage Intro Message", "desc" => "Enable the intro message area on the homepage.", "id" => $shortname . "_custom_intro_message", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Homepage Intro Message", "desc" => "Enter a welcome message for your homepage to be displayed under the slider area.", "id" => $shortname . "_custom_intro_message_text", "std" => 'Whitelight features a full width slider and a widgetized homepage, allowing you full control over how you showcase your business. <a href="http://woothemes.com/2012/02/whitelight/">Read more</a> about all the cool features!', "type" => "textarea");
     $options[] = array("name" => "Features Area", "type" => "subheading");
     $options[] = array("name" => "Enable Features Area", "desc" => "Enable the features area on the homepage.", "id" => $shortname . "_features_area", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Number of Features", "desc" => "Select the number of features that should appear in the features area on the home page.", "id" => $shortname . "_features_area_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => __('Features Order', 'woothemes'), "desc" => __('Select which way you wish to order your features.', 'woothemes'), "id" => $shortname . "_features_area_order", "std" => "DESC", "type" => "select2", "options" => array("desc" => __('Newest to oldest', 'woothemes'), "ASC" => "Oldest to newest", "rand" => "Random order"));
     $options[] = array("name" => "Features Area Title Text", "desc" => "Enter the title for the features area to be displayed on your homepage.", "id" => $shortname . "_features_area_title", "std" => "Some of our Features", "type" => "text");
     $options[] = array("name" => "Features Area Message", "desc" => "Enter the message for the features area to be displayed on your homepage.", "id" => $shortname . "_features_area_message", "std" => 'This is where your latest Features custom posts will show up. You can change this text in the options.', "type" => "textarea");
     $options[] = array("name" => "Features Area Link Text", "desc" => "Enter the text for the link to the features archive page in the features area to be displayed on your homepage.", "id" => $shortname . "_features_area_link_text", "std" => "View all our Features", "type" => "text");
     $options[] = array("name" => "Features Area Link URL (optional)", "desc" => "Enter an custom URL for the features archive page link.", "id" => $shortname . "_features_area_link_URL", "std" => "", "type" => "text");
     $options[] = array("name" => "Portfolio Area", "type" => "subheading");
     $options[] = array("name" => "Enable Portfolio Area", "desc" => "Enable the portfolio area on the homepage.", "id" => $shortname . "_portfolio_area", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Number of Portfolio items", "desc" => "Select the number of portfolio items that should appear in the portfolio area on the home page.", "id" => $shortname . "_portfolio_area_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => __('Portfolio Order', 'woothemes'), "desc" => __('Select which way you wish to order your porfolio items.', 'woothemes'), "id" => $shortname . "_portfolio_area_order", "std" => "DESC", "type" => "select2", "options" => array("desc" => __('Newest to oldest', 'woothemes'), "ASC" => "Oldest to newest", "rand" => "Random order"));
     $options[] = array("name" => "Portfolio Area Title Text", "desc" => "Enter the title for the portfolio area to be displayed on your homepage.", "id" => $shortname . "_portfolio_area_title", "std" => "Recent Work", "type" => "text");
     $options[] = array("name" => "Portfolio Area Message", "desc" => "Enter the message for the portfolio area to be displayed on your homepage.", "id" => $shortname . "_portfolio_area_message", "std" => 'This is where your latest Portfolio custom posts will show up. You can change this text in the options.', "type" => "textarea");
     $options[] = array("name" => "Portfolio Area Link Text", "desc" => "Enter the text for the link to the portfolio items archive page in the features area to be displayed on your homepage.", "id" => $shortname . "_portfolio_area_link_text", "std" => "View more work", "type" => "text");
     $options[] = array("name" => "Portfolio Area Link URL (optional)", "desc" => "Enter an custom URL for the portfolio archive page link.", "id" => $shortname . "_portfolio_area_link_URL", "std" => "", "type" => "text");
     $options[] = array("name" => "Blog Area", "type" => "subheading");
     $options[] = array("name" => "Enable Blog Area", "desc" => "Enable the blog area on the homepage.", "id" => $shortname . "_blog_area", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Blog Area Content", "desc" => "Choose to display either blog posts or a page in the blog area.", "id" => $shortname . "_blog_area_content", "std" => "blog", "type" => "select2", "options" => array('blog' => 'Blog Posts', 'page' => 'Page Content'));
     $options[] = array("name" => "Number of Blog posts", "desc" => "Select the number of blog posts that should appear in the blog area on the home page.", "id" => $shortname . "_blog_area_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Category Exclude - Homepage", "desc" => "Specify a comma seperated list of category IDs or slugs that you'd like to exclude from your homepage (eg: uncategorized).", "id" => $shortname . "_exclude_cats_home", "std" => "", "type" => "text");
     $options[] = array("name" => "Page Content", "desc" => "Select the page to display in the blog area.", "id" => $shortname . "_blog_area_page", "std" => "", "type" => "select2", "options" => $woo_pages_raw);
     /* Featured Slider */
     $options[] = array("name" => "Featured Slider", "icon" => "slider", "type" => "heading");
     $options[] = array("name" => "Enable Featured Slider", "desc" => "Enable the featured post slider on the homepage.", "id" => $shortname . "_featured", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Entries", "desc" => "Select the number of entries that should appear in the home page slider.", "id" => $shortname . "_featured_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Slider type", "desc" => "Choose between the full-width or normal-width featured slider", "id" => $shortname . "_featured_type", "std" => "full", "type" => "select2", "options" => array('full' => 'Full Width', 'normal' => 'Normal Width'));
     $options[] = array("name" => "Slider Opacity", "desc" => "Select the opacity for non-active slides when using the Normal Width slider. 0 will hide the slides, 1 will show them without opacity.", "id" => $shortname . "_featured_opacity", "std" => "0.5", "type" => "select", "options" => array('0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1'));
     $options[] = array("name" => "Slider Image/Video Height", "desc" => "Set the initial height of the slider images/video. Note: The images need to be 960px+ wide for them to be dynamically resized. The full width slider scales the height responsively. ", "id" => $shortname . "_featured_height", "std" => "380", "type" => "text");
     $options[] = array("name" => __('Slides Post Order', 'woothemes'), "desc" => __('Select which way you wish to order your slider posts.', 'woothemes'), "id" => $shortname . "_featured_order", "std" => "DESC", "type" => "select2", "options" => array("desc" => __('Newest to oldest', 'woothemes'), "ASC" => "Oldest to newest", "rand" => "Random order"));
     $options[] = array("name" => "Disable Slider Title/Description on Video Posts", "desc" => "Don't show the title and description if you have a video post in the slider.", "id" => $shortname . "_slider_video_title", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Next/Prev Navigation", "desc" => "Select to enable next/prev slider for the featured slider.", "id" => $shortname . "_featured_nextprev", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Pagination", "desc" => "Select to enable pagination for the featured slider.", "id" => $shortname . "_featured_pagination", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Hover Pause", "desc" => "Hovering over featured slider will pause it.", "id" => $shortname . "_featured_hover", "std" => "true", "type" => "checkbox");
     /*
     $options[] = array( "name" => __( 'Slider Animation Effect', 'woothemes' ),
     					"desc" => __( 'Select the slider animation effect. ', 'woothemes' ),
     					"id" => $shortname."_featured_effect",
     					"type" => "select2",
     					"std" => "slide",
     					"options" => array("fade" => "Fade", "slide" => "Slide") );                         
     
     $options[] = array( "name" => __( 'Sliding Direction', 'woothemes' ),
     					"desc" => __( 'Select the sliding direction.', 'woothemes' ),
     					"id" => $shortname."_featured_sliding_direction",
     					"type" => "select2",
     					"options" => array("horizontal" => "Horizontal", "vertical" => "Vertical") );                         
     */
     $options[] = array("name" => "Auto Slide Interval", "desc" => "The time in <b>seconds</b> each slide pauses for, before transitioning to the next.", "id" => $shortname . "_featured_speed", "std" => "7", "type" => "select", "options" => array('Off', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'));
     $options[] = array("name" => "Slider Animation Speed", "desc" => "The time in <b>seconds</b> the animation between slides will take.", "id" => $shortname . "_featured_animation_speed", "std" => "0.6", "type" => "select", "options" => array('0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2.0'));
     /* Portfolio */
     $options[] = array("name" => __('Portfolio Settings', 'woothemes'), "icon" => "portfolio", "type" => "heading");
     /*
     $options[] = array( "name" => __( 'Enable Single Portfolio Gallery', 'woothemes' ),
     					"desc" => __( 'Enable the gallery feature in the single portfolio page layout.', 'woothemes' ),
     					"id" => $shortname."_portfolio_gallery",
     					"std" => "true",
     					"type" => "checkbox");
     */
     $options[] = array("name" => __('Portfolio Items URL Base', 'woothemes'), "desc" => sprintf(__('The base of all portfolio item URLs (re-save the %s after changing this setting).', 'woothemes'), '<a href="' . admin_url('options-permalink.php') . '">' . __('Permalinks', 'woothemes') . '</a>'), "id" => $shortname . "_portfolioitems_rewrite", "std" => "portfolio-items", "type" => "text");
     $options[] = array("name" => __('Exclude Galleries from the Portfolio Navigation', 'woothemes'), "desc" => __('Optionally exclude portfolio galleries from the portfolio gallery navigation switcher. Place the gallery slugs here, separated by commas <br />(eg: one, two, three)', 'woothemes'), "id" => $shortname . "_portfolio_excludenav", "std" => "", "type" => "text");
     $options[] = array("name" => __('Exclude Portfolio Items from Search Results', 'woothemes'), "desc" => __('Exclude portfolio items from results when searching your website.', 'woothemes'), "id" => $shortname . "_portfolio_excludesearch", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Portfolio Items Link To', 'woothemes'), "desc" => __('Do the portfolio items link to the lightbox, or to the single portfolio item screen?', 'woothemes'), "id" => $shortname . "_portfolio_linkto", "std" => "post", "type" => "select2", "options" => array('lightbox' => __('Lightbox', 'woothemes'), 'post' => __('Portfolio Item', 'woothemes')));
     $options[] = array("name" => __('Enable Pagination in Portfolio', 'woothemes'), "desc" => __('Enable pagination in the portfolio section (disables JavaScript filtering by category)', 'woothemes'), "id" => $shortname . "_portfolio_enable_pagination", "std" => "false", "class" => 'collapsed', "type" => "checkbox");
     $options[] = array("name" => __('Number of posts to display on "Portfolio" page template', 'woothemes'), "desc" => __('The number of posts to display per page, when pagination is enabled, in the "Portfolio" page template.', 'woothemes'), "id" => $shortname . "_portfolio_posts_per_page", "std" => get_option('posts_per_page'), "class" => 'hidden last', "type" => "text");
     /* Dynamic Images */
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => "Resizer Settings", "type" => "subheading");
     $options[] = array("name" => 'Dynamic Image Resizing', "desc" => "", "id" => $shortname . "_nxtthumb_notice", "std" => 'There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>nxt Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using nxt Post Thumbnail option.', "type" => "info");
     $options[] = array("name" => "nxt Post Thumbnail", "desc" => "Use NXTClass post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "nxt Post Thumbnail - Dynamic Image Resizing", "desc" => "The post thumbnail will be dynamically resized using native nxt resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "nxt Post Thumbnail - Hard Crop", "desc" => "The post thumbnail will be cropped to match the target aspect ratio (only used if 'Dynamic Image Resizing' is enabled).", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "TimThumb - Custom Settings Panel", "desc" => "This will enable the <a href='http://code.google.com/p/timthumb/'>TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. <a href='http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/'>Need help?</a>", "id" => $shortname . "_resize", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbnail", "desc" => "If no thumbnail is specifified then the first uploaded image in the post is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Settings", "type" => "subheading");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 710, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 180, 'meta' => 'Height')));
     $options[] = array("name" => "Single Post - Show Thumbnail", "desc" => "Show the thumbnail in the single post page.", "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings panel to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     /* Footer */
     $options[] = array("name" => "Footer Customization", "type" => "heading", "icon" => "footer");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => "Footer Widget Areas", "desc" => "Select how many footer widget areas you want to display.", "id" => $shortname . "_footer_sidebars", "std" => "4", "type" => "images", "options" => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $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");
     /* Subscribe & Connect */
     $options[] = array("name" => "Subscribe & Connect", "type" => "heading", "icon" => "connect");
     $options[] = array("name" => "Enable Subscribe & Connect - Single Post", "desc" => "Enable the subscribe & connect area on single posts. You can also add this as a <a href='" . home_url() . "/nxt-admin/widgets.php'>widget</a> in your sidebar.", "id" => $shortname . "_connect", "std" => 'false', "type" => "checkbox");
     $options[] = array("name" => "Subscribe Title", "desc" => "Enter the title to show in your subscribe & connect area.", "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => "Text", "desc" => "Change the default text in this area.", "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => "Subscribe By E-mail ID (Feedburner)", "desc" => "Enter your <a href='http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78982'>Feedburner ID</a> for the e-mail subscription form.", "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => 'Subscribe By E-mail to MailChimp', 'woothemes', "desc" => 'If you have a MailChimp account you can enter the <a href="http://woochimp.heroku.com" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', "id" => $shortname . "_connect_mailchimp_list_url", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable RSS", "desc" => "Enable the subscribe and RSS icon.", "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => "Twitter URL", "desc" => "Enter your  <a href='http://www.twitter.com/'>Twitter</a> URL e.g. http://www.twitter.com/woothemes", "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => "Facebook URL", "desc" => "Enter your  <a href='http://www.facebook.com/'>Facebook</a> URL e.g. http://www.facebook.com/woothemes", "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => "YouTube URL", "desc" => "Enter your  <a href='http://www.youtube.com/'>YouTube</a> URL e.g. http://www.youtube.com/woothemes", "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => "Flickr URL", "desc" => "Enter your  <a href='http://www.flickr.com/'>Flickr</a> URL e.g. http://www.flickr.com/woothemes", "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => "LinkedIn URL", "desc" => "Enter your  <a href='http://www.www.linkedin.com.com/'>LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes", "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => "Delicious URL", "desc" => "Enter your <a href='http://www.delicious.com/'>Delicious</a> URL e.g. http://www.delicious.com/woothemes", "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => "Google+ URL", "desc" => "Enter your <a href='http://plus.google.com/'>Google+</a> URL e.g. https://plus.google.com/104560124403688998123/", "id" => $shortname . "_connect_googleplus", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable Related Posts", "desc" => "Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.", "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     /* Advertising */
     $options[] = array("name" => "Advertising", "type" => "heading", "icon" => "ads");
     $options[] = array("name" => "Top Ad (468x60px)", "type" => "subheading");
     $options[] = array("name" => "Enable Ad", "desc" => "Enable the ad space", "id" => $shortname . "_ad_top", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Adsense code", "desc" => "Enter your adsense code (or other ad network code) here.", "id" => $shortname . "_ad_top_adsense", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Image Location", "desc" => "Enter the URL to the banner ad image location.", "id" => $shortname . "_ad_top_image", "std" => "http://www.woothemes.com/ads/468x60b.jpg", "type" => "upload");
     $options[] = array("name" => "Destination URL", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_top_url", "std" => "http://www.woothemes.com", "type" => "text");
     /* Contact Template Settings */
     $options[] = array('name' => "Contact Page", 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => "Contact Information", 'type' => 'subheading');
     $options[] = array("name" => "Enable Contact Information Panel", "desc" => "Enable the contact informal panel", "id" => $shortname . "_contact_panel", "std" => "false", "class" => 'collapsed', "type" => "checkbox");
     $options[] = array('name' => "Location Name", 'desc' => "Enter the location name. Example: London Office", 'id' => $shortname . '_contact_title', 'std' => '', "class" => 'hidden', 'type' => 'text');
     $options[] = array('name' => "Location Address", 'desc' => "Enter your company's address", 'id' => $shortname . '_contact_address', 'std' => '', "class" => 'hidden', 'type' => "textarea");
     $options[] = array('name' => "Telephone", 'desc' => "Enter your telephone number", 'id' => $shortname . '_contact_number', 'std' => '', "class" => 'hidden', 'type' => 'text');
     $options[] = array('name' => "Fax", 'desc' => "Enter your fax number", 'id' => $shortname . '_contact_fax', 'std' => '', "class" => 'hidden last', 'type' => 'text');
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the 'Contact Form' page Template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array('name' => "Your Twitter username", 'desc' => "Enter your Twitter username. Example: woothemes", 'id' => $shortname . '_contact_twitter', 'std' => '', 'type' => 'text');
     $options[] = array("name" => "Enable Subscribe and Connect", "desc" => "Enable the subscribe and connect functionality on the contact page template", "id" => $shortname . "_contact_subscribe_and_connect", "std" => "false", "type" => "checkbox");
     $options[] = array('name' => "Maps", 'type' => 'subheading');
     $options[] = array('name' => "Contact Form Google Maps Coordinates", 'desc' => 'Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from <a href="http://www.getlatlon.com/" target="_blank">Google Maps</a>', 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Disable Mousescroll", 'desc' => "Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.", 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => "Map Height", 'desc' => "Height in pixels for the maps displayed on Single.php pages.", 'id' => $shortname . '_maps_single_height', 'std' => "250", 'type' => 'text');
     $options[] = array('name' => "Default Map Zoom Level", 'desc' => "Set this to adjust the default in the post & page edit backend.", 'id' => $shortname . '_maps_default_mapzoom', 'std' => "9", 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => "Default Map Type", 'desc' => "Set this to the default rendered in the post backend.", 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => 'Normal', 'G_SATELLITE_MAP' => 'Satellite', 'G_HYBRID_MAP' => 'Hybrid', 'G_PHYSICAL_MAP' => 'Terrain'));
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     global $post;
     $woo_metaboxes = array();
     // Shown on both posts and pages
     // Show only on specific post types or page
     if (get_post_type() == 'post' || get_post_type() == 'slide' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "Center", "label" => "Image Crop Alignment", "type" => "select2", "desc" => "Select crop alignment for resized image", "options" => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
             // TimThumb disabled in the options
         } else {
             $woo_metaboxes[] = array("name" => "_timthumb-info", "label" => "Image", "type" => "info", "desc" => "<strong>TimThumb</strong> is disabled. Use the <strong>Featured Image</strong> panel in the sidebar instead, or enable TimThumb in the options panel.");
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar)");
     } elseif (get_post_type() == 'portfolio' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => __("Embed Code", 'woothemes'), "type" => "textarea", "desc" => __("Enter the video embed code for your video (YouTube, Vimeo or similar)", 'woothemes'));
         $woo_metaboxes[] = array("name" => "_portfolio_url", "std" => "", "label" => "Portfolio URL", "type" => "text", "desc" => "Enter an alternative URL for your Portfolio item. By default it will link to your portfolio post or lightbox.");
     }
     // End portfolio
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "url", "label" => "Slide URL", "type" => "text", "desc" => "Enter an URL to link the slider title and image to a page e.g. http://yoursite.com/pagename/ (optional) ");
     }
     // End Slide
     if (get_post_type() == 'features' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "feature_icon", "label" => "Features Icon", "type" => "upload", "desc" => "Upload icon for use with the Feature ara on the homepage (optimal size: 32x32px) (optional)");
         $woo_metaboxes[] = array("name" => "feature_excerpt", "label" => "Features Excerpt", "type" => "textarea", "desc" => "Enter the text to show in your Feature on your homepage. If nothing is specified, an excerpt of your post will be output.");
         $woo_metaboxes[] = array("name" => "feature_readmore", "std" => "", "label" => "Features URL", "type" => "text", "desc" => "Add an alternative URL for your Feature title link. By default it will link to your feature post.");
     }
     // End mini
     if (get_post_type() == 'post' || get_post_type() == 'page' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "_layout", "std" => "normal", "label" => "Layout", "type" => "images", "desc" => "Select the layout you want on this specific post/page.", "options" => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     }
     // End post & page
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#7
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = 'Hustle';
     $themeslug = 'hustle';
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = 'woo';
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, 'Select a page:');
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $slide_options = array();
     $total_possible_slides = 10;
     for ($i = 1; $i <= $total_possible_slides; $i++) {
         $slide_options[] = $i;
     }
     // Setup an array of slide-page terms for a dropdown.
     $args = array('echo' => 0, 'hierarchical' => 1, 'taxonomy' => 'slide-page');
     $cats_dropdown = wp_dropdown_categories($args);
     $cats = array();
     // Quick string hack to make sure we get the pages with the indents.
     $cats_dropdown = str_replace("<select name='cat' id='cat' class='postform' >", '', $cats_dropdown);
     $cats_dropdown = str_replace('</select>', '', $cats_dropdown);
     $cats_split = explode('</option>', $cats_dropdown);
     $cats[] = __('Select a Slide Group:', 'woothemes');
     foreach ($cats_split as $k => $v) {
         $id = '';
         // Get the ID value.
         preg_match('/value="(.*?)"/i', $v, $matches);
         if (isset($matches[1])) {
             $id = $matches[1];
             $cats[$id] = trim(strip_tags($v));
         }
     }
     $slide_groups = $cats;
     // Setup an array of category terms for a dropdown.
     $args = array('echo' => 0, 'hierarchical' => 1, 'taxonomy' => 'category');
     $cats_dropdown = wp_dropdown_categories($args);
     $cats = array();
     // Quick string hack to make sure we get the pages with the indents.
     $cats_dropdown = str_replace("<select name='cat' id='cat' class='postform' >", '', $cats_dropdown);
     $cats_dropdown = str_replace('</select>', '', $cats_dropdown);
     $cats_split = explode('</option>', $cats_dropdown);
     $cats[] = __('Select a Category:', 'woothemes');
     foreach ($cats_split as $k => $v) {
         $id = '';
         // Get the ID value.
         preg_match('/value="(.*?)"/i', $v, $matches);
         if (isset($matches[1])) {
             $id = $matches[1];
             $cats[$id] = trim(strip_tags($v));
         }
     }
     $woo_categories = $cats;
     // Setup an array of numbers.
     $woo_numbers = array();
     for ($i = 1; $i <= 20; $i++) {
         $woo_numbers[$i] = $i;
     }
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     $other_entries = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19');
     /* General */
     $options[] = array('name' => __('General Settings', 'woothemes'), 'type' => 'heading', 'icon' => 'general');
     $options[] = array('name' => __('Quick Start', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Theme Stylesheet', 'woothemes'), 'desc' => __('Select your themes alternative color scheme.', 'woothemes'), 'id' => $shortname . '_alt_stylesheet', 'std' => 'default.css', 'type' => 'select', 'options' => $alt_stylesheets);
     $options[] = array('name' => __('Custom Logo', 'woothemes'), 'desc' => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), 'id' => $shortname . '_logo', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Text Title', 'woothemes'), 'desc' => sprintf(__('Enable text-based Site Title and Tagline. Setup title & tagline in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/options-general.php">' . __('General Settings', 'woothemes') . '</a>'), 'id' => $shortname . '_texttitle', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Title', 'woothemes'), 'desc' => __('Change the site title typography.', 'woothemes'), 'id' => $shortname . '_font_site_title', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'Arvo', 'style' => 'bold', 'color' => '#000000'), 'class' => 'hidden', 'type' => 'typography');
     $options[] = array('name' => __('Site Description', 'woothemes'), 'desc' => __('Enable the site description/tagline under site title.', 'woothemes'), 'id' => $shortname . '_tagline', 'class' => 'hidden', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Description', 'woothemes'), 'desc' => __('Change the site description typography.', 'woothemes'), 'id' => $shortname . '_font_tagline', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#333333'), 'class' => 'hidden last', 'type' => 'typography');
     $options[] = array('name' => __('Custom Favicon', 'woothemes'), 'desc' => sprintf(__('Upload a 16px x 16px %1$s that will represent your website\'s favicon.', 'woothemes'), '<a href="http://www.faviconr.com/">' . __('ico image', 'woothemes') . '</a>'), 'id' => $shortname . '_custom_favicon', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Tracking Code', 'woothemes'), 'desc' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), 'id' => $shortname . '_google_analytics', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Subscription Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('RSS URL', 'woothemes'), 'desc' => __('Enter your preferred RSS URL. (Feedburner or other)', 'woothemes'), 'id' => $shortname . '_feed_url', 'std' => '', 'type' => 'text');
     /*
     $options[] = array( 'name' => __( 'E-Mail Subscription URL', 'woothemes' ),
         				'desc' => __( 'Enter your preferred E-mail subscription URL. (Feedburner or other)', 'woothemes' ),
         				'id' => $shortname . '_subscribe_email',
         				'std' => '',
         				'type' => 'text' );
     */
     $options[] = array('name' => __('Display Options', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Custom CSS', 'woothemes'), 'desc' => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), 'id' => $shortname . '_custom_css', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Post/Page Comments', 'woothemes'), 'desc' => __('Select if you want to enable/disable comments on posts and/or pages.', 'woothemes'), 'id' => $shortname . '_comments', 'std' => 'both', 'type' => 'select2', 'options' => array('post' => __('Posts Only', 'woothemes'), 'page' => __('Pages Only', 'woothemes'), 'both' => __('Pages / Posts', 'woothemes'), 'none' => __('None', 'woothemes')));
     $options[] = array('name' => __('Post Content', 'woothemes'), 'desc' => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), 'id' => $shortname . '_post_content', 'type' => 'select2', 'options' => array('excerpt' => __('The Excerpt', 'woothemes'), 'content' => __('Full Content', 'woothemes')));
     $options[] = array('name' => __('Post Author Box', 'woothemes'), 'desc' => sprintf(__('This will enable the post author box on the single posts page. Edit description in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/profile.php">' . __('Profile', 'woothemes') . '</a>'), 'id' => $shortname . '_post_author', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Breadcrumbs', 'woothemes'), 'desc' => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), 'id' => $shortname . '_breadcrumbs_show', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Pagination', 'woothemes'), 'desc' => __('Display pagination on the blog.', 'woothemes'), 'id' => $shortname . '_pagenav_show', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pagination Style', 'woothemes'), 'desc' => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), 'id' => $shortname . '_pagination_type', 'type' => 'select2', 'options' => array('paginated_links' => __('Numbers', 'woothemes'), 'simple' => __('Next/Previous', 'woothemes')));
     /* Styling */
     $options[] = array('name' => __('Styling', 'woothemes'), 'type' => 'heading', 'icon' => 'styling');
     $options[] = array('name' => __('Background', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Body Background Color', 'woothemes'), 'desc' => __('Pick a custom color for background color of the theme e.g. #697e09', 'woothemes'), 'id' => $shortname . '_body_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Body background image', 'woothemes'), 'desc' => __('Upload an image for the theme\'s background', 'woothemes'), 'id' => $shortname . '_body_img', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Background image repeat', 'woothemes'), 'desc' => __('Select how you would like to repeat the background-image', 'woothemes'), 'id' => $shortname . '_body_repeat', 'std' => 'no-repeat', 'type' => 'select', 'options' => array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'));
     $options[] = array('name' => __('Background image position', 'woothemes'), 'desc' => __('Select how you would like to position the background', 'woothemes'), 'id' => $shortname . '_body_pos', 'std' => 'top', 'type' => 'select', 'options' => array('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right'));
     $options[] = array('name' => __('Background Attachment', 'woothemes'), 'desc' => __('Select whether the background should be fixed or move when the user scrolls', 'woothemes'), 'id' => $shortname . '_body_attachment', 'std' => 'scroll', 'type' => 'select', 'options' => array('scroll', 'fixed'));
     $options[] = array('name' => __('Links', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Link Color', 'woothemes'), 'desc' => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Link Hover Color', 'woothemes'), 'desc' => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_hover_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Button Color', 'woothemes'), 'desc' => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_button_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Alternate Button Color', 'woothemes'), 'desc' => __('Pick a custom color for the alternate (secondary) buttons or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_button_color_alt', 'std' => '', 'type' => 'color');
     /* Typography */
     $options[] = array('name' => __('Typography', 'woothemes'), 'type' => 'heading', 'icon' => 'typography');
     $options[] = array('name' => __('Enable Custom Typography', 'woothemes'), 'desc' => __('Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes'), 'id' => $shortname . '_typography', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('General Typography', 'woothemes'), 'desc' => __('Change the general font.', 'woothemes'), 'id' => $shortname . '_font_body', 'std' => array('size' => '1.4', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Navigation', 'woothemes'), 'desc' => __('Change the navigation font.', 'woothemes'), 'id' => $shortname . '_font_nav', 'std' => array('size' => '0.9', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Page Title', 'woothemes'), 'desc' => __('Change the page title.', 'woothemes'), 'id' => $shortname . '_font_page_title', 'std' => array('size' => '2.2', 'unit' => 'em', 'face' => 'Arvo', 'style' => 'bold', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Post Title', 'woothemes'), 'desc' => __('Change the post title.', 'woothemes'), 'id' => $shortname . '_font_post_title', 'std' => array('size' => '1.4', 'unit' => 'em', 'face' => 'Arvo', 'style' => 'bold', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Post Meta', 'woothemes'), 'desc' => __('Change the post meta.', 'woothemes'), 'id' => $shortname . '_font_post_meta', 'std' => array('size' => '1.1', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#8E8E8E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Entry', 'woothemes'), 'desc' => __('Change the post entry.', 'woothemes'), 'id' => $shortname . '_font_post_entry', 'std' => array('size' => '1.1', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Widget Titles', 'woothemes'), 'desc' => __('Change the widget titles.', 'woothemes'), 'id' => $shortname . '_font_widget_titles', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'Arvo', 'style' => 'bold', 'color' => '#282828'), 'type' => 'typography');
     $options[] = array('name' => __('Introductory Message Header', 'woothemes'), 'desc' => __('Change the Introductory Message header typography.', 'woothemes'), 'id' => $shortname . '_font_introductory_message_header', 'std' => array('size' => '6', 'unit' => 'em', 'face' => 'Arvo', 'style' => 'bold', 'color' => '#000000'), 'type' => 'typography');
     $options[] = array('name' => __('Introductory Message Sub-Text', 'woothemes'), 'desc' => __('Change the Introductory Message sub-text typography.', 'woothemes'), 'id' => $shortname . '_font_introductory_message_subtext', 'std' => array('size' => '1.2', 'unit' => 'em', 'face' => 'Cabin', 'style' => '', 'color' => '#282828'), 'type' => 'typography');
     /* Layout */
     $options[] = array('name' => __('Layout', 'woothemes'), 'type' => 'heading', 'icon' => 'layout');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Main Layout', 'woothemes'), 'desc' => __('Select which layout you want for your site.', 'woothemes'), 'id' => $shortname . '_site_layout', 'std' => 'layout-left-content', 'type' => 'images', 'options' => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array('name' => __('Category Exclude - Homepage', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your homepage (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_home', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Category Exclude - Blog Page Template', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your \'Blog\' page template (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_blog', 'std' => '', 'type' => 'text');
     /* Featured Slider */
     /* See top of file for logic pertaining to $slide_options and $slide_groups arrays. */
     $options[] = array('name' => __('Featured Slider', 'woothemes'), 'icon' => 'slider', 'type' => 'heading');
     $options[] = array('name' => __('Slider Content', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Featured Slider', 'woothemes'), 'desc' => __('Enable the featured slider on the homepage.', 'woothemes'), 'id' => $shortname . '_featured', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Title', 'woothemes'), 'desc' => __('Enter the title to display above the featured slider on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_slider_area_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Number of Slides', 'woothemes'), 'desc' => __('Select the number of slides that should appear in the featured slider.', 'woothemes'), 'id' => $shortname . '_featured_entries', 'std' => '3', 'type' => 'select', 'options' => $slide_options);
     $options[] = array('name' => __('Slide Group', 'woothemes'), 'desc' => __('Optionally choose to display only slides from a specific slide group.', 'woothemes'), 'id' => $shortname . '_featured_slide_group', 'std' => '0', 'type' => 'select2', 'options' => $slide_groups);
     $options[] = array('name' => __('Display Title On Video Slides', 'woothemes'), 'desc' => __('If a slide has a video in the "Embed Code" field, display the slide title & content.', 'woothemes'), 'id' => $shortname . '_featured_videotitle', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Order', 'woothemes'), 'desc' => __('Select which way you wish to order your slider posts.', 'woothemes'), 'id' => $shortname . '_featured_order', 'std' => 'DESC', 'type' => 'select2', 'options' => array('DESC' => __('Newest to oldest', 'woothemes'), 'ASC' => __('Oldest to newest', 'woothemes')));
     $options[] = array('name' => __('Slider Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Animation Effect', 'woothemes'), 'desc' => __('Select whether the featured slider should slide or fade.', 'woothemes'), 'id' => $shortname . '_featured_animation', 'std' => 'fade', 'type' => 'select2', 'options' => array('fade' => __('Fade', 'woothemes'), 'slide' => __('Slide', 'woothemes')));
     $options[] = array('name' => __('Next / Previous Navigation', 'woothemes'), 'desc' => __('Select to enable next/prev slider for the featured slider.', 'woothemes'), 'id' => $shortname . '_featured_nextprev', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pagination Controls', 'woothemes'), 'desc' => __('Select to enable pagination for the featured slider.', 'woothemes'), 'id' => $shortname . '_featured_pagination', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Pause On Hover', 'woothemes'), 'desc' => __('Hovering over the featured slider will pause it.', 'woothemes'), 'id' => $shortname . '_featured_hover', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pause On Action', 'woothemes'), 'desc' => __('Using the featured slider navigation manually will pause it.', 'woothemes'), 'id' => $shortname . '_featured_action', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Auto-Animate Interval', 'woothemes'), 'desc' => sprintf(__('The time in %1$sseconds%2$s each slide pauses for, before transitioning to the next %3$s(set to "Off" to disable automatic transitions).', 'woothemes'), '<strong>', '</strong>', '<br /><br />'), 'id' => $shortname . '_featured_speed', 'std' => '7', 'type' => 'select2', 'options' => array_merge(array('0' => __('Off', 'woothemes')), $slide_options));
     $options[] = array('name' => __('Animation Speed', 'woothemes'), 'desc' => sprintf(__('The time in %1$sseconds%2$s the animation between slides will take.', 'woothemes'), '<strong>', '</strong>'), 'id' => $shortname . '_featured_animation_speed', 'std' => '0.6', 'type' => 'select', 'options' => array('0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2.0'));
     /* Homepage */
     $options[] = array('name' => __('Homepage', 'woothemes'), 'icon' => 'homepage', 'type' => 'heading');
     $options[] = array('name' => __('Homepage Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Homepage Setup', 'woothemes'), 'desc' => '', 'id' => $shortname . '_homepage_notice', 'std' => sprintf(__('You can optionally customise the homepage by adding widgets to the "Homepage" widgetized area on the "%sWidgets%s" screen with the "Woo - Component" widget.', 'woothemes'), '<a href="' . esc_url(admin_url('widgets.php')) . '">', '</a>') . '<br /><br />' . __('If you do so, this will override the options below.', 'woothemes'), 'type' => 'info');
     $options[] = array('name' => __('Enable Introductory Message', 'woothemes'), 'desc' => __('Display the introductory message on your homepage.', 'woothemes'), 'id' => $shortname . '_homepage_enable_intro_message', 'std' => 'true', 'type' => 'checkbox');
     if (is_woocommerce_activated()) {
         $options[] = array('name' => __('Enable Featured Products', 'woothemes'), 'desc' => __('Enable the featured products area to display your featured products from your store.', 'woothemes'), 'id' => $shortname . '_homepage_enable_featured_products', 'std' => 'true', 'type' => 'checkbox');
     }
     if (function_exists('woothemes_features')) {
         $options[] = array('name' => __('Enable The Features Area', 'woothemes'), 'desc' => __('Display features on your homepage.', 'woothemes'), 'id' => $shortname . '_homepage_enable_features', 'std' => 'true', 'type' => 'checkbox');
     }
     if (function_exists('woothemes_testimonials')) {
         $options[] = array('name' => __('Enable The Testimonials Area', 'woothemes'), 'desc' => __('Display testimonials on your homepage.', 'woothemes'), 'id' => $shortname . '_homepage_enable_testimonials', 'std' => 'true', 'type' => 'checkbox');
     }
     $options[] = array('name' => __('Enable Blog Posts', 'woothemes'), 'desc' => __('Display blog posts on your homepage.', 'woothemes'), 'id' => $shortname . '_homepage_enable_blog_posts', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Enable The Promotion Area', 'woothemes'), 'desc' => __('Display a promotion on your homepage.', 'woothemes'), 'id' => $shortname . '_homepage_enable_promotion', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Introductory Message', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Introductory Message Heading', 'woothemes'), 'desc' => __('Introductory message heading.', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_heading', 'std' => 'Meet Hustle.', 'type' => 'text');
     $options[] = array('name' => __('Introductory Message Content', 'woothemes'), 'desc' => __('Introductory message content', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_content', 'std' => 'A Jack-of-all-trades WordPress theme.', 'type' => 'textarea');
     $options[] = array('name' => __('Introductory Message Button Label', 'woothemes'), 'desc' => __('Introductory Message Button Label', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_button_label', 'std' => 'Show me more', 'type' => 'text');
     $options[] = array('name' => __('Introductory Message Button URL', 'woothemes'), 'desc' => __('Introductory Message Button URL', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_button_url', 'std' => '#', 'type' => 'text');
     $options[] = array('name' => __('Introductory Message Background Image', 'woothemes'), 'desc' => __('Upload an optional custom background image for your introductory message.', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_bg', 'std' => '', 'type' => 'upload');
     if (is_woocommerce_activated()) {
         $options[] = array('name' => __('Featured Products', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Number of Featured Products', 'woothemes'), 'desc' => __('Select the number of featured products to display from your store.', 'woothemes'), 'id' => $shortname . '_homepage_number_of_products', 'std' => '5', 'type' => 'select2', 'options' => $woo_numbers);
         $options[] = array('name' => __('Featured Products Section Title', 'woothemes'), 'desc' => __('Enter the title of your Featured Products section.', 'woothemes'), 'id' => $shortname . '_homepage_shop_area_title', 'std' => __('Product Showcase', 'woothemes'), 'type' => 'text');
     }
     if (function_exists('woothemes_features')) {
         $options[] = array('name' => __('Features', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Number of Features', 'woothemes'), 'desc' => __('Select the number of features to display on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_number_of_features', 'std' => '3', 'type' => 'select2', 'options' => $woo_numbers);
         $options[] = array('name' => __('Title', 'woothemes'), 'desc' => __('Enter the title to display above the features on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_features_area_title', 'std' => __('Our Features', 'woothemes'), 'type' => 'text');
     }
     if (function_exists('woothemes_testimonials')) {
         $options[] = array('name' => __('Testimonials', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Number of Testimonials', 'woothemes'), 'desc' => __('Select the number of testimonials to display on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_number_of_testimonials', 'std' => '3', 'type' => 'select2', 'options' => $woo_numbers);
         $options[] = array('name' => __('Title', 'woothemes'), 'desc' => __('Enter the title to display above the testimonials on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_testimonials_area_title', 'std' => __('Testimonials', 'woothemes'), 'type' => 'text');
     }
     $options[] = array('name' => __('Blog Posts', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Number of Blog Posts', 'woothemes'), 'desc' => __('Select the number of posts to display.', 'woothemes'), 'id' => $shortname . '_homepage_number_of_posts', 'std' => '8', 'type' => 'select2', 'options' => $woo_numbers);
     $options[] = array('name' => __('Blog Section Title', 'woothemes'), 'desc' => __('Enter the title of your Blog Area section.', 'woothemes'), 'id' => $shortname . '_homepage_blog_area_title', 'std' => __('Latest Blog Posts', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Posts Category', 'woothemes'), 'desc' => __('Optionally select a category of posts to display if the content type is set to "Blog Posts".', 'woothemes'), 'id' => $shortname . '_homepage_posts_category', 'std' => '', 'type' => 'select2', 'options' => $woo_categories);
     $options[] = array('name' => __('Promotion', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Title Text', 'woothemes'), 'desc' => __('The title text of your promotion.', 'woothemes'), 'id' => $shortname . '_homepage_promotion_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Secondary Text', 'woothemes'), 'desc' => __('The secondary text of your promotion.', 'woothemes'), 'id' => $shortname . '_homepage_promotion_subtext', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Button Text', 'woothemes'), 'desc' => __('The text on the button of your promotion.', 'woothemes'), 'id' => $shortname . '_homepage_promotion_button_text', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Button URL', 'woothemes'), 'desc' => __('The URL to whic the button of your promotion redirects the visitor (leave empty to hide the button).', 'woothemes'), 'id' => $shortname . '_homepage_promotion_button_url', 'std' => '', 'type' => 'text');
     /* WooCommerce */
     if (is_woocommerce_activated()) {
         $options[] = array('name' => __('WooCommerce', 'woothemes'), 'type' => 'heading', 'icon' => 'woocommerce');
         $options[] = array('name' => __('General', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Custom Placeholder', 'woothemes'), 'desc' => __('Upload a custom placeholder to be displayed when there is no product image.', 'woothemes'), 'id' => $shortname . '_placeholder_url', 'std' => '', 'type' => 'upload');
         $options[] = array('name' => __('Header Cart Link', 'woothemes'), 'desc' => __('Display a link to the cart in the main navigation', 'woothemes'), 'id' => $shortname . 'commerce_header_cart_link', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Product Archives', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Shop archives full width?', 'woothemes'), 'desc' => __('Display the product archive in a full-width single column format? (The sidebar is removed).', 'woothemes'), 'id' => $shortname . 'commerce_archives_fullwidth', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Product columns', 'woothemes'), 'desc' => __('Select how many columns of products you want on product archive pages.', 'woothemes'), 'id' => $shortname . 'commerce_product_columns', 'std' => '3', 'type' => 'select2', 'options' => array('2', '3', '4', '5'));
         $options[] = array('name' => __('Products per page', 'woothemes'), 'desc' => __('How many products do you want to display on product archive pages?', 'woothemes'), 'id' => $shortname . 'commerce_products_per_page', 'std' => '12', 'type' => 'text');
         $options[] = array('name' => __('Product Details', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Display product tabs', 'woothemes'), 'desc' => __('Display the product review / attribute tabs in product details page', 'woothemes'), 'id' => $shortname . 'commerce_product_tabs', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Display related products', 'woothemes'), 'desc' => __('Display related products on the product details page', 'woothemes'), 'id' => $shortname . 'commerce_related_products', 'std' => 'true', 'type' => 'checkbox');
     }
     /* Dynamic Images */
     $options[] = array('name' => __('Dynamic Images', 'woothemes'), 'type' => 'heading', 'icon' => 'image');
     $options[] = array('name' => __('Resizer Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Dynamic Image Resizing', 'woothemes'), 'desc' => '', 'id' => $shortname . '_wpthumb_notice', 'std' => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', 'woothemes'), 'type' => 'info');
     $options[] = array('name' => __('WP Post Thumbnail', 'woothemes'), 'desc' => __('Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), 'id' => $shortname . '_post_image_support', 'std' => 'true', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Dynamic Image Resizing', 'woothemes'), 'desc' => __('The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), 'id' => $shortname . '_pis_resize', 'std' => 'true', 'class' => 'hidden', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Hard Crop', 'woothemes'), 'desc' => __('The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes'), 'id' => $shortname . '_pis_hard_crop', 'std' => 'true', 'class' => 'hidden last', 'type' => 'checkbox');
     $options[] = array('name' => __('TimThumb - Custom Settings Panel', 'woothemes'), 'desc' => sprintf(__('This will enable the %1$s (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. %2$s', 'woothemes'), '<a href="http://code.google.com/p/timthumb/">TimThumb</a>', '<a href="http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/">Need help?</a>'), 'id' => $shortname . '_resize', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Automatic Image Thumbnail', 'woothemes'), 'desc' => __('If no thumbnail is specifified then the first uploaded image in the post is used.', 'woothemes'), 'id' => $shortname . '_auto_img', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Thumbnail Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Thumbnail Image Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'type' => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnails with posts.', 'woothemes'), 'id' => $shortname . '_thumb_align', 'std' => 'alignleft', 'type' => 'select2', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Single Post - Show Thumbnail', 'woothemes'), 'desc' => __('Show the thumbnail in the single post page.', 'woothemes'), 'id' => $shortname . '_thumb_single', 'class' => 'collapsed', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Single Post - Thumbnail Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'class' => 'hidden last', 'type' => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Single Post - Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnail with single posts.', 'woothemes'), 'id' => $shortname . '_thumb_single_align', 'std' => 'alignright', 'type' => 'select2', 'class' => 'hidden', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Add thumbnail to RSS feed', 'woothemes'), 'desc' => __('Add the the image uploaded via your Custom Settings panel to your RSS feed', 'woothemes'), 'id' => $shortname . '_rss_thumb', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Enable Lightbox', 'woothemes'), 'desc' => __('Enable the PrettyPhoto lighbox script on images within your website\'s content.', 'woothemes'), 'id' => $shortname . '_enable_lightbox', 'std' => 'false', 'type' => 'checkbox');
     /* Footer */
     $options[] = array('name' => __('Footer Customization', 'woothemes'), 'type' => 'heading', 'icon' => 'footer');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Footer Widget Areas', 'woothemes'), 'desc' => __('Select how many footer widget areas you want to display.', 'woothemes'), 'id' => $shortname . '_footer_sidebars', 'std' => '4', 'type' => 'images', 'options' => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array('name' => __('Custom Affiliate Link', 'woothemes'), 'desc' => __('Add an affiliate link to the WooThemes logo in the footer of the theme.', 'woothemes'), 'id' => $shortname . '_footer_aff_link', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Custom Footer (Left)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_left', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Left)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_left_text', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Custom Footer (Right)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_right', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Right)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_right_text', 'std' => '', 'type' => 'textarea');
     /* Subscribe & Connect */
     $options[] = array('name' => __('Subscribe & Connect', 'woothemes'), 'type' => 'heading', 'icon' => 'connect');
     $options[] = array('name' => __('Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Subscribe & Connect - Single Post', 'woothemes'), 'desc' => sprintf(__('Enable the subscribe & connect area on single posts. You can also add this as a %1$s in your sidebar.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/widgets.php">widget</a>'), 'id' => $shortname . '_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Title', 'woothemes'), 'desc' => __('Enter the title to show in your subscribe & connect area.', 'woothemes'), 'id' => $shortname . '_connect_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Text', 'woothemes'), 'desc' => __('Change the default text in this area.', 'woothemes'), 'id' => $shortname . '_connect_content', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Related Posts', 'woothemes'), 'desc' => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), 'id' => $shortname . '_connect_related', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s for the e-mail subscription form.', 'woothemes'), '<a href="http://www.woothemes.com/tutorials/how-to-find-your-feedburner-id-for-email-subscription/">' . __('Feedburner ID', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_newsletter_id', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Subscribe By E-mail to MailChimp', 'woothemes', 'woothemes'), 'desc' => sprintf(__('If you have a MailChimp account you can enter the %1$s to allow your users to subscribe to a MailChimp List.', 'woothemes'), '<a href="http://woochimp.heroku.com" target="_blank">' . __('MailChimp List Subscribe URL', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_mailchimp_list_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Connect Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable RSS', 'woothemes'), 'desc' => __('Enable the subscribe and RSS icon.', 'woothemes'), 'id' => $shortname . '_connect_rss', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Twitter URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.twitter.com/woothemes', 'woothemes'), '<a href="http://www.twitter.com/">' . __('Twitter', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Facebook URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.facebook.com/woothemes', 'woothemes'), '<a href="http://www.facebook.com/">' . __('Facebook', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_facebook', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('YouTube URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.youtube.com/woothemes', 'woothemes'), '<a href="http://www.youtube.com/">' . __('YouTube', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_youtube', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Flickr URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.flickr.com/woothemes', 'woothemes'), '<a href="http://www.flickr.com/">' . __('Flickr', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_flickr', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('LinkedIn URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), '<a href="http://www.www.linkedin.com.com/">' . __('LinkedIn', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_linkedin', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Delicious URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.delicious.com/woothemes', 'woothemes'), '<a href="http://www.delicious.com/">' . __('Delicious', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_delicious', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Google+ URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), '<a href="http://plus.google.com/">' . __('Google+', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_googleplus', 'std' => '', 'type' => 'text');
     /* Contact Template Settings */
     $options[] = array('name' => __('Contact Page', 'woothemes'), 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => __('Contact Information', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Contact Information Panel', 'woothemes'), 'desc' => __('Enable the contact informal panel', 'woothemes'), 'id' => $shortname . '_contact_panel', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Location Name', 'woothemes'), 'desc' => __('Enter the location name. Example: London Office', 'woothemes'), 'id' => $shortname . '_contact_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Location Address', 'woothemes'), 'desc' => __("Enter your company's address", 'woothemes'), 'id' => $shortname . '_contact_address', 'std' => '', 'class' => 'hidden', 'type' => 'textarea');
     $options[] = array('name' => __('Telephone', 'woothemes'), 'desc' => __('Enter your telephone number', 'woothemes'), 'id' => $shortname . '_contact_number', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Fax', 'woothemes'), 'desc' => __('Enter your fax number', 'woothemes'), 'id' => $shortname . '_contact_fax', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array('name' => __('Contact Form E-Mail', 'woothemes'), 'desc' => __("Enter your E-mail address to use on the 'Contact Form' page Template.", 'woothemes'), 'id' => $shortname . '_contactform_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Your Twitter username', 'woothemes'), 'desc' => __('Enter your Twitter username. Example: woothemes', 'woothemes'), 'id' => $shortname . '_contact_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Subscribe and Connect', 'woothemes'), 'desc' => __('Enable the subscribe and connect functionality on the contact page template', 'woothemes'), 'id' => $shortname . '_contact_subscribe_and_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Maps', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Contact Form Google Maps Coordinates', 'woothemes'), 'desc' => sprintf(__('Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from %1$s', 'woothemes'), '<a href="http://www.getlatlon.com/" target="_blank">' . __('Google Maps', 'woothemes') . '</a>'), 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Disable Mousescroll', 'woothemes'), 'desc' => __('Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.', 'woothemes'), 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => __('Map Height', 'woothemes'), 'desc' => __('Height in pixels for the maps displayed on Single.php pages.', 'woothemes'), 'id' => $shortname . '_maps_single_height', 'std' => '250', 'type' => 'text');
     $options[] = array('name' => __('Default Map Zoom Level', 'woothemes'), 'desc' => __('Set this to adjust the default in the post & page edit backend.', 'woothemes'), 'id' => $shortname . '_maps_default_mapzoom', 'std' => '9', 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => __('Default Map Type', 'woothemes'), 'desc' => __('Set this to the default rendered in the post backend.', 'woothemes'), 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => __('Normal', 'woothemes'), 'G_SATELLITE_MAP' => __('Satellite', 'woothemes'), 'G_HYBRID_MAP' => __('Hybrid', 'woothemes'), 'G_PHYSICAL_MAP' => __('Terrain', 'woothemes')));
     $options[] = array('name' => __('Map Callout Text', 'woothemes'), 'desc' => __('Text or HTML that will be output when you click on the map marker for your location.', 'woothemes'), 'id' => $shortname . '_maps_callout_text', 'std' => '', 'type' => 'textarea');
     // Add extra options through function
     if (function_exists('woo_options_add')) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     global $post;
     $woo_metaboxes = array();
     // Shown on both posts and pages
     // Show only on specific post types or page
     if (get_post_type() == 'post' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array('name' => 'image', 'label' => __('Image', 'woothemes'), 'type' => 'upload', 'desc' => __('Upload an image or enter an URL.', 'woothemes'));
             $woo_metaboxes[] = array('name' => '_image_alignment', 'std' => __('Center', 'woothemes'), 'label' => __('Image Crop Alignment', 'woothemes'), 'type' => 'select2', 'desc' => __('Select crop alignment for resized image', 'woothemes'), 'options' => array('c' => 'Center', 't' => 'Top', 'b' => 'Bottom', 'l' => 'Left', 'r' => 'Right'));
             // TimThumb disabled in the options
         } else {
             $woo_metaboxes[] = array('name' => '_timthumb-info', 'label' => __('Image', 'woothemes'), 'type' => 'info', 'desc' => sprintf(__('%1$s is disabled. Use the %2$s panel in the sidebar instead, or enable TimThumb in the options panel.', 'woothemes'), '<strong>' . __('TimThumb', 'woothemes') . '</strong>', '<strong>' . __('Featured Image', 'woothemes') . '</strong>'));
         }
         $woo_metaboxes[] = array('name' => 'embed', 'std' => '', 'label' => __('Embed Code', 'woothemes'), 'type' => 'textarea', 'desc' => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End post
     $woo_metaboxes[] = array('name' => '_layout', 'std' => 'normal', 'label' => __('Layout', 'woothemes'), 'type' => 'images', 'desc' => __('Select the layout you want on this specific post/page.', 'woothemes'), 'options' => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array('name' => '_use_slide_background', 'label' => __('Slide Background', 'woothemes'), 'type' => 'checkbox', 'std' => 'false', 'desc' => '&nbsp;&nbsp;' . __('Use the "Featured Image" as a slide background instead of as the slide\'s media', 'woothemes'));
         $woo_metaboxes[] = array('name' => 'url', 'label' => __('Slide URL', 'woothemes'), 'type' => 'text', 'desc' => sprintf(__('Enter an URL to link the slider title to a page e.g. %s (optional)', 'woothemes'), 'http://yoursite.com/pagename/'));
         $woo_metaboxes[] = array('name' => 'embed', 'std' => '', 'label' => __('Embed Code', 'woothemes'), 'type' => 'textarea', 'desc' => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End Slide
     // Add extra metaboxes through function
     if (function_exists('woo_metaboxes_add')) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "Kaboodle";
     $themeslug = "kaboodle";
     // STANDARD VARIABLES
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     $shortname = "woo";
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     // General
     $options[] = array("name" => "General Settings", "type" => "heading", "icon" => "general");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable text-based Site Title and Tagline. Setup title & tagline in <a href='" . home_url() . "/wp-admin/options-general.php'>General Settings</a>.", "id" => $shortname . "_texttitle", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Site Title", "desc" => "Change the site title typography.", "id" => $shortname . "_font_site_title", "std" => array('size' => '30', 'unit' => 'px', 'face' => 'Droid Serif', 'style' => 'bold', 'color' => '#333333'), "class" => "hidden", "type" => "typography");
     $options[] = array("name" => "Site Description", "desc" => "Enable the site description/tagline under site title.", "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Site Description", "desc" => "Enable the site description/tagline under site title.", "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Site Description", "desc" => "Change the site description typography.", "id" => $shortname . "_font_tagline", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Droid Sans', 'style' => '', 'color' => '#999999'), "class" => "hidden last", "type" => "typography");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => "Show Subscribe Link", "desc" => "Show the Subscribe to RSS link in right navigation.", "id" => $shortname . "_nav_rss", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "E-Mail Subscription URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting 'Contact Form' as page template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Post Author Box", "desc" => "This will enable the post author box on the single posts page. Edit description in <a href='" . home_url() . "/wp-admin/profile.php'>Profile</a>.", "id" => $shortname . "_post_author", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Display Breadcrumbs", "desc" => "Display dynamic breadcrumbs on each page of your website.", "id" => $shortname . "_breadcrumbs_show", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Pagination Style", "desc" => "Select the style of pagination you would like to use on the blog.", "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => "Numbers", "simple" => "Next/Previous"));
     // Styling
     $options[] = array("name" => "Styling Options", "type" => "heading", "icon" => "styling");
     $options[] = array("name" => "Body Background Color", "desc" => "Pick a custom color for background color of the theme e.g. #697e09", "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Body background image", "desc" => "Upload an image for the theme's background", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background image repeat", "desc" => "Select how you would like to repeat the background-image", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => "Background image position", "desc" => "Select how you would like to position the background", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Button Color", "desc" => "Pick a custom color for buttons or add a hex color code e.g. #697e09", "id" => "woo_button_color", "std" => "", "type" => "color");
     /* Typography */
     $options[] = array("name" => "Typography", "type" => "heading", "icon" => "typography");
     $options[] = array("name" => "Enable Custom Typography", "desc" => "Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.", "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "General Typography", "desc" => "Change the general font.", "id" => $shortname . "_font_body", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Navigation", "desc" => "Change the navigation font.", "id" => $shortname . "_font_nav", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Post Title", "desc" => "Change the post title.", "id" => $shortname . "_font_post_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Arial', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => "Post Meta", "desc" => "Change the post meta.", "id" => $shortname . "_font_post_meta", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => "Post Entry", "desc" => "Change the post entry.", "id" => $shortname . "_font_post_entry", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Widget Titles", "desc" => "Change the widget titles.", "id" => $shortname . "_font_widget_titles", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'Arial', 'style' => 'bold', 'color' => '#555555'), "type" => "typography");
     /* Slider */
     $options[] = array("name" => "Homepage Slider", "icon" => "slider", "type" => "heading");
     $options[] = array("name" => "Enable Slider", "desc" => "Enable the slider on the homepage.", "id" => $shortname . "_slider", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Slider Entries", "desc" => "Select the number of entries that should appear in the home page slider.", "id" => $shortname . "_slider_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Effect", "desc" => "Select the animation effect. ", "id" => $shortname . "_slider_effect", "type" => "select2", "options" => array("slide" => "Slide", "fade" => "Fade"));
     $options[] = array("name" => "Hover Pause", "desc" => "Hovering over slideshow will pause it", "id" => $shortname . "_slider_hover", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Randomize", "desc" => "Select to randomize slides.", "id" => $shortname . "_slider_random", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Animation Speed", "desc" => "The time in <b>miliseconds</b> the animation between frames will take.", "id" => $shortname . "_slider_speed", "std" => "500", "type" => "text");
     $options[] = array("name" => "Auto Start", "desc" => "Set the slider to start sliding automatically.", "id" => $shortname . "_slider_auto", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Auto Height', 'woothemes'), "desc" => __('Set the slider to adjust automatically depending on the height of the current slide contents.', 'woothemes'), "id" => $shortname . "_slider_autoheight", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Auto Slide Interval", "desc" => "The time in <b>milliseconds</b> each slide pauses for, before sliding to the next.", "id" => $shortname . "_slider_interval", "std" => "6000", "type" => "text");
     $options[] = array("name" => "Featured Slider Title", "desc" => "Show the post title in slider.", "id" => $shortname . "_slider_title", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Featured Slider Content", "desc" => "Show the post content in slider.", "id" => $shortname . "_slider_content", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Next/Previous", "desc" => "Select to display next/previous buttons.", "id" => $shortname . "_slider_nextprev", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Pagination", "desc" => "Select to display pagination.", "id" => $shortname . "_slider_pagination", "std" => "true", "type" => "checkbox");
     /* Homepage Layout */
     $options[] = array("name" => "Homepage Layout", "icon" => "homepage", "type" => "heading");
     /* Homepage Portfolio */
     $options[] = array("name" => "Enable Portfolio", "desc" => "Enable the portfolio section below the about section. Add portfolio posts using the 'Portfolio' custom post type.", "id" => $shortname . "_portfolio", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Portfolio Entries", "desc" => "Select the number of entries that should appear in the homepage portfolio slider.", "id" => $shortname . "_portfolio_entries", "std" => "5", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Animation Speed", "desc" => "The time in <strong>miliseconds</strong> the animation between frames will take.", "id" => $shortname . "_portfolio_speed", "std" => "500", "type" => "text");
     $options[] = array("name" => "Auto Start", "desc" => "Set the portfolio to start sliding automatically.", "id" => $shortname . "_portfolio_auto", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Auto Slide Interval", "desc" => "The time in <strong>milliseconds</strong> each portfolio item pauses for, before sliding to the next.", "id" => $shortname . "_portfolio_interval", "std" => "6000", "type" => "text");
     $options[] = array("name" => "Portfolio items link to&hellip;", "desc" => "Select whether the portfolio items link to the portfolio image (in a lightbox) or to the portfolio item's detail page.", "id" => $shortname . "_portfolio_link", "type" => "select2", "std" => "image", "options" => array("image" => "Image", "page" => "Page"));
     $options[] = array("name" => "Mini-Features Area", "desc" => "Enable the front page Mini-Features features area.", "id" => $shortname . "_mini_features", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Homepage content #1", "desc" => "(Optional) Select a page that you'd like to display on the front page <strong>above the mini features area</strong>.", "id" => $shortname . "_main_page1", "std" => "Select a page:", "type" => "select", "options" => $woo_pages);
     $options[] = array("name" => "Homepage content #2", "desc" => "(Optional) Select a page that you'd like to display on the front page <strong>below the mini features area.</strong>", "id" => $shortname . "_main_page2", "std" => "Select a page:", "type" => "select", "options" => $woo_pages);
     $options[] = array("name" => "Enable latest blog posts", "desc" => "Enable the latest blog posts on the homepage.", "id" => $shortname . "_latest", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Number of blog entries", "desc" => "Select the number of entries that should appear in the blog posts area.<br /><strong>Note:</strong> If pagination is enabled, this options is overridden.", "id" => $shortname . "_latest_entries", "std" => "3", "type" => "select", "class" => "hidden last", "options" => $other_entries);
     $options[] = array("name" => "Enable pagination on latest blog posts", "desc" => "Enable pagination on latest blog posts on the homepage.", "id" => $shortname . "_latest_pagination", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Number of blog entries per page", "desc" => "Select the number of entries that should appear per page in the blog posts area.", "id" => $shortname . "_latest_entries_per_page", "std" => "3", "type" => "select", "class" => "hidden last", "options" => $other_entries);
     $options[] = array("name" => "Homepage Fullwidth", "desc" => "Show full-width instead of sidebar", "id" => $shortname . "_home_sidebar", "std" => "false", "type" => "checkbox");
     /* Layout */
     $options[] = array("name" => "Layout Options", "type" => "heading", "icon" => "layout");
     $url = get_bloginfo('template_url') . '/functions/images/';
     $options[] = array("name" => "Main Layout", "desc" => "Select which layout you want for your site.", "id" => $shortname . "_site_layout", "std" => "layout-left-content", "type" => "images", "options" => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array("name" => "Blog Title", "desc" => "Edit the title of the <strong>Blog page template</strong>. Setup your blog by adding a page using the <em>Blog</em> page template.", "id" => $shortname . "_blog_title", "std" => "", "type" => "text");
     $options[] = array("name" => "Blog Description", "desc" => "Add a description to appear beside the Blog Title.", "id" => $shortname . "_blog_description", "std" => "", "type" => "text");
     /* Portfolio */
     $options[] = array("name" => "Portfolio", "icon" => "portfolio", "type" => "heading");
     $options[] = array("name" => "Portfolio Title", "desc" => "Edit the title of the Portfolio section", "id" => $shortname . "_portfolio_title", "std" => "", "type" => "text");
     $options[] = array("name" => "Portfolio Description", "desc" => "Add a description to appear beside the Portfolio Title.", "id" => $shortname . "_portfolio_description", "std" => "", "type" => "text");
     $options[] = array("name" => "Portfolio Tags", "desc" => "Enter comma seperated tags for portfolio sorting (e.g. web, print, icons). You must add these tags to the portfolio items you want to sort.", "id" => $shortname . "_portfolio_tags", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom permalink", "desc" => "This option allows you to change the permalink on the individual portfolio pages. (e.g /portfolio-items/pagename to /artwork/pagename/). Please update <a href='" . admin_url('options-permalink.php') . "'>Permalinks</a> after any changes.", "id" => $shortname . "_portfolioitems_rewrite", "std" => "portfolio-items", "type" => "text");
     $options[] = array("name" => "Enable Single Portfolio Gallery", "desc" => "Enable the gallery feature in the single portfolio page layout.", "id" => $shortname . "_portfolio_gallery", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Animation Speed", "desc" => "The time in <b>miliseconds</b> the animation between frames will take.", "id" => $shortname . "_single_speed", "std" => "500", "type" => "text");
     $options[] = array("name" => "Auto Start", "desc" => "Set the slider to start sliding automatically.", "id" => $shortname . "_single_auto", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Auto Slide Interval", "desc" => "The time in <b>milliseconds</b> each slide pauses for, before sliding to the next.", "id" => $shortname . "_single_interval", "std" => "6000", "type" => "text");
     /* Dynamic Images */
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => "Calendar As Thumb", "desc" => "This will enable a calendar icon instead a post image thumb", "id" => $shortname . "_post_calendar", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail", "desc" => "Use WordPress post thumbnail to assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Dynamically Resize", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Hard Crop", "desc" => "The image will be cropped to match the target aspect ratio.", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "Enable Dynamic Image Resizer", "desc" => "This will enable the thumb.php script which dynamically resizes images added through post custom field.", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbs", "desc" => "If no image is specified in the 'image' custom field or WP post thumbnail then the first uploaded post image is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => 'Height')));
     $options[] = array("name" => "Thumbnail Image alignment", "desc" => "Select how to align your thumbnails with posts.", "id" => $shortname . "_thumb_align", "std" => "alignleft", "type" => "radio", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Show thumbnail in Single Posts", "desc" => "Show the attached image in the single post page.", "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Single Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the image size. Max width is 576.", "id" => $shortname . "_image_dimensions", "std" => "", "class" => "hidden last", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 570, 'meta' => 'Width'), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 170, 'meta' => 'Height')));
     $options[] = array("name" => "Single Post Image alignment", "desc" => "Select how to align your thumbnail with single posts.", "id" => $shortname . "_thumb_single_align", "std" => "aligncenter", "type" => "radio", "class" => "hidden", "options" => array("alignleft" => "Left", "alignright" => "Right", "aligncenter" => "Center"));
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     /* Footer */
     $options[] = array("name" => "Footer Customization", "type" => "heading", "icon" => "footer");
     $url = get_bloginfo('template_url') . '/functions/images/';
     $options[] = array("name" => "Footer Widget Areas", "desc" => "Select how many footer widget areas you want to display.", "id" => $shortname . "_footer_sidebars", "std" => "4", "type" => "images", "options" => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $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");
     /* Subscribe & Connect */
     $options[] = array("name" => "Subscribe & Connect", "type" => "heading", "icon" => "connect");
     $options[] = array("name" => "Enable Subscribe & Connect - Single Post", "desc" => "Enable the subscribe & connect area on single posts. You can also add this as a <a href='" . home_url() . "/wp-admin/widgets.php'>widget</a> in your sidebar.", "id" => $shortname . "_connect", "std" => 'false', "type" => "checkbox");
     $options[] = array("name" => "Subscribe Title", "desc" => "Enter the title to show in your subscribe & connect area.", "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => "Text", "desc" => "Change the default text in this area.", "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => "Subscribe By E-mail ID (Feedburner)", "desc" => "Enter your <a href='http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78982'>Feedburner ID</a> for the e-mail subscription form.", "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable RSS", "desc" => "Enable the subscribe and RSS icon.", "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => "Twitter URL", "desc" => "Enter your  <a href='http://www.twitter.com/'>Twitter</a> URL e.g. http://www.twitter.com/woothemes", "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => "Facebook URL", "desc" => "Enter your  <a href='http://www.facebook.com/'>Facebook</a> URL e.g. http://www.facebook.com/woothemes", "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => "YouTube URL", "desc" => "Enter your  <a href='http://www.youtube.com/'>YouTube</a> URL e.g. http://www.youtube.com/woothemes", "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => "Flickr URL", "desc" => "Enter your  <a href='http://www.flickr.com/'>Flickr</a> URL e.g. http://www.flickr.com/woothemes", "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => "LinkedIn URL", "desc" => "Enter your  <a href='http://www.www.linkedin.com.com/'>LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes", "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => "Delicious URL", "desc" => "Enter your <a href='http://www.delicious.com/'>Delicious</a> URL e.g. http://www.delicious.com/woothemes", "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => "Enable Related Posts", "desc" => "Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.", "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     $woo_metaboxes = array();
     global $post;
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload an image or enter an URL.");
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "Center", "label" => "Image Crop Alignment", "type" => "select2", "desc" => "Select crop alignment for resized image", "options" => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar)");
     }
     // End post
     if (get_post_type() == 'page' || get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "_layout", "std" => "normal", "label" => "Layout", "type" => "images", "desc" => "Select the layout you want on this specific post/page.", "options" => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_bloginfo('template_url') . '/functions/images/' . '1c.png', 'layout-left-content' => get_bloginfo('template_url') . '/functions/images/' . '2cl.png', 'layout-right-content' => get_bloginfo('template_url') . '/functions/images/' . '2cr.png'));
     }
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Slide Image", "type" => "upload", "desc" => "Upload an image or enter an URL to your slide image");
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Video Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.");
         $woo_metaboxes[] = array("name" => "url", "label" => "URL", "type" => "text", "desc" => "Enter URL if you want to add a link to the uploaded image and title. (optional) ");
     }
     //End slide
     if (get_post_type() == 'infobox' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "mini", "label" => "Mini-features Icon", "type" => "upload", "desc" => "Upload icon for use with the Mini-Feature on the homepage (optimal size: 32x32px) (optional)");
         $woo_metaboxes[] = array("name" => "mini_excerpt", "label" => "Mini-features Excerpt", "type" => "textarea", "desc" => "Enter the text to show in your Mini-Feature. ");
         $woo_metaboxes[] = array("name" => "mini_readmore", "std" => "", "label" => "Mini-features URL", "type" => "text", "desc" => "Add an URL for your Read More button in your Mini-Feature on homepage (optional)");
     }
     // End mini
     if (get_post_type() == 'feedback' || !get_post_type()) {
         $woo_metaboxes['feedback_author'] = array("name" => "feedback_author", "label" => "Feedback Author", "type" => "text", "desc" => "Enter the name of the author of the feedback e.g. Joe Bloggs");
         $woo_metaboxes['feedback_url'] = array("name" => "feedback_url", "label" => "Feedback URL", "type" => "text", "desc" => "(optional) Enter the URL to the feedback author e.g. http://www.woothemes.com");
     }
     // End feedback
     if (get_post_type() == 'portfolio' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "portfolio-image", "label" => "Portfolio Image", "type" => "upload", "desc" => "Upload an image or enter an URL to your portfolio image");
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Video Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.");
         $woo_metaboxes[] = array("name" => "embed-url", "label" => "Video URL", "type" => "text", "desc" => "Enter a URL to your video (for use in the lightbox on the homepage).");
         $woo_metaboxes['testimonial'] = array("name" => "testimonial", "label" => "Testimonial", "type" => "textarea", "desc" => "Enter a testimonial from your client to be displayed on the single portfolio page");
         $woo_metaboxes['testimonial_author'] = array("name" => "testimonial_author", "label" => "Testimonial Author", "type" => "text", "desc" => "Enter the name of the author of the testimonial e.g. Joe Bloggs");
         $woo_metaboxes[] = array("name" => "url", "label" => "URL", "type" => "text", "desc" => "Enter URL of your clients site. (optional) ");
     }
     //End portfolio
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
 function woo_options()
 {
     // VARIABLES
     $themename = "Bueno";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/bueno/';
     $shortname = "woo";
     $GLOBALS['template_path'] = get_bloginfo('template_directory');
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //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 = TEMPLATEPATH . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     $options[] = array("name" => "General Settings", "icon" => "general", "type" => "heading");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable if you want Blog Title and Tagline to be text-based. Setup title/tagline in WP -> Settings -> General.", "id" => $shortname . "_texttitle", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feedburner_url", "std" => "", "type" => "text");
     $options[] = array("name" => "E-Mail URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_feedburner_id", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Dynamic Images", "icon" => "image", "type" => "heading");
     $options[] = array("name" => 'Dynamic Image Resizing', "desc" => "", "id" => $shortname . "_wpthumb_notice", "std" => 'There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', "type" => "info");
     $options[] = array("name" => "WP Post Thumbnail", "desc" => "Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Dynamic Image Resizing", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "WP Post Thumbnail - Hard Crop", "desc" => "The post thumbnail will be cropped to match the target aspect ratio (only used if 'Dynamic Image Resizing' is enabled).", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "TimThumb - Custom Settings Panel", "desc" => "This will enable the <a href='http://code.google.com/p/timthumb/'>TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. <a href='http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/'>Need help?</a>", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Automatic Image Thumbnail", "desc" => "If no thumbnail is specifified then the first uploaded image in the post is used.", "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_get_image_width', 'type' => 'text', 'std' => 200, 'meta' => 'Width'), array('id' => $shortname . '_get_image_height', 'type' => 'text', 'std' => 500, 'meta' => 'Height')));
     $options[] = array("name" => "Add thumbnail to RSS feed", "desc" => "Add the the image uploaded via your Custom Settings to your RSS feed", "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     //Advertising
     $options[] = array("name" => "Sidebar Ad (300x250px)", "icon" => "ads", "type" => "heading");
     $options[] = array("name" => "Adsense code", "desc" => "Enter your adsense code (or other ad network code) here.", "id" => $shortname . "_ad_300_adsense", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_300_image", "std" => "http://www.woothemes.com/ads/300x250b.jpg", "type" => "upload");
     $options[] = array("name" => "Destination URL", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_300_url", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Sidebar Ads (125x125)", "icon" => "ads", "type" => "heading");
     $options[] = array("name" => "Rotate banners?", "desc" => "Check this to randomly rotate the banner ads.", "id" => $shortname . "_ads_rotate", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Banner Ad #1 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_1", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #1 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_1", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Banner Ad #2 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_2", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #2 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_2", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Banner Ad #3 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_3", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #3 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_3", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Banner Ad #4 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_4", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #4 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_4", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Banner Ad #5 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_5", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #5 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_5", "std" => "http://www.woothemes.com", "type" => "text");
     $options[] = array("name" => "Banner Ad #6 - Image Location", "desc" => "Enter the URL for this banner ad.", "id" => $shortname . "_ad_image_6", "std" => "http://www.woothemes.com/ads/125x125b.jpg", "type" => "text");
     $options[] = array("name" => "Banner Ad #6 - Destination", "desc" => "Enter the URL where this banner ad points to.", "id" => $shortname . "_ad_url_6", "std" => "http://www.woothemes.com", "type" => "text");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     $woo_metaboxes = array("image" => array("name" => "image", "default" => "", "label" => "Image", "type" => "upload", "desc" => "Enter the URL for image to be used by the Dynamic Image resizer."));
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
     /*
     function woo_update_options(){
             $options = get_option('woo_template',$options);  
             foreach ($options as $option){
                 update_option($option['id'],$option['std']);
             }   
     }
     
     function woo_add_options(){
             $options = get_option('woo_template',$options);  
             foreach ($options as $option){
                 update_option($option['id'],$option['std']);
             }   
     }
     
     
     //add_action('switch_theme', 'woo_update_options'); 
     if(get_option('template') == 'wooframework'){       
         woo_add_options();
     } // end function 
     */
 }
示例#10
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = 'Mystile';
     $themeslug = 'mystile';
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = 'woo';
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, 'Select a category:');
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, 'Select a page:');
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $other_entries = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19');
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     /* General */
     $options[] = array('name' => __('General Settings', 'woothemes'), 'type' => 'heading', 'icon' => 'general');
     $options[] = array('name' => __('Quick Start', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Theme Stylesheet', 'woothemes'), 'desc' => __('Select your themes alternative color scheme.', 'woothemes'), 'id' => $shortname . '_alt_stylesheet', 'std' => 'default.css', 'type' => 'select', 'options' => $alt_stylesheets);
     $options[] = array('name' => __('Custom Logo', 'woothemes'), 'desc' => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), 'id' => $shortname . '_logo', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Text Title', 'woothemes'), 'desc' => sprintf(__('Enable text-based Site Title and Tagline. Setup title & tagline in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/options-general.php">' . __('General Settings', 'woothemes') . '</a>'), 'id' => $shortname . '_texttitle', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Description', 'woothemes'), 'desc' => __('Enable the site description/tagline under site title.', 'woothemes'), 'id' => $shortname . '_tagline', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Favicon', 'woothemes'), 'desc' => sprintf(__('Upload a 16px x 16px %1$s that will represent your website\'s favicon.', 'woothemes'), '<a href="http://www.faviconr.com/">' . __('ico image', 'woothemes') . '</a>'), 'id' => $shortname . '_custom_favicon', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Tracking Code', 'woothemes'), 'desc' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), 'id' => $shortname . '_google_analytics', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Subscription Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('RSS URL', 'woothemes'), 'desc' => __('Enter your preferred RSS URL. (Feedburner or other)', 'woothemes'), 'id' => $shortname . '_feed_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('E-Mail Subscription URL', 'woothemes'), 'desc' => __('Enter your preferred E-mail subscription URL. (Feedburner or other)', 'woothemes'), 'id' => $shortname . '_subscribe_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Display Options', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Custom CSS', 'woothemes'), 'desc' => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), 'id' => $shortname . '_custom_css', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Post/Page Comments', 'woothemes'), 'desc' => __('Select if you want to enable/disable comments on posts and/or pages.', 'woothemes'), 'id' => $shortname . '_comments', 'std' => 'both', 'type' => 'select2', 'options' => array('post' => __('Posts Only', 'woothemes'), 'page' => __('Pages Only', 'woothemes'), 'both' => __('Pages / Posts', 'woothemes'), 'none' => __('None', 'woothemes')));
     $options[] = array('name' => __('Post Content', 'woothemes'), 'desc' => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), 'id' => $shortname . '_post_content', 'type' => 'select2', 'options' => array('excerpt' => __('The Excerpt', 'woothemes'), 'content' => __('Full Content', 'woothemes')));
     $options[] = array('name' => __('Display Breadcrumbs', 'woothemes'), 'desc' => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), 'id' => $shortname . '_breadcrumbs_show', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Pagination', 'woothemes'), 'desc' => __('Display pagination on the blog.', 'woothemes'), 'id' => $shortname . '_pagenav_show', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pagination Style', 'woothemes'), 'desc' => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), 'id' => $shortname . '_pagination_type', 'type' => 'select2', 'options' => array('paginated_links' => __('Numbers', 'woothemes'), 'simple' => __('Next/Previous', 'woothemes')));
     /* Styling */
     $options[] = array('name' => __('Styling Options', 'woothemes'), 'type' => 'heading', 'icon' => 'styling');
     $options[] = array('name' => __('Background', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Body Background Color', 'woothemes'), 'desc' => __('Pick a custom color for background color of the theme e.g. #697e09. Only applied when using a boxed layout (see Layout Options).', 'woothemes'), 'id' => $shortname . '_body_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Body background image', 'woothemes'), 'desc' => __('Upload an image for the theme\'s background', 'woothemes'), 'id' => $shortname . '_body_img', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Background image repeat', 'woothemes'), 'desc' => __('Select how you would like to repeat the background-image', 'woothemes'), 'id' => $shortname . '_body_repeat', 'std' => 'no-repeat', 'type' => 'select', 'options' => array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'));
     $options[] = array('name' => __('Background image position', 'woothemes'), 'desc' => __('Select how you would like to position the background', 'woothemes'), 'id' => $shortname . '_body_pos', 'std' => 'top', 'type' => 'select', 'options' => array('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right'));
     $options[] = array('name' => __('Background Attachment', 'woothemes'), 'desc' => __('Select whether the background should be fixed or move when the user scrolls', 'woothemes'), 'id' => $shortname . '_body_attachment', 'std' => 'scroll', 'type' => 'select', 'options' => array('scroll', 'fixed'));
     $options[] = array('name' => __('Links', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Link Color', 'woothemes'), 'desc' => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Link Hover Color', 'woothemes'), 'desc' => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_hover_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Button Color', 'woothemes'), 'desc' => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_button_color', 'std' => '', 'type' => 'color');
     /* Typography */
     $options[] = array('name' => __('Typography', 'woothemes'), 'type' => 'heading', 'icon' => 'typography');
     $options[] = array('name' => __('Enable Custom Typography', 'woothemes'), 'desc' => __('Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes'), 'id' => $shortname . '_typography', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('General Typography', 'woothemes'), 'desc' => __('Change the general font.', 'woothemes'), 'id' => $shortname . '_font_body', 'std' => array('size' => '1.5', 'unit' => 'em', 'face' => 'FontSiteSans-Roman', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Navigation', 'woothemes'), 'desc' => __('Change the navigation font.', 'woothemes'), 'id' => $shortname . '_font_nav', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Page Title', 'woothemes'), 'desc' => __('Change the page title.', 'woothemes'), 'id' => $shortname . '_font_page_title', 'std' => array('size' => '1.4', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Title', 'woothemes'), 'desc' => __('Change the post title.', 'woothemes'), 'id' => $shortname . '_font_post_title', 'std' => array('size' => '2.2', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Meta', 'woothemes'), 'desc' => __('Change the post meta.', 'woothemes'), 'id' => $shortname . '_font_post_meta', 'std' => array('size' => '0.9', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Entry', 'woothemes'), 'desc' => __('Change the post entry.', 'woothemes'), 'id' => $shortname . '_font_post_entry', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Widget Titles', 'woothemes'), 'desc' => __('Change the widget titles.', 'woothemes'), 'id' => $shortname . '_font_widget_titles', 'std' => array('size' => '1.2', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     /* Layout */
     $options[] = array('name' => __('Layout Options', 'woothemes'), 'type' => 'heading', 'icon' => 'layout');
     $options[] = array('name' => __('Enable boxed layout', 'woothemes'), 'desc' => __('Wrap your site content inside a frame.', 'woothemes'), 'id' => $shortname . '_boxed_layout', 'std' => 'false', 'type' => 'checkbox');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Main Layout', 'woothemes'), 'desc' => __('Select which layout you want for your site.', 'woothemes'), 'id' => $shortname . '_site_layout', 'std' => 'layout-right-content', 'type' => 'images', 'options' => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array('name' => __('Category Exclude - Homepage', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your homepage (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_home', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Category Exclude - Blog Page Template', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your \'Blog\' page template (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_blog', 'std' => '', 'type' => 'text');
     /* Homepage */
     $options[] = array('name' => __('Homepage', 'woothemes'), 'type' => 'heading', 'icon' => 'homepage');
     $options[] = array('name' => __('Featured Image', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Display a banner', 'woothemes'), 'desc' => __('Display a banner on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_banner', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Featured Image', 'woothemes'), 'desc' => __('Upload a graphic to appear as a banner on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_banner_path', 'std' => '', 'class' => 'hidden', 'type' => 'upload');
     $options[] = array('name' => __('Banner headline', 'woothemes'), 'desc' => __('The headline which will overlay your banner.', 'woothemes'), 'id' => $shortname . '_homepage_banner_headline', 'std' => 'Welcome to our store', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Banner stand first', 'woothemes'), 'desc' => __('The copy which overlays the banner beneath the headline.', 'woothemes'), 'id' => $shortname . '_homepage_banner_standfirst', 'std' => 'We hand make the most awesomest products in the world', 'class' => 'hidden', 'type' => 'textarea');
     $options[] = array('name' => __('Banner text colour', 'woothemes'), 'desc' => __('Pick a custom color for the text overlayed on the banner', 'woothemes'), 'id' => $shortname . '_homepage_banner_text_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Sidebar', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Display a sidebar', 'woothemes'), 'desc' => __('Display a sidebar on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_sidebar', 'std' => 'false', 'type' => 'checkbox');
     if (class_exists('woocommerce')) {
         $options[] = array('name' => __('WooCommerce', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Display product categories', 'woothemes'), 'desc' => __('Display product categories on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_product_categories', 'std' => 'false', 'type' => 'checkbox');
         $options[] = array('name' => __('Display featured products', 'woothemes'), 'desc' => __('Display features products on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_featured_products', 'std' => 'false', 'type' => 'checkbox');
         $options[] = array('name' => __('Display how many featured products?', 'woothemes'), 'desc' => __('Specify how many featured products should appear on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_featured_products_perpage', 'std' => '8', 'type' => 'select2', 'options' => $other_entries);
         $options[] = array('name' => __('Display recent products', 'woothemes'), 'desc' => __('Display recent products on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_products', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Display how many recent products?', 'woothemes'), 'desc' => __('Specify how many recent products should appear on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_products_perpage', 'std' => '8', 'type' => 'select2', 'options' => $other_entries);
     }
     $options[] = array('name' => __('Blog', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Display latest blog posts', 'woothemes'), 'desc' => __('Display latest posts on the homepage?', 'woothemes'), 'id' => $shortname . '_homepage_blog', 'std' => 'true', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Display how many posts?', 'woothemes'), 'desc' => __('Specify how many posts should appear on the homepage.', 'woothemes'), 'id' => $shortname . '_homepage_blog_perpage', 'std' => '3', 'type' => 'select2', 'class' => 'hidden', 'options' => $other_entries);
     /* WooCommerce */
     if (class_exists('woocommerce')) {
         $options[] = array('name' => __('WooCommerce', 'woothemes'), 'type' => 'heading', 'icon' => 'woocommerce');
         $options[] = array('name' => __('Products', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Products per page', 'woothemes'), 'desc' => __('How many products do you want to display on product archive pages?', 'woothemes'), 'id' => $shortname . 'commerce_products_per_page', 'std' => '12', 'type' => 'text');
         $options[] = array('name' => __('Display product tabs', 'woothemes'), 'desc' => __('Display the product review / attribute tabs in product details page', 'woothemes'), 'id' => $shortname . 'commerce_product_tabs', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Display related products', 'woothemes'), 'desc' => __('Display related products on the product details page', 'woothemes'), 'id' => $shortname . 'commerce_related_products', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Layout', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Display the sidebar on shop archives?', 'woothemes'), 'desc' => __('Global setting to show / hide the sidebar on product archive pages', 'woothemes'), 'id' => $shortname . 'commerce_archives_fullwidth', 'std' => 'false', 'type' => 'checkbox');
         $options[] = array('name' => __('Display the sidebar on product pages?', 'woothemes'), 'desc' => __('Global setting to show / hide the sidebar on <em>all</em> product pages'), 'id' => $shortname . 'commerce_products_fullwidth', 'std' => 'false', 'type' => 'checkbox');
     }
     /* Dynamic Images */
     $options[] = array('name' => __('Dynamic Images', 'woothemes'), 'type' => 'heading', 'icon' => 'image');
     $options[] = array('name' => __('Resizer Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Dynamic Image Resizing', 'woothemes'), 'desc' => '', 'id' => $shortname . '_wpthumb_notice', 'std' => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', 'woothemes'), 'type' => 'info');
     $options[] = array('name' => __('WP Post Thumbnail', 'woothemes'), 'desc' => __('Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), 'id' => $shortname . '_post_image_support', 'std' => 'true', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Dynamic Image Resizing', 'woothemes'), 'desc' => __('The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), 'id' => $shortname . '_pis_resize', 'std' => 'true', 'class' => 'hidden', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Hard Crop', 'woothemes'), 'desc' => __('The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes'), 'id' => $shortname . '_pis_hard_crop', 'std' => 'true', 'class' => 'hidden last', 'type' => 'checkbox');
     $options[] = array('name' => __('TimThumb - Custom Settings Panel', 'woothemes'), 'desc' => sprintf(__('This will enable the %1$s (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. %2$s', 'woothemes'), '<a href="http://code.google.com/p/timthumb/">TimThumb</a>', '<a href="http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/">Need help?</a>'), 'id' => $shortname . '_resize', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Automatic Image Thumbnail', 'woothemes'), 'desc' => __('If no thumbnail is specifified then the first uploaded image in the post is used.', 'woothemes'), 'id' => $shortname . '_auto_img', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Thumbnail Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Thumbnail Image Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'type' => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 787, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 300, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnails with posts.', 'woothemes'), 'id' => $shortname . '_thumb_align', 'std' => 'alignleft', 'type' => 'select2', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Single Post - Show Thumbnail', 'woothemes'), 'desc' => __('Show the thumbnail in the single post page.', 'woothemes'), 'id' => $shortname . '_thumb_single', 'class' => 'collapsed', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Single Post - Thumbnail Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'class' => 'hidden last', 'type' => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 787, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 300, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Single Post - Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnail with single posts.', 'woothemes'), 'id' => $shortname . '_thumb_single_align', 'std' => 'alignright', 'type' => 'select2', 'class' => 'hidden', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Add thumbnail to RSS feed', 'woothemes'), 'desc' => __('Add the the image uploaded via your Custom Settings panel to your RSS feed', 'woothemes'), 'id' => $shortname . '_rss_thumb', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Enable Lightbox', 'woothemes'), 'desc' => __('Enable the PrettyPhoto lighbox script on images within your website\'s content.', 'woothemes'), 'id' => $shortname . '_enable_lightbox', 'std' => 'false', 'type' => 'checkbox');
     /* Footer */
     $options[] = array('name' => __('Footer Customization', 'woothemes'), 'type' => 'heading', 'icon' => 'footer');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Footer Widget Areas', 'woothemes'), 'desc' => __('Select how many footer widget areas you want to display.', 'woothemes'), 'id' => $shortname . '_footer_sidebars', 'std' => '4', 'type' => 'images', 'options' => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array('name' => __('Custom Affiliate Link', 'woothemes'), 'desc' => __('Add an affiliate link to the WooThemes logo in the footer of the theme.', 'woothemes'), 'id' => $shortname . '_footer_aff_link', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Custom Footer (Left)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_left', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Left)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_left_text', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Custom Footer (Right)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_right', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Right)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_right_text', 'std' => '', 'type' => 'textarea');
     /* Subscribe & Connect */
     $options[] = array('name' => __('Subscribe & Connect', 'woothemes'), 'type' => 'heading', 'icon' => 'connect');
     $options[] = array('name' => __('Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Subscribe & Connect - Single Post', 'woothemes'), 'desc' => sprintf(__('Enable the subscribe & connect area on single posts. You can also add this as a %1$s in your sidebar.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/widgets.php">widget</a>'), 'id' => $shortname . '_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Title', 'woothemes'), 'desc' => __('Enter the title to show in your subscribe & connect area.', 'woothemes'), 'id' => $shortname . '_connect_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Text', 'woothemes'), 'desc' => __('Change the default text in this area.', 'woothemes'), 'id' => $shortname . '_connect_content', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Related Posts', 'woothemes'), 'desc' => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), 'id' => $shortname . '_connect_related', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s for the e-mail subscription form.', 'woothemes'), '<a href="http://www.woothemes.com/tutorials/how-to-find-your-feedburner-id-for-email-subscription/">' . __('Feedburner ID', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_newsletter_id', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Subscribe By E-mail to MailChimp', 'woothemes', 'woothemes'), 'desc' => sprintf(__('If you have a MailChimp account you can enter the %1$s to allow your users to subscribe to a MailChimp List.', 'woothemes'), '<a href="http://woochimp.heroku.com" target="_blank">' . __('MailChimp List Subscribe URL', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_mailchimp_list_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Connect Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable RSS', 'woothemes'), 'desc' => __('Enable the subscribe and RSS icon.', 'woothemes'), 'id' => $shortname . '_connect_rss', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Twitter URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.twitter.com/woothemes', 'woothemes'), '<a href="http://www.twitter.com/">' . __('Twitter', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Facebook URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.facebook.com/woothemes', 'woothemes'), '<a href="http://www.facebook.com/">' . __('Facebook', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_facebook', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('YouTube URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.youtube.com/woothemes', 'woothemes'), '<a href="http://www.youtube.com/">' . __('YouTube', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_youtube', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Flickr URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.flickr.com/woothemes', 'woothemes'), '<a href="http://www.flickr.com/">' . __('Flickr', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_flickr', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('LinkedIn URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), '<a href="http://www.www.linkedin.com.com/">' . __('LinkedIn', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_linkedin', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Delicious URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.delicious.com/woothemes', 'woothemes'), '<a href="http://www.delicious.com/">' . __('Delicious', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_delicious', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Google+ URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), '<a href="http://plus.google.com/">' . __('Google+', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_googleplus', 'std' => '', 'type' => 'text');
     /* Advertising */
     $options[] = array('name' => __('Advertising', 'woothemes'), 'type' => 'heading', 'icon' => 'ads');
     $options[] = array('name' => __('Adsense code', 'woothemes'), 'desc' => __('Enter your adsense code (or other ad network code) here.', 'woothemes'), 'id' => $shortname . '_ad_top_adsense', 'std' => '', 'type' => 'textarea');
     /* Contact Template Settings */
     $options[] = array('name' => __('Contact Page', 'woothemes'), 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => __('Contact Information', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Contact Information Panel', 'woothemes'), 'desc' => __('Enable the contact informal panel', 'woothemes'), 'id' => $shortname . '_contact_panel', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Location Name', 'woothemes'), 'desc' => __('Enter the location name. Example: London Office', 'woothemes'), 'id' => $shortname . '_contact_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Location Address', 'woothemes'), 'desc' => __("Enter your company's address", 'woothemes'), 'id' => $shortname . '_contact_address', 'std' => '', 'class' => 'hidden', 'type' => 'textarea');
     $options[] = array('name' => __('Telephone', 'woothemes'), 'desc' => __('Enter your telephone number', 'woothemes'), 'id' => $shortname . '_contact_number', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Fax', 'woothemes'), 'desc' => __('Enter your fax number', 'woothemes'), 'id' => $shortname . '_contact_fax', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array('name' => __('Contact Form E-Mail', 'woothemes'), 'desc' => __("Enter your E-mail address to use on the 'Contact Form' page Template.", 'woothemes'), 'id' => $shortname . '_contactform_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Your Twitter username', 'woothemes'), 'desc' => __('Enter your Twitter username. Example: woothemes', 'woothemes'), 'id' => $shortname . '_contact_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Subscribe and Connect', 'woothemes'), 'desc' => __('Enable the subscribe and connect functionality on the contact page template', 'woothemes'), 'id' => $shortname . '_contact_subscribe_and_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Maps', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Contact Form Google Maps Coordinates', 'woothemes'), 'desc' => sprintf(__('Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from %1$s', 'woothemes'), '<a href="http://www.getlatlon.com/" target="_blank">' . __('Google Maps', 'woothemes') . '</a>'), 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Disable Mousescroll', 'woothemes'), 'desc' => __('Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.', 'woothemes'), 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => __('Map Height', 'woothemes'), 'desc' => __('Height in pixels for the maps displayed on Single.php pages.', 'woothemes'), 'id' => $shortname . '_maps_single_height', 'std' => '250', 'type' => 'text');
     $options[] = array('name' => __('Default Map Zoom Level', 'woothemes'), 'desc' => __('Set this to adjust the default in the post & page edit backend.', 'woothemes'), 'id' => $shortname . '_maps_default_mapzoom', 'std' => '9', 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => __('Default Map Type', 'woothemes'), 'desc' => __('Set this to the default rendered in the post backend.', 'woothemes'), 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => __('Normal', 'woothemes'), 'G_SATELLITE_MAP' => __('Satellite', 'woothemes'), 'G_HYBRID_MAP' => __('Hybrid', 'woothemes'), 'G_PHYSICAL_MAP' => __('Terrain', 'woothemes')));
     $options[] = array('name' => __('Map Callout Text', 'woothemes'), 'desc' => __('Text or HTML that will be output when you click on the map marker for your location.', 'woothemes'), 'id' => $shortname . '_maps_callout_text', 'std' => '', 'type' => 'textarea');
     // Add extra options through function
     if (function_exists('woo_options_add')) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     global $post;
     $woo_metaboxes = array();
     // Shown on both posts and pages
     // Show only on specific post types or page
     if (get_post_type() == 'post' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array('name' => 'image', 'label' => __('Image', 'woothemes'), 'type' => 'upload', 'desc' => __('Upload an image or enter an URL.', 'woothemes'));
             $woo_metaboxes[] = array('name' => '_image_alignment', 'std' => __('Center', 'woothemes'), 'label' => __('Image Crop Alignment', 'woothemes'), 'type' => 'select2', 'desc' => __('Select crop alignment for resized image', 'woothemes'), 'options' => array('c' => 'Center', 't' => 'Top', 'b' => 'Bottom', 'l' => 'Left', 'r' => 'Right'));
             // TimThumb disabled in the options
         } else {
             $woo_metaboxes[] = array('name' => '_timthumb-info', 'label' => __('Image', 'woothemes'), 'type' => 'info', 'desc' => sprintf(__('%1$s is disabled. Use the %2$s panel in the sidebar instead, or enable TimThumb in the options panel.', 'woothemes'), '<strong>' . __('TimThumb', 'woothemes') . '</strong>', '<strong>' . __('Featured Image', 'woothemes') . '</strong>'));
         }
         $woo_metaboxes[] = array('name' => 'embed', 'std' => '', 'label' => __('Embed Code', 'woothemes'), 'type' => 'textarea', 'desc' => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End post
     $woo_metaboxes[] = array('name' => '_layout', 'std' => 'normal', 'label' => __('Layout', 'woothemes'), 'type' => 'images', 'desc' => __('Select the layout you want on this specific post/page.', 'woothemes'), 'options' => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     // Add extra metaboxes through function
     if (function_exists('woo_metaboxes_add')) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#11
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "smpl";
     $themeslug = "smpl";
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = "woo";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $other_entries = array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     // General
     $options[] = array('name' => __('General Settings', 'woothemes'), 'type' => 'heading', 'icon' => 'general');
     $options[] = array('name' => __('Quick Start', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Theme Stylesheet', 'woothemes'), 'desc' => __('Select your themes alternative color scheme.', 'woothemes'), 'id' => $shortname . '_alt_stylesheet', 'std' => 'default.css', 'type' => 'select', 'options' => $alt_stylesheets);
     $options[] = array('name' => __('Custom Logo', 'woothemes'), 'desc' => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), 'id' => $shortname . '_logo', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Text Title', 'woothemes'), 'desc' => sprintf(__('Enable text-based Site Title and Tagline. Setup title & tagline in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/options-general.php">' . __('General Settings', 'woothemes') . '</a>'), 'id' => $shortname . '_texttitle', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Title', 'woothemes'), 'desc' => __('Change the site title typography.', 'woothemes'), 'id' => $shortname . '_font_site_title', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'Oswald', 'style' => '', 'color' => '#444444'), 'class' => 'hidden', 'type' => 'typography');
     /*$options[] = array( 'name' => __( 'Site Description', 'woothemes' ),
     			'desc' => __( 'Enable the site description/tagline under site title.', 'woothemes' ),
     			'id' => $shortname . '_tagline',
     			'class' => 'hidden',
     			'std' => 'false',
     			'type' => 'checkbox' );
     
     		$options[] = array( 'name' => __( 'Site Description', 'woothemes' ),
     			'desc' => __( 'Change the site description typography.', 'woothemes' ),
     			'id' => $shortname . '_font_tagline',
     			'std' => array( 'size' => '12', 'unit' => 'px', 'face' => 'Droid Sans', 'style' => '', 'color' => '#999999' ),
     			'class' => 'hidden last',
     			'type' => 'typography' );*/
     $options[] = array('name' => __('Custom Favicon', 'woothemes'), 'desc' => __('Upload a 16px x 16px <a href="http://www.faviconr.com/">ico image</a> that will represent your website\'s favicon.', 'woothemes'), 'id' => $shortname . '_custom_favicon', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Tracking Code', 'woothemes'), 'desc' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), 'id' => $shortname . '_google_analytics', 'std' => '', 'type' => 'textarea');
     /*	$options[] = array( 'name' => __( 'Subscription Settings', 'woothemes' ),
     					'type' => 'subheading' );
     
     		$options[] = array( 'name' => __( 'RSS URL', 'woothemes' ),
     			'desc' => __( 'Enter your preferred RSS URL. (Feedburner or other)', 'woothemes' ),
     			'id' => $shortname . '_feed_url',
     			'std' => '',
     			'type' => 'text' );
     
     		$options[] = array( 'name' => __( 'E-Mail Subscription URL', 'woothemes' ),
     			'desc' => __( 'Enter your preferred E-mail subscription URL. (Feedburner or other)', 'woothemes' ),
     			'id' => $shortname . '_subscribe_email',
     			'std' => '',
     			'type' => 'text' );
     
     		$options[] = array( 'name' => __( 'Contact Form E-Mail', 'woothemes' ),
     			'desc' => __( 'Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting "Contact Form" as page template.', 'woothemes' ),
     			'id' => $shortname . '_contactform_email',
     			'std' => '',
     			'type' => 'text' );*/
     $options[] = array('name' => __('Display Options', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Custom CSS', 'woothemes'), 'desc' => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), 'id' => $shortname . '_custom_css', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Post/Page Comments', 'woothemes'), 'desc' => __('Select if you want to enable/disable comments on posts and/or pages.', 'woothemes'), 'id' => $shortname . '_comments', 'std' => 'both', 'type' => 'select2', 'options' => array("post" => __('Posts Only', 'woothemes'), "page" => __('Pages Only', 'woothemes'), "both" => __('Pages / Posts', 'woothemes'), "none" => __('None', 'woothemes')));
     $options[] = array('name' => __('Post Content', 'woothemes'), 'desc' => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), 'id' => $shortname . '_post_content', 'type' => 'select2', 'options' => array("excerpt" => __('The Excerpt', 'woothemes'), "content" => __('Full Content', 'woothemes')));
     $options[] = array('name' => __('Post Author Box', 'woothemes'), 'desc' => sprintf(__('This will enable the post author box on the single posts page. Edit description in %1$s.', 'woothemes'), '<a href="' . home_url() . '/wp-admin/profile.php">' . __('Profile', 'woothemes') . '</a>'), 'id' => $shortname . '_post_author', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Breadcrumbs', 'woothemes'), 'desc' => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), 'id' => $shortname . '_breadcrumbs_show', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Pagination', 'woothemes'), 'desc' => __('Display pagination on the blog.', 'woothemes'), 'id' => $shortname . '_pagenav_show', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pagination Style', 'woothemes'), 'desc' => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), 'id' => $shortname . '_pagination_type', 'type' => 'select2', 'options' => array("paginated_links" => __('Numbers', 'woothemes'), "simple" => __('Next/Previous', 'woothemes')));
     // Styling
     $options[] = array('name' => __('Styling Options', 'woothemes'), 'type' => 'heading', 'icon' => 'styling');
     $options[] = array('name' => __('Background', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Body Background Color', 'woothemes'), 'desc' => __('Pick a custom color for background color of the theme e.g. #697e09', 'woothemes'), 'id' => $shortname . '_body_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Body background image', 'woothemes'), 'desc' => __('Upload an image for the theme\'s background', 'woothemes'), 'id' => $shortname . '_body_img', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Background image repeat', 'woothemes'), 'desc' => __('Select how you would like to repeat the background-image', 'woothemes'), 'id' => $shortname . '_body_repeat', 'std' => 'no-repeat', 'type' => 'select', 'options' => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array('name' => __('Background image position', 'woothemes'), 'desc' => __('Select how you would like to position the background', 'woothemes'), 'id' => $shortname . '_body_pos', 'std' => "top", 'type' => 'select', 'options' => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => "Background Attachment", "desc" => "Select whether the background should be fixed or move when the user scrolls", "id" => $shortname . "_body_attachment", "std" => "scroll", "type" => "select", "options" => array("scroll", "fixed"));
     $options[] = array('name' => __('Links', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Link Color', 'woothemes'), 'desc' => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Link Hover Color', 'woothemes'), 'desc' => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_hover_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Button Color', 'woothemes'), 'desc' => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_button_color', 'std' => '', 'type' => 'color');
     /* Typography */
     $options[] = array('name' => __('Typography', 'woothemes'), 'type' => 'heading', 'icon' => 'typography');
     $options[] = array('name' => __('Enable Custom Typography', 'woothemes'), 'desc' => __('Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes'), 'id' => $shortname . '_typography', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('General Typography', 'woothemes'), 'desc' => __('Change the general font.', 'woothemes'), 'id' => $shortname . '_font_body', 'std' => array('size' => '15', 'unit' => 'px', 'face' => 'FontSiteSans-Roman', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Navigation', 'woothemes'), 'desc' => __('Change the navigation font.', 'woothemes'), 'id' => $shortname . '_font_nav', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Page Title', 'woothemes'), 'desc' => __('Change the page title.', 'woothemes'), 'id' => $shortname . '_font_page_title', 'std' => array('size' => '1.7', 'unit' => 'em', 'face' => 'Oswald', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Title', 'woothemes'), 'desc' => __('Change the post title.', 'woothemes'), 'id' => $shortname . '_font_post_title', 'std' => array('size' => '1.7', 'unit' => 'em', 'face' => 'Oswald', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Meta', 'woothemes'), 'desc' => __('Change the post meta.', 'woothemes'), 'id' => $shortname . '_font_post_meta', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Entry', 'woothemes'), 'desc' => __('Change the post entry.', 'woothemes'), 'id' => $shortname . '_font_post_entry', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Widget Titles', 'woothemes'), 'desc' => __('Change the widget titles.', 'woothemes'), 'id' => $shortname . '_font_widget_titles', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     /* Layout */
     $options[] = array('name' => __('Layout Options', 'woothemes'), 'type' => 'heading', 'icon' => 'layout');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Main Layout', 'woothemes'), 'desc' => __('Select which layout you want for your site.', 'woothemes'), 'id' => $shortname . '_site_layout', 'std' => "layout-left-content", 'type' => 'images', 'options' => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array('name' => __('Category Exclude - Homepage', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your homepage (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_home', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Category Exclude - Blog Page Template', 'woothemes'), 'desc' => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your \'Blog\' page template (eg: uncategorized).', 'woothemes'), 'id' => $shortname . '_exclude_cats_blog', 'std' => '', 'type' => 'text');
     /* Homepage */
     $options[] = array("name" => "Homepage Options", "type" => "heading", "icon" => "homepage");
     $options[] = array("name" => "Intro", "type" => "subheading");
     $options[] = array("name" => "Stand First", "desc" => "The homepage heading", "id" => $shortname . "_stand_first", "std" => "Hello and welcome to our awesome store!", "type" => "textarea");
     $options[] = array("name" => "Slider", "type" => "subheading");
     $options[] = array("name" => "Enable Slider", "desc" => "Enable the slider on the homepage.", "id" => $shortname . "_slider", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Slider Entries", "desc" => "Select the number of entries that should appear in the home page slider.", "id" => $shortname . "_slider_entries", "std" => "3", "type" => "select", "class" => "hidden", "options" => $other_entries);
     $options[] = array("name" => "TouchSwipe", "desc" => "Select to enable TouchSwipe gestures for touch devices.", "id" => $shortname . "_slider_touchswipe", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Hover Pause", "desc" => "Hovering over slideshow will pause it", "id" => $shortname . "_slider_hover", "std" => "false", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Animation Speed", "desc" => "The time in <b>miliseconds</b> between frames.", "id" => $shortname . "_slider_speed", "std" => "7000", "class" => "hidden", "type" => "text");
     $options[] = array("name" => "Fade Speed", "desc" => "The time in <b>miliseconds</b> the fade between frames will take.", "id" => $shortname . "_fade_speed", "std" => "600", "class" => "hidden", "type" => "text");
     $options[] = array("name" => "Product Tabs", "type" => "subheading");
     $options[] = array("name" => "Display Product Tabs", "desc" => "Display product tabs on the homepage (requires WooCommerce)", "id" => $shortname . "_homepage_product_tabs", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Best Sellers", "desc" => "Display your best selling products in the homepage tabs", "id" => $shortname . "_homepage_best_sellers", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Staff Picks", "desc" => "Display staff picks (featured products) in the homepage tabs", "id" => $shortname . "_homepage_staff_picks", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "New In", "desc" => "Display new products in the homepage tabs", "id" => $shortname . "_homepage_new_in", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Twitter", "type" => "subheading");
     $options[] = array("name" => "Display Tweet", "desc" => "Display the latest tweet from your Twitter account", "id" => $shortname . "_homepage_tweet", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Portfolio", "type" => "subheading");
     $options[] = array("name" => "Display latest portfolio posts", "desc" => "Display the latest posts in your portfolio", "id" => $shortname . "_homepage_portfolio", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     /* WooCommerce */
     $options[] = array("name" => "WooCommerce Options", "type" => "heading", "icon" => "woocommerce");
     $options[] = array("name" => "Store Info", "type" => "subheading");
     $options[] = array("name" => "Display Store info", "desc" => "Display your store details in the footer", "id" => $shortname . "_display_store_info", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Store phone number", "desc" => "Appears in your site footer", "id" => $shortname . "_store_phone_number", "std" => "01234 567890", "class" => "hidden", "type" => "text");
     $options[] = array("name" => "Store email address", "desc" => "Appears in your site footer", "id" => $shortname . "_store_email_address", "std" => "*****@*****.**", "class" => "hidden", "type" => "text");
     $options[] = array("name" => "Display Twitter username", "desc" => "Appears in your site footer. Twitter name specified in contact settings", "id" => $shortname . "_store_twitter_username", "std" => "false", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Products", "type" => "subheading");
     $options[] = array("name" => "Product per page", "desc" => "How many products do you want to display on product archive pages? Multiples of 3 work best", "id" => $shortname . "_products_per_page", "std" => "12", "type" => "text");
     $options[] = array("name" => "Layout", "type" => "subheading");
     $options[] = array("name" => "Shop pages full width", "desc" => "Shop archives displayed full-width with no sidebar", "id" => $shortname . "_shop_archives_fullwidth", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Display product tabs", "desc" => "Show/hide the product review / attribute tabs in product details page", "id" => $shortname . "_product_tabs", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Display header cart link", "desc" => "Display the fixed cart link in the top right corner?", "id" => $shortname . "_header_cart_link", "std" => "true", "type" => "checkbox");
     /* Portfolio */
     $options[] = array("name" => __('Portfolio Settings', 'woothemes'), "icon" => "portfolio", "type" => "heading");
     /*
     $options[] = array( "name" => __( 'Enable Single Portfolio Gallery', 'woothemes' ),
     					"desc" => __( 'Enable the gallery feature in the single portfolio page layout.', 'woothemes' ),
     					"id" => $shortname."_portfolio_gallery",
     					"std" => "true",
     					"type" => "checkbox");
     */
     $options[] = array("name" => __('Portfolio Items URL Base', 'woothemes'), "desc" => sprintf(__('The base of all portfolio item URLs (re-save the %s after changing this setting).', 'woothemes'), '<a href="' . admin_url('options-permalink.php') . '">' . __('Permalinks', 'woothemes') . '</a>'), "id" => $shortname . "_portfolioitems_rewrite", "std" => "portfolio-items", "type" => "text");
     $options[] = array("name" => __('Exclude Galleries from the Portfolio Navigation', 'woothemes'), "desc" => __('Optionally exclude portfolio galleries from the portfolio gallery navigation switcher. Place the gallery slugs here, separated by commas <br />(eg: one, two, three)', 'woothemes'), "id" => $shortname . "_portfolio_excludenav", "std" => "", "type" => "text");
     $options[] = array("name" => __('Exclude Portfolio Items from Search Results', 'woothemes'), "desc" => __('Exclude portfolio items from results when searching your website.', 'woothemes'), "id" => $shortname . "_portfolio_excludesearch", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Portfolio Items Link To', 'woothemes'), "desc" => __('Do the portfolio items link to the lightbox, or to the single portfolio item screen?', 'woothemes'), "id" => $shortname . "_portfolio_linkto", "std" => "post", "type" => "select2", "options" => array('lightbox' => __('Lightbox', 'woothemes'), 'post' => __('Portfolio Item', 'woothemes')));
     $options[] = array("name" => __('Enable Pagination in Portfolio', 'woothemes'), "desc" => __('Enable pagination in the portfolio section (disables JavaScript filtering by category)', 'woothemes'), "id" => $shortname . "_portfolio_enable_pagination", "std" => "false", "class" => 'collapsed', "type" => "checkbox");
     $options[] = array("name" => __('Number of posts to display on "Portfolio" page template', 'woothemes'), "desc" => __('The number of posts to display per page, when pagination is enabled, in the "Portfolio" page template.', 'woothemes'), "id" => $shortname . "_portfolio_posts_per_page", "std" => get_option('posts_per_page'), "class" => 'hidden last', "type" => "text");
     /* Dynamic Images */
     $options[] = array('name' => __('Dynamic Images', 'woothemes'), 'type' => 'heading', 'icon' => 'image');
     $options[] = array('name' => __('Resizer Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Dynamic Image Resizing', 'woothemes'), 'desc' => '', 'id' => $shortname . '_wpthumb_notice', 'std' => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using WP Post Thumbnail option.', 'woothemes'), 'type' => "info");
     $options[] = array('name' => __('WP Post Thumbnail', 'woothemes'), 'desc' => __('Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), 'id' => $shortname . '_post_image_support', 'std' => 'true', 'class' => "collapsed", 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Dynamic Image Resizing', 'woothemes'), 'desc' => __('The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), 'id' => $shortname . '_pis_resize', 'std' => 'true', 'class' => "hidden", 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Hard Crop', 'woothemes'), 'desc' => __('The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes'), 'id' => $shortname . '_pis_hard_crop', 'std' => 'true', 'class' => "hidden last", 'type' => 'checkbox');
     $options[] = array('name' => __('TimThumb - Custom Settings Panel', 'woothemes'), 'desc' => sprintf(__('This will enable the %1$s (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. %2$s', 'woothemes'), '<a href="http://code.google.com/p/timthumb/">TimThumb</a>', '<a href="http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/">Need help?</a>'), 'id' => $shortname . '_resize', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Automatic Image Thumbnail', 'woothemes'), 'desc' => __('If no thumbnail is specifified then the first uploaded image in the post is used.', 'woothemes'), 'id' => $shortname . '_auto_img', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Thumbnail Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Thumbnail Image Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'type' => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnails with posts.', 'woothemes'), 'id' => $shortname . '_thumb_align', 'std' => 'alignleft', 'type' => 'select2', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => 'Single Post - Show Thumbnail', 'desc' => __('Show the thumbnail in the single post page.', 'woothemes'), 'id' => $shortname . '_thumb_single', 'class' => 'collapsed', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Single Post - Thumbnail Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'class' => 'hidden last', 'type' => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Single Post - Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnail with single posts.', 'woothemes'), 'id' => $shortname . '_thumb_single_align', 'std' => 'alignright', 'type' => 'select2', 'class' => 'hidden', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Add thumbnail to RSS feed', 'woothemes'), 'desc' => __('Add the the image uploaded via your Custom Settings panel to your RSS feed', 'woothemes'), 'id' => $shortname . '_rss_thumb', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Enable Lightbox', 'woothemes'), 'desc' => __('Enable the PrettyPhoto lighbox script on images within your website\'s content.', 'woothemes'), 'id' => $shortname . '_enable_lightbox', 'std' => 'false', 'type' => 'checkbox');
     /* Footer */
     $options[] = array('name' => __('Footer Customization', 'woothemes'), 'type' => 'heading', 'icon' => 'footer');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Footer Widget Areas', 'woothemes'), 'desc' => __('Select how many footer widget areas you want to display.', 'woothemes'), 'id' => $shortname . '_footer_sidebars', 'std' => "4", 'type' => 'images', 'options' => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array('name' => __('Custom Affiliate Link', 'woothemes'), 'desc' => __('Add an affiliate link to the WooThemes logo in the footer of the theme.', 'woothemes'), 'id' => $shortname . '_footer_aff_link', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Custom Footer (Left)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_left', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Left)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_left_text', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Custom Footer (Right)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_right', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Right)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_right_text', 'std' => '', 'type' => 'textarea');
     /* Subscribe & Connect */
     $options[] = array('name' => __('Subscribe & Connect', 'woothemes'), 'type' => 'heading', 'icon' => 'connect');
     $options[] = array('name' => __('S&C Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable Subscribe & Connect - Single Post', 'woothemes'), 'desc' => sprintf(__('Enable the subscribe & connect area on single posts. You can also add this as a %1$s in your sidebar.', 'woothemes'), '<a href="' . home_url() . '/wp-admin/widgets.php">widget</a>'), 'id' => $shortname . '_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Title', 'woothemes'), 'desc' => __('Enter the title to show in your subscribe & connect area.', 'woothemes'), 'id' => $shortname . '_connect_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Text', 'woothemes'), 'desc' => __('Change the default text in this area.', 'woothemes'), 'id' => $shortname . '_connect_content', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Related Posts', 'woothemes'), 'desc' => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), 'id' => $shortname . '_connect_related', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), 'desc' => __('Enter your <a href="http://www.woothemes.com/tutorials/how-to-find-your-feedburner-id-for-email-subscription/">Feedburner ID</a> for the e-mail subscription form.', 'woothemes'), 'id' => $shortname . '_connect_newsletter_id', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Subscribe By E-mail to MailChimp', 'woothemes', 'woothemes'), 'desc' => __('If you have a MailChimp account you can enter the <a href="http://woochimp.heroku.com" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', 'woothemes'), 'id' => $shortname . '_connect_mailchimp_list_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Connect', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable RSS', 'woothemes'), 'desc' => __('Enable the subscribe and RSS icon.', 'woothemes'), 'id' => $shortname . '_connect_rss', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Twitter URL', 'woothemes'), 'desc' => __('Enter your  <a href="http://www.twitter.com/">Twitter</a> URL e.g. http://www.twitter.com/woothemes', 'woothemes'), 'id' => $shortname . '_connect_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Facebook URL', 'woothemes'), 'desc' => __('Enter your  <a href="http://www.facebook.com/">Facebook</a> URL e.g. http://www.facebook.com/woothemes', 'woothemes'), 'id' => $shortname . '_connect_facebook', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('YouTube URL', 'woothemes'), 'desc' => __('Enter your  <a href="http://www.youtube.com/">YouTube</a> URL e.g. http://www.youtube.com/woothemes', 'woothemes'), 'id' => $shortname . '_connect_youtube', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Flickr URL', 'woothemes'), 'desc' => __('Enter your  <a href="http://www.flickr.com/">Flickr</a> URL e.g. http://www.flickr.com/woothemes', 'woothemes'), 'id' => $shortname . '_connect_flickr', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('LinkedIn URL', 'woothemes'), 'desc' => __('Enter your  <a href="http://www.www.linkedin.com.com/">LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), 'id' => $shortname . '_connect_linkedin', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Delicious URL', 'woothemes'), 'desc' => __('Enter your <a href="http://www.delicious.com/">Delicious</a> URL e.g. http://www.delicious.com/woothemes', 'woothemes'), 'id' => $shortname . '_connect_delicious', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Google+ URL', 'woothemes'), 'desc' => __('Enter your <a href="http://plus.google.com/">Google+</a> URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), 'id' => $shortname . '_connect_googleplus', 'std' => '', 'type' => 'text');
     /* Advertising */
     /*$options[] = array( 'name' => __( 'Advertising', 'woothemes' ),
     			'type' => 'heading',
     			'icon' => "ads" );
     
     		$options[] = array( 'name' => __( 'Top Ad (468x60px)', 'woothemes' ),
     			'type' => 'subheading' );
     
     		$options[] = array( 'name' => __( 'Enable Ad', 'woothemes' ),
     			'desc' => __( 'Enable the ad space', 'woothemes' ),
     			'id' => $shortname . '_ad_top',
     			'std' => 'false',
     			'type' => 'checkbox' );
     
     		$options[] = array( 'name' => __( 'Adsense code', 'woothemes' ),
     			'desc' => __( 'Enter your adsense code (or other ad network code) here.', 'woothemes' ),
     			'id' => $shortname . '_ad_top_adsense',
     			'std' => '',
     			'type' => 'textarea' );
     
     		$options[] = array( 'name' => __( 'Image Location', 'woothemes' ),
     			'desc' => __( 'Enter the URL to the banner ad image location.', 'woothemes' ),
     			'id' => $shortname . '_ad_top_image',
     			'std' => "http://www.woothemes.com/ads/468x60b.jpg",
     			'type' => 'upload' );
     
     		$options[] = array( 'name' => __( 'Destination URL', 'woothemes' ),
     			'desc' => __( 'Enter the URL where this banner ad points to.', 'woothemes' ),
     			'id' => $shortname . '_ad_top_url',
     			'std' => "http://www.woothemes.com",
     			'type' => 'text' );*/
     /* Contact Template Settings */
     $options[] = array('name' => "Contact Page", 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => "Contact Information", 'type' => 'subheading');
     $options[] = array('name' => "Your Twitter username", 'desc' => "Enter your Twitter username. Example: woothemes", 'id' => $shortname . '_contact_twitter', 'std' => 'woothemes', 'type' => 'text');
     $options[] = array('name' => "Location Name", 'desc' => "Enter the location name. Example: London Office", 'id' => $shortname . '_contact_title', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Location Address", 'desc' => "Enter your company's address", 'id' => $shortname . '_contact_address', 'std' => '', 'type' => "textarea");
     $options[] = array('name' => "Telephone", 'desc' => "Enter your telephone number", 'id' => $shortname . '_contact_number', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Fax", 'desc' => "Enter your fax number", 'id' => $shortname . '_contact_fax', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Email Address", 'desc' => "Enter your email address", 'id' => $shortname . '_contact_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Maps", 'type' => 'subheading');
     $options[] = array('name' => "Contact Form Google Maps Coordinates", 'desc' => 'Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from <a href="http://www.getlatlon.com/" target="_blank">Google Maps</a>', 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => "Disable Mousescroll", 'desc' => "Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.", 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => "Map Height", 'desc' => "Height in pixels for the maps displayed on Single.php pages.", 'id' => $shortname . '_maps_single_height', 'std' => "250", 'type' => 'text');
     $options[] = array('name' => "Default Map Zoom Level", 'desc' => "Set this to adjust the default in the post & page edit backend.", 'id' => $shortname . '_maps_default_mapzoom', 'std' => "9", 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => "Default Map Type", 'desc' => "Set this to the default rendered in the post backend.", 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => 'Normal', 'G_SATELLITE_MAP' => 'Satellite', 'G_HYBRID_MAP' => 'Hybrid', 'G_PHYSICAL_MAP' => 'Terrain'));
     $options[] = array('name' => "Map Callout Text", 'desc' => "Text or HTML that will be output when you click on the map marker for your location.", 'id' => $shortname . '_maps_callout_text', 'std' => "", 'type' => 'textarea');
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     global $post;
     $woo_metaboxes = array();
     // Shown on both posts and pages
     // Show only on specific post types or page
     if (get_post_type() == 'post' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array('name' => "image", "label" => "Image", 'type' => "upload", 'desc' => "Upload an image or enter an URL.");
             $woo_metaboxes[] = array('name' => "_image_alignment", 'std' => "Center", "label" => "Image Crop Alignment", 'type' => 'select2', 'desc' => "Select crop alignment for resized image", 'options' => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
             // TimThumb disabled in the options
         } else {
             $woo_metaboxes[] = array('name' => "_timthumb-info", "label" => "Image", 'type' => "info", 'desc' => "<strong>TimThumb</strong> is disabled. Use the <strong>Featured Image</strong> panel in the sidebar instead, or enable TimThumb in the options panel.");
         }
         $woo_metaboxes[] = array('name' => "embed", 'std' => '', "label" => "Embed Code", 'type' => "textarea", 'desc' => "Enter the video embed code for your video (YouTube, Vimeo or similar)");
     }
     // End post
     // CPT slide image option
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Slide Image", "type" => "upload", "desc" => "Upload an image or enter an URL to your slide image");
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Video Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.");
         $woo_metaboxes[] = array("name" => "url", "label" => "URL", "type" => "text", "desc" => "Enter URL if you want to add a link to the uploaded image and title. (optional) ");
     }
     //End slide
     $woo_metaboxes[] = array('name' => "_layout", 'std' => "normal", "label" => "Layout", 'type' => "images", 'desc' => "Select the layout you want on this specific post/page.", 'options' => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#12
0
 function woo_options()
 {
     // VARIABLES
     $themename = "Elefolio";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/elefolio/';
     $shortname = "woo";
     $GLOBALS['template_path'] = get_bloginfo('template_directory');
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_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");
     //URL Shorteners
     if (_iscurlinstalled()) {
         $options_select = array("Off", "TinyURL", "Bit.ly");
         $short_url_msg = 'Select the URL shortening service you would like to use.';
     } else {
         $options_select = array("Off");
         $short_url_msg = '<strong>cURL was not detected on your server, and is required in order to use the URL shortening services.</strong>';
     }
     //Stylesheets Reader
     $alt_stylesheet_path = TEMPLATEPATH . '/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
     $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");
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     $options[] = array("name" => "General Settings", "type" => "heading", "icon" => "general");
     $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => "Text Title", "desc" => "Enable text-based Site Title and Tagline. Setup title & tagline in Settings->General.", "id" => $shortname . "_texttitle", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Site Title", "desc" => "Change the site title (must have 'Text Title' option enabled).", "id" => $shortname . "_font_site_title", "std" => array('size' => '40', 'unit' => 'px', 'face' => 'Impact', 'style' => '', 'color' => '#222222'), "class" => "hidden", "type" => "typography");
     $options[] = array("name" => "Site Description", "desc" => "Change the site description (must have 'Text Title' option enabled).", "id" => $shortname . "_font_tagline", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Georgia', 'style' => 'italic', 'color' => '#999999'), "class" => "hidden last", "type" => "typography");
     $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => "Tracking 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");
     $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => "E-Mail URL", "desc" => "Enter your preferred E-mail subscription URL. (Feedburner or other)", "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Contact Form E-Mail", "desc" => "Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting 'Contact Form' as page template.", "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => "Post/Page Comments", "desc" => "Select if you want to enable/disable comments on posts and/or pages. ", "id" => $shortname . "_comments", "type" => "select2", "options" => array("post" => "Posts Only", "page" => "Pages Only", "both" => "Pages / Posts", "none" => "None"));
     $options[] = array("name" => "Post Content", "desc" => "Select if you want to show the full content or the excerpt on posts. ", "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => "The Excerpt", "content" => "Full Content"));
     $options[] = array("name" => "Styling Options", "type" => "heading", "icon" => "styling");
     $options[] = array("name" => "Body Background Color", "desc" => "Pick a custom color for background color of the theme e.g. #697e09", "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Body background image", "desc" => "Upload an image for the theme's background", "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => "Background image repeat", "desc" => "Select how you would like to repeat the background-image", "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => $body_repeat);
     $options[] = array("name" => "Background image position", "desc" => "Select how you would like to position the background", "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => $body_pos);
     $options[] = array("name" => "Link Color", "desc" => "Pick a custom color for links or add a hex color code e.g. #697e09", "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Link Hover Color", "desc" => "Pick a custom color for links hover or add a hex color code e.g. #697e09", "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Button Color", "desc" => "Pick a custom color for buttons or add a hex color code e.g. #697e09", "id" => "woo_button_color", "std" => "", "type" => "color");
     $options[] = array("name" => "Typography", "type" => "heading", "icon" => "typography");
     $options[] = array("name" => "Enable Custom Typography", "desc" => "Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.", "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "General Typography", "desc" => "Change the general font.", "id" => $shortname . "_font_body", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "About (Homepage)", "desc" => "Change the about text font.", "id" => $shortname . "_font_about", "std" => array('size' => '32', 'unit' => 'px', 'face' => 'Georgia', 'style' => '', 'color' => '#126661'), "type" => "typography");
     $options[] = array("name" => "Navigation", "desc" => "Change the navigation font.", "id" => $shortname . "_font_nav", "std" => array('size' => '15', 'unit' => 'px', 'face' => 'Georgia', 'style' => '', 'color' => '#151515'), "type" => "typography");
     $options[] = array("name" => "Post Title", "desc" => "Change the post title.", "id" => $shortname . "_font_post_title", "std" => array('size' => '24', 'unit' => 'px', 'face' => 'Georgia', 'style' => 'bold', 'color' => '#222222'), "type" => "typography");
     $options[] = array("name" => "Post Meta", "desc" => "Change the post meta.", "id" => $shortname . "_font_post_meta", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Georgia', 'style' => '', 'color' => '#999999'), "type" => "typography");
     $options[] = array("name" => "Post Entry", "desc" => "Change the post entry.", "id" => $shortname . "_font_post_entry", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#555555'), "type" => "typography");
     $options[] = array("name" => "Widget Titles", "desc" => "Change the widget titles.", "id" => $shortname . "_font_widget_titles", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'Georgia', 'style' => 'bold', 'color' => '#555555'), "type" => "typography");
     //Header
     $options[] = array("name" => "Homepage", "type" => "heading", "icon" => "homepage");
     $options[] = array("name" => "Enable About Section", "desc" => "Show a welcome message in your header and add social media icons.", "id" => $shortname . "_about", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "About Message", "desc" => "Enter an about message that will show just below the logo", "id" => $shortname . "_header_bio", "std" => "Edit this welcome message in your options panel", "type" => "textarea");
     $options[] = array("name" => "Facebook", "desc" => "Enter your profile url", "id" => $shortname . "_social_facebook", "std" => "", "type" => "text");
     $options[] = array("name" => "Linkedin", "desc" => "Enter your profile url", "id" => $shortname . "_social_linkedin", "std" => "", "type" => "text");
     $options[] = array("name" => "Twitter", "desc" => "Enter your profile url", "id" => $shortname . "_social_twitter", "std" => "", "type" => "text");
     $options[] = array("name" => "Portfolio", "icon" => "portfolio", "type" => "heading");
     $options[] = array("name" => "Enable Portfolio", "desc" => "Enable the portfolio section below the about section. Add portfolio posts using the 'Portfolio' custom post type.", "id" => $shortname . "_portfolio", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Number of portfolio items", "id" => $shortname . "_portfolio_number", "std" => "4", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => "Portfolio Tags", "desc" => "Enter comma seperated tags for portfolio sorting (e.g. web, print, icons). You must add these tags to the portfolio items you want to sort.", "id" => $shortname . "_portfolio_tags", "std" => "", "type" => "text");
     $options[] = array("name" => "Tumblog Setup", "icon" => "tumblog", "type" => "heading");
     $content_option_array = array('taxonomy' => 'Taxonomy', 'post_format' => 'Post Formats');
     $options[] = array("name" => "Tumblog Content Method", "desc" => "Select if you would like to use a Taxonomy of Post Formats to categorize your Tumblog content.", "id" => $shortname . "_tumblog_content_method", "std" => "post_format", "type" => "select2", "options" => $content_option_array);
     $options[] = array("name" => "Use Custom Tumblog RSS Feed", "desc" => "Replaces the default WordPress RSS feed output with Tumblog RSS output.", "id" => $shortname . "_custom_rss", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Full Content Home", "desc" => "Show the full content in posts on homepage instead of the excerpt.", "id" => $shortname . "_home_content", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Full Content Archive", "desc" => "Show the full content in posts on archive pages instead of the excerpt.", "id" => $shortname . "_archive_content", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => "Images Link to", "desc" => "Select where your Tumblog Images will link to when clicked.", "id" => $shortname . "_image_link_to", "std" => "post", "type" => "radio", "options" => $options_image_link_to);
     $options[] = array("name" => "URL Shortening Service", "desc" => $short_url_msg, "id" => $shortname . "_url_shorten", "std" => "Select a Service:", "type" => "select", "options" => $options_select);
     $options[] = array("name" => "Bit.ly Login Name", "desc" => "Your Bit.ly login name - get this here <a href='http://bit.ly/account/' target='_blank'>http://bit.ly/account/</a>", "id" => $shortname . "_bitly_api_login", "std" => "", "type" => "text");
     $options[] = array("name" => "Bit.ly API Key", "desc" => "Your Bit.ly API Key - get this here <a href='http://bit.ly/account/' target='_blank'>http://bit.ly/account/</a>", "id" => $shortname . "_bitly_api_key", "std" => "", "type" => "text");
     $options[] = array("name" => "Dynamic Images", "type" => "heading", "icon" => "image");
     $options[] = array("name" => "Enable WordPress Post Thumbnail Support", "desc" => "Use WordPress post thumbnail support to assign a post thumbnail.", "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => "Dynamically Resize Post Thumbnail", "desc" => "The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>", "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => "Hard Crop Post Thumbnail", "desc" => "The image will be cropped to match the target aspect ratio.", "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => "Enable Dynamic Image Resizer", "desc" => "This will enable the thumb.php script which dynamically resizes images on your site.", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Dynamic Image Height", "desc" => "If this is enabled, the height of your images will be dynamically calculated based on the width's as set below.", "id" => $shortname . "_dynamic_img_height", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Thumbnail Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.", "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 550, 'meta' => 'Width'), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 412, 'meta' => 'Height')));
     $options[] = array("name" => "Thumbnail Image alignment", "desc" => "Select how to align your thumbnails with posts.", "id" => $shortname . "_thumb_align", "std" => "aligncenter", "type" => "radio", "options" => $options_thumb_align);
     $options[] = array("name" => "Show thumbnail in Single Posts", "desc" => "Show the attached image in the single post page.", "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => "Single Image Dimensions", "desc" => "Enter an integer value i.e. 250 for the image size. Max width is 576.", "id" => $shortname . "_image_dimensions", "std" => "", "class" => "hidden last", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 550, 'meta' => 'Width'), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 412, 'meta' => 'Height')));
     $options[] = array("name" => "Single Post Image alignment", "desc" => "Select how to align your thumbnail with single posts.", "id" => $shortname . "_thumb_single_align", "std" => "aligncenter", "type" => "radio", "class" => "hidden", "options" => $options_thumb_align);
     //Footer
     $options[] = array("name" => "Footer Customization", "type" => "heading", "icon" => "footer");
     $options[] = array("name" => "Custom Affiliate Link", "desc" => "Add an affiliate link to the WooThemes logo in the footer of the theme.", "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $options[] = array("name" => "Enable Custom Footer (Left)", "desc" => "Activate to add the custom text below to the theme footer.", "id" => $shortname . "_footer_left", "class" => "collapsed", "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", "class" => "hidden last", "std" => "<p></p>", "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", "class" => "collapsed", "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", "class" => "hidden last", "std" => "<p></p>", "type" => "textarea");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     $woo_metaboxes = array();
     global $post;
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => "Image", "type" => "upload", "desc" => "Upload file here...");
         $woo_metaboxes[] = array("name" => "video-embed", "label" => "Embed Code (Videos)", "type" => "textarea", "desc" => "Add embed code for video services like Youtube or Vimeo");
         $woo_metaboxes[] = array("name" => "quote-author", "std" => "Unknown", "label" => "Quote Author", "type" => "text", "desc" => "Enter the name of the Quote Author.");
         $woo_metaboxes[] = array("name" => "quote-url", "std" => "http://", "label" => "Link to Quote", "type" => "text", "desc" => "Enter the url/web address of the Quote if available.");
         $woo_metaboxes[] = array("name" => "quote-copy", "std" => "Unknown", "label" => "Quote", "type" => "textarea", "desc" => "Enter the Quote.");
         $woo_metaboxes[] = array("name" => "audio", "std" => "http://", "label" => "Audio URL", "type" => "text", "desc" => "Enter the url/web address of the Audio file.");
         $woo_metaboxes[] = array("name" => "link-url", "std" => "http://", "label" => "Link URL", "type" => "text", "desc" => "Enter the url/web address of the Link.");
     }
     // End post
     if (get_post_type() == 'portfolio' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "portfolio-image", "label" => "Portfolio Image", "type" => "upload", "desc" => "Upload an image or enter an URL to your portfolio image");
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "Center", "label" => "Image Crop Alignment", "type" => "select2", "desc" => "Select crop alignment for resized image", "options" => array("c" => "Center", "t" => "Top", "b" => "Bottom", "l" => "Left", "r" => "Right"));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => "Video Embed Code", "type" => "textarea", "desc" => "Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.");
     }
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#13
0
function woo_options() {
// VARIABLES
$themename = "Premium News";
$shortname = "woo";
$manualurl = 'http://www.woothemes.com/support/theme-documentation/the-original-premium-news/';



$GLOBALS['template_path'] = get_bloginfo('template_directory');

//Access the WordPress Categories via an Array
$woo_categories = array();  
$woo_categories_obj = get_categories('hide_empty=0');
foreach ($woo_categories_obj as $woo_cat) {
    $woo_categories[$woo_cat->cat_ID] = $woo_cat->slug;}
$categories_tmp = array_unshift($woo_categories, "Select a category:");    
       
//Access the WordPress Pages via an Array
$woo_pages = array();
$woo_pages_obj = get_pages('sort_column=post_parent,menu_order');    
foreach ($woo_pages_obj as $woo_page) {
    $woo_pages[$woo_page->ID] = $woo_page->post_name; }
$woo_pages_tmp = array_unshift($woo_pages, "Select a page:");       


//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 = TEMPLATEPATH . '/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


$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");

// THIS IS THE DIFFERENT FIELDS
$options = array();   

$options[] = array( "name" => "General Settings",
                    "type" => "heading");
                        
$options[] = array( "name" => "Theme Stylesheet",
					"desc" => "Select your themes alternative color scheme.",
					"id" => $shortname."_alt_stylesheet",
					"std" => "default.css",
					"type" => "select",
					"options" => $alt_stylesheets);

$options[] = array( "name" => "Custom Logo",
					"desc" => "Upload a logo for your theme, or specify an image URL directly.",
					"id" => $shortname."_logo",
					"std" => "",
					"type" => "upload");    
                                                                                     
$options[] = array( "name" => "Custom Favicon",
					"desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.",
					"id" => $shortname."_custom_favicon",
					"std" => "",
					"type" => "upload"); 
                                               
$options[] = array( "name" => "Tracking 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");        

$options[] = array( "name" => "RSS URL",
					"desc" => "Enter your preferred RSS URL. (Feedburner or other)",
					"id" => $shortname."_feedburner_url",
					"std" => "",
					"type" => "text");
                    
$options[] = array( "name" => "E-mail URL",
					"desc" => "Enter your preferred E-mail subscribe URL. (Feedburner or other)",
					"id" => $shortname."_feedburner_id",
					"std" => "",
					"type" => "text");

$options[] = array( "name" => "Custom CSS",
                    "desc" => "Quickly add some CSS to your theme by adding it to this block.",
                    "id" => $shortname."_custom_css",
                    "std" => "",
                    "type" => "textarea");

$options[] = array(	"name" => "Archives Page",
						"desc" => "Please enter your archive page URL. TIP: Add your archive by creating a new page (Write > Page), and selecting the 'Archive' page template. ",
						"id" => $shortname."_archives",
						"std" => "",
						"type" => "text");

$options[] = array(	"name" => "Front Page Layout",
						"type" => "heading");

$options[] = array(	"name" => "Blog Layout",
						"desc" => "Show normal entries as 1-column blog posts?",
			    		"id" => $shortname."_layout",
			    		"std" => "false",
			    		"type" => "checkbox");

$options[] = array(	"name" => "Homepage Entries",
						"desc" => "Select the number of entries that should appear below the Featured Entries or Video Panel.",
			    		"id" => $shortname."_other_entries",
			    		"std" => "6",
			    		"type" => "select",
			    		"options" => $other_entries);	
						
$options[] = array( 	"name" => "Featured Category",
					   	"desc" => "Select the category that you would like to have displayed in the featured section on your homepage.",
						"id" => $shortname."_featured_category",
						"std" => "Select a category:",
						"type" => "select",
						"options" => $woo_categories);						

$options[] = array(	"name" => "Display Video?",
						"desc" => "Check this box if you wish to display the video panel on your homepage.",
						"id" => $shortname."_show_video",
						"std" => "false",
						"type" => "checkbox");
						
$options[] = array( 	"name" => "Video Category",
					   	"desc" => "Select the category that you would like to have displayed in the video panel on your homepage.",
						"id" => $shortname."_video_category",
						"std" => "Select a category:",
						"type" => "select",
						"options" => $woo_categories);
						
$options[] = array(	"name" => "Sidebar Components",
						"type" => "heading");

$options[] = array(	"name" => "Flickr ID",
						"desc" => "Use <a href='http://idgettr.com/'>idGettr to find it.</a>",
			    		"id" => $shortname."_flickr_id",
			    		"std" => "",
			    		"type" => "text");											

$options[] = array(	"name" => "Number photos",
						"desc" => "Select the number of photos to display in flickr sidebar box. (3 per row)",
			    		"id" => $shortname."_flickr_entries",
			    		"std" => "Select a Number:",
			    		"type" => "select",
			    		"options" => $other_entries);												

$options[] = array(	"name" => "Flickr URL",
						"desc" => "Enter the URL of your Flickr account here.",
			    		"id" => $shortname."_flickr_url",
			    		"std" => "",
			    		"type" => "text");																						

$options[] = array(	"name" => "Sidebar Components",
						"type" => "heading");

$options[] = array( "name" => "Dynamic Images",
				    "type" => "heading");    

$options[] = array( "name" => "Enable Dynamic Image Resizer",
					"desc" => "This will enable the thumb.php script. It dynamicaly resizes images on your site.",
					"id" => $shortname."_resize",
					"std" => "true",
					"type" => "checkbox");    
                    
$options[] = array( "name" => "Automatic Image Thumbs",
					"desc" => "If no image is specified in the 'image' custom field then the first uploaded post image is used.",
					"id" => $shortname."_auto_img",
					"std" => "true",
					"type" => "checkbox");  

$options[] = array( "name" => "Show Image in RSS feed",
					"desc" => "Will show the image uploaded to 'image' custom field in the RSS feed.",
					"id" => $shortname."_rss_thumb",
					"std" => "false",
					"type" => "checkbox");    


$options[] = array(	"name" => "Banner Ad Management",
						"type" => "heading");

$options[] = array(	"name" => "Advertising Page",
						"desc" => "Please enter the URL to the WordPress page that contains your advertising information.",
						"id" => $shortname."_ad_page",
						"std" => "",
						"type" => "text");

$options[] = array(	"name" => "Banner Ad #1 - Image Location",
					"desc" => "Enter the URL for this banner ad.",
					"id" => $shortname."_ad_image_1",
					"std" => "http://www.woothemes.com/ads/125x125b.jpg",
					"type" => "text");
						
$options[] = array(	"name" => "Banner Ad #1 - Destination",
					"desc" => "Enter the URL where this banner ad points to.",
					"id" => $shortname."_ad_url_1",
					"std" => "http://www.woothemes.com",
					"type" => "text");						

$options[] = array(	"name" => "Banner Ad #2 - Image Location",
					"desc" => "Enter the URL for this banner ad.",
					"id" => $shortname."_ad_image_2",
					"std" => "http://www.woothemes.com/ads/125x125b.jpg",
					"type" => "text");
						
$options[] = array(	"name" => "Banner Ad #2 - Destination",
					"desc" => "Enter the URL where this banner ad points to.",
					"id" => $shortname."_ad_url_2",
					"std" => "http://www.woothemes.com",
					"type" => "text");

$options[] = array(	"name" => "Banner Ad #3 - Image Location",
					"desc" => "Enter the URL for this banner ad.",
					"id" => $shortname."_ad_image_3",
					"std" => "http://www.woothemes.com/ads/125x125b.jpg",
					"type" => "text");
						
$options[] = array(	"name" => "Banner Ad #3 - Destination",
					"desc" => "Enter the URL where this banner ad points to.",
					"id" => $shortname."_ad_url_3",
					"std" => "http://www.woothemes.com",
					"type" => "text");

$options[] = array(	"name" => "Banner Ad #4 - Image Location",
					"desc" => "Enter the URL for this banner ad.",
					"id" => $shortname."_ad_image_4",
					"std" => "http://www.woothemes.com/ads/125x125b.jpg",
					"type" => "text");
						
$options[] = array(	"name" => "Banner Ad #4 - Destination",
					"desc" => "Enter the URL where this banner ad points to.",
					"id" => $shortname."_ad_url_4",
					"std" => "http://www.woothemes.com",
					"type" => "text");

                                           

// Add extra options through function
if ( function_exists("woo_options_add") )
	$options = woo_options_add($options);

if ( get_option('woo_template') != $options) update_option('woo_template',$options);      
if ( get_option('woo_themename') != $themename) update_option('woo_themename',$themename);   
if ( get_option('woo_shortname') != $shortname) update_option('woo_shortname',$shortname);
if ( get_option('woo_manual') != $manualurl) update_option('woo_manual',$manualurl);

                                     
// Woo Metabox Options
                    

$woo_metaboxes = array(

        "image" => array (
            "name" => "image",
            "label" => "Image",
            "type" => "upload",
            "desc" => "Upload file here..."
        ),
        "embed" => array (
            "name"  => "embed",
            "std"  => "",
            "label" => "Embed Code",
            "type" => "textarea",
            "desc" => "Enter the video embed code for your video player"
        )
    );
    
// Add extra metaboxes through function
if ( function_exists("woo_metaboxes_add") )
	$woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
    
if ( get_option('woo_custom_template') != $woo_metaboxes) update_option('woo_custom_template',$woo_metaboxes);      

/*
function woo_update_options(){
        $options = get_option('woo_template',$options);  
        foreach ($options as $option){
            update_option($option['id'],$option['std']);
        }   
}

function woo_add_options(){
        $options = get_option('woo_template',$options);  
        foreach ($options as $option){
            update_option($option['id'],$option['std']);
        }   
}


//add_action('switch_theme', 'woo_update_options'); 
if(get_option('template') == 'wooframework'){       
    woo_add_options();
} // end function 
*/


}
示例#14
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = 'Hub';
     $themeslug = 'hub';
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = 'woo';
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the WordPress Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, 'Select a category:');
     //Access the WordPress Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, 'Select a page:');
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $slide_options = array();
     $total_possible_slides = 10;
     for ($i = 1; $i <= $total_possible_slides; $i++) {
         $slide_options[] = $i;
     }
     // Setup an array of slide-page terms for a dropdown.
     $args = array('echo' => 0, 'hierarchical' => 1, 'taxonomy' => 'slide-page');
     $cats_dropdown = wp_dropdown_categories($args);
     $cats = array();
     // Quick string hack to make sure we get the pages with the indents.
     $cats_dropdown = str_replace("<select name='cat' id='cat' class='postform' >", '', $cats_dropdown);
     $cats_dropdown = str_replace('</select>', '', $cats_dropdown);
     $cats_split = explode('</option>', $cats_dropdown);
     $cats[] = __('Select a Slide Group:', 'woothemes');
     foreach ($cats_split as $k => $v) {
         $id = '';
         // Get the ID value.
         preg_match('/value="(.*?)"/i', $v, $matches);
         if (isset($matches[1])) {
             $id = $matches[1];
             $cats[$id] = trim(strip_tags($v));
         }
     }
     $slide_groups = $cats;
     // Below are the various theme options fields.
     $options = array();
     $other_entries = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19');
     $other_entries_multiples = array('3' => '3', '6' => '6', '9' => '9', '12' => '12', '15' => '15');
     /* General */
     $options[] = array('name' => __('General Settings', 'woothemes'), 'type' => 'heading', 'icon' => 'general');
     $options[] = array('name' => __('Quick Start', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Theme Stylesheet', 'woothemes'), 'desc' => __('Select your themes alternative color scheme.', 'woothemes'), 'id' => $shortname . '_alt_stylesheet', 'std' => 'default.css', 'type' => 'select', 'options' => $alt_stylesheets);
     $options[] = array('name' => __('Custom Logo', 'woothemes'), 'desc' => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), 'id' => $shortname . '_logo', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Text Title', 'woothemes'), 'desc' => sprintf(__('Enable text-based Site Title and Tagline. Setup title & tagline in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/options-general.php">' . __('General Settings', 'woothemes') . '</a>'), 'id' => $shortname . '_texttitle', 'std' => 'false', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Title', 'woothemes'), 'desc' => __('Change the site title typography.', 'woothemes'), 'id' => $shortname . '_font_site_title', 'std' => array('size' => '36', 'unit' => 'px', 'face' => 'Droid Serif', 'style' => '', 'color' => '#333333'), 'class' => 'hidden', 'type' => 'typography');
     $options[] = array('name' => __('Site Description', 'woothemes'), 'desc' => __('Enable the site description/tagline under site title.', 'woothemes'), 'id' => $shortname . '_tagline', 'class' => 'hidden', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Site Description', 'woothemes'), 'desc' => __('Change the site description typography.', 'woothemes'), 'id' => $shortname . '_font_tagline', 'std' => array('size' => '12', 'unit' => 'px', 'face' => 'Droid Sans', 'style' => '', 'color' => '#999999'), 'class' => 'hidden last', 'type' => 'typography');
     $options[] = array('name' => __('Custom Favicon', 'woothemes'), 'desc' => sprintf(__('Upload a 16px x 16px %1$s that will represent your website\'s favicon.', 'woothemes'), '<a href="http://www.faviconr.com/">' . __('ico image', 'woothemes') . '</a>'), 'id' => $shortname . '_custom_favicon', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Tracking Code', 'woothemes'), 'desc' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), 'id' => $shortname . '_google_analytics', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Subscription Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('RSS URL', 'woothemes'), 'desc' => __('Enter your preferred RSS URL. (Feedburner or other)', 'woothemes'), 'id' => $shortname . '_feed_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('E-Mail Subscription URL', 'woothemes'), 'desc' => __('Enter your preferred E-mail subscription URL. (Feedburner or other)', 'woothemes'), 'id' => $shortname . '_subscribe_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Display Options', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Custom CSS', 'woothemes'), 'desc' => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), 'id' => $shortname . '_custom_css', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Post Content', 'woothemes'), 'desc' => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), 'id' => $shortname . '_post_content', 'type' => 'select2', 'options' => array('excerpt' => __('The Excerpt', 'woothemes'), 'content' => __('Full Content', 'woothemes')));
     $options[] = array('name' => __('Post Author Box', 'woothemes'), 'desc' => sprintf(__('This will enable the post author box on the single posts page. Edit description in %1$s.', 'woothemes'), '<a href="' . esc_url(home_url()) . '/wp-admin/profile.php">' . __('Profile', 'woothemes') . '</a>'), 'id' => $shortname . '_post_author', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Breadcrumbs', 'woothemes'), 'desc' => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), 'id' => $shortname . '_breadcrumbs_show', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Pagination', 'woothemes'), 'desc' => __('Display pagination on the blog.', 'woothemes'), 'id' => $shortname . '_pagenav_show', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Pagination Style', 'woothemes'), 'desc' => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), 'id' => $shortname . '_pagination_type', 'type' => 'select2', 'options' => array('paginated_links' => __('Numbers', 'woothemes'), 'simple' => __('Next/Previous', 'woothemes')));
     /* Styling */
     $options[] = array('name' => __('Styling', 'woothemes'), 'type' => 'heading', 'icon' => 'styling');
     $options[] = array('name' => __('Background', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Body Background Color', 'woothemes'), 'desc' => __('Pick a custom color for background color of the theme e.g. #697e09', 'woothemes'), 'id' => $shortname . '_body_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Body background image', 'woothemes'), 'desc' => __('Upload an image for the theme\'s background', 'woothemes'), 'id' => $shortname . '_body_img', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Background image repeat', 'woothemes'), 'desc' => __('Select how you would like to repeat the background-image', 'woothemes'), 'id' => $shortname . '_body_repeat', 'std' => 'no-repeat', 'type' => 'select', 'options' => array('no-repeat', 'repeat-x', 'repeat-y', 'repeat'));
     $options[] = array('name' => __('Background image position', 'woothemes'), 'desc' => __('Select how you would like to position the background', 'woothemes'), 'id' => $shortname . '_body_pos', 'std' => 'top', 'type' => 'select', 'options' => array('top left', 'top center', 'top right', 'center left', 'center center', 'center right', 'bottom left', 'bottom center', 'bottom right'));
     $options[] = array('name' => __('Background Attachment', 'woothemes'), 'desc' => __('Select whether the background should be fixed or move when the user scrolls', 'woothemes'), 'id' => $shortname . '_body_attachment', 'std' => 'scroll', 'type' => 'select', 'options' => array('scroll', 'fixed'));
     $options[] = array('name' => __('Links', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Link Color', 'woothemes'), 'desc' => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Link Hover Color', 'woothemes'), 'desc' => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_link_hover_color', 'std' => '', 'type' => 'color');
     $options[] = array('name' => __('Button Color', 'woothemes'), 'desc' => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), 'id' => $shortname . '_button_color', 'std' => '', 'type' => 'color');
     /* Typography */
     $options[] = array('name' => __('Typography', 'woothemes'), 'type' => 'heading', 'icon' => 'typography');
     $options[] = array('name' => __('Enable Custom Typography', 'woothemes'), 'desc' => __('Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes'), 'id' => $shortname . '_typography', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('General Typography', 'woothemes'), 'desc' => __('Change the general font.', 'woothemes'), 'id' => $shortname . '_font_body', 'std' => array('size' => '1.4', 'unit' => 'em', 'face' => 'FontSiteSans-Roman', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Navigation', 'woothemes'), 'desc' => __('Change the navigation font.', 'woothemes'), 'id' => $shortname . '_font_nav', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Page Title', 'woothemes'), 'desc' => __('Change the page title.', 'woothemes'), 'id' => $shortname . '_font_page_title', 'std' => array('size' => '2.2', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Title', 'woothemes'), 'desc' => __('Change the post title.', 'woothemes'), 'id' => $shortname . '_font_post_title', 'std' => array('size' => '2.2', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Meta', 'woothemes'), 'desc' => __('Change the post meta.', 'woothemes'), 'id' => $shortname . '_font_post_meta', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Post Entry', 'woothemes'), 'desc' => __('Change the post entry.', 'woothemes'), 'id' => $shortname . '_font_post_entry', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'BergamoStd', 'style' => '', 'color' => '#3E3E3E'), 'type' => 'typography');
     $options[] = array('name' => __('Widget Titles', 'woothemes'), 'desc' => __('Change the widget titles.', 'woothemes'), 'id' => $shortname . '_font_widget_titles', 'std' => array('size' => '1', 'unit' => 'em', 'face' => 'FontSiteSans-Cond', 'style' => 'bold', 'color' => '#3E3E3E'), 'type' => 'typography');
     /* Layout */
     $options[] = array('name' => __('Layout', 'woothemes'), 'type' => 'heading', 'icon' => 'layout');
     $options[] = array('name' => __('Global Layout', 'woothemes'), 'type' => 'subheading');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Main Layout', 'woothemes'), 'desc' => __('Select which layout you want for your site.', 'woothemes'), 'id' => $shortname . '_site_layout', 'std' => 'layout-left-content', 'type' => 'images', 'options' => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array('name' => __('Business Template', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Display WooSlider', 'woothemes'), 'desc' => sprintf(__('Display a slider above the page content? Requires %sWooSlider%s plugin.', 'woothemes'), '<a href="http://www.woothemes.com/products/wooslider/" title="' . __('Purchase WooSlider from WooThemes.com', 'woothemes') . '" target="_blank">', '</a>'), 'id' => $shortname . '_business_display_slider', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Features', 'woothemes'), 'desc' => sprintf(__('Display Features beneath the page content? Requires %sFeatures%s plugin.', 'woothemes'), '<a href="http://wordpress.org/extend/plugins/features-by-woothemes/" title="' . __('Download \'Features by WooThemes\' from WordPress.org', 'woothemes') . '" target="_blank">', '</a>'), 'id' => $shortname . '_business_display_features', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display Testimonials', 'woothemes'), 'desc' => sprintf(__('Display testimonials beneath the page content? Requires %sTestimonials%s plugin.', 'woothemes'), '<a href="http://wordpress.org/extend/plugins/testimonials-by-woothemes/" title="' . __('Download \'Testimonials by WooThemes\' from WordPress.org', 'woothemes') . '" target="_blank">', '</a>'), 'id' => $shortname . '_business_display_testimonials', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Display latest blog posts and sidebar', 'woothemes'), 'desc' => __('Display your latest blog posts and primary sidebar beneath the business template content', 'woothemes'), 'id' => $shortname . '_business_display_blog', 'std' => 'true', 'type' => 'checkbox');
     /* Footer */
     $options[] = array('name' => __('Footer', 'woothemes'), 'type' => 'subheading');
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array('name' => __('Footer Widget Areas', 'woothemes'), 'desc' => __('Select how many footer widget areas you want to display.', 'woothemes'), 'id' => $shortname . '_footer_sidebars', 'std' => '4', 'type' => 'images', 'options' => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array('name' => __('Enable Custom Footer (Top)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_top', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Top)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_top_text', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Custom Footer (Bottom)', 'woothemes'), 'desc' => __('Activate to add the custom text below to the theme footer.', 'woothemes'), 'id' => $shortname . '_footer_bottom', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Custom Text (Bottom)', 'woothemes'), 'desc' => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), 'id' => $shortname . '_footer_bottom_text', 'std' => '', 'type' => 'textarea');
     /* Homepage */
     $options[] = array('name' => __('Homepage', 'woothemes'), 'icon' => 'homepage', 'type' => 'heading');
     /* Intro Message */
     $options[] = array('name' => __('Introductory Message', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Introductory Message Heading', 'woothemes'), 'desc' => __('Introductory message heading.', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_heading', 'std' => __('Welcome to Hub, a new WordPress theme by WooThemes', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Introductory Message Content', 'woothemes'), 'desc' => __('Introductory message content', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_content', 'std' => __('This is your message content!', 'woothemes'), 'type' => 'textarea');
     $options[] = array('name' => __('Introductory Message Button Label', 'woothemes'), 'desc' => __('Introductory Message Button Label', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_button_label', 'std' => __('Show me more', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Introductory Message Button URL', 'woothemes'), 'desc' => __('Introductory Message Button URL', 'woothemes'), 'id' => $shortname . '_homepage_intro_message_button_url', 'std' => '#', 'type' => 'text');
     /* Popular Posts */
     $options[] = array('name' => __('Popular Posts', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Popular Posts section.', 'woothemes'), 'id' => $shortname . '_homepage_popular_posts_title', 'std' => __('Most Commented Posts', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Popular Posts section.', 'woothemes'), 'id' => $shortname . '_homepage_popular_posts_byline', 'std' => __('Popular Posts', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Period of Time', 'woothemes'), 'desc' => __('Limit Popular Posts to a spefic period of time.', 'woothemes'), 'id' => $shortname . '_homepage_popular_posts_period', 'std' => 'week', 'type' => 'select2', 'options' => array('week' => __('Last Week', 'woothemes'), 'month' => __('Last Month', 'woothemes'), 'year' => __('Last Year', 'woothemes')));
     $options[] = array('name' => __('Number of Popular Posts', 'woothemes'), 'desc' => __('Number of Popular Posts to display.', 'woothemes'), 'id' => $shortname . '_homepage_popular_posts_number', 'std' => '3', 'type' => 'select2', 'options' => $other_entries_multiples);
     /* Testimonials */
     $options[] = array('name' => __('Testimonials', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Testimonials section.', 'woothemes'), 'id' => $shortname . '_homepage_testimonials_title', 'std' => __('What others are saying', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Testimonials section.', 'woothemes'), 'id' => $shortname . '_homepage_testimonials_byline', 'std' => __('Testimonials', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Background Image', 'woothemes'), 'desc' => __('Upload a background image for this section.', 'woothemes'), 'id' => $shortname . '_homepage_testimonials_bg', 'std' => '', 'type' => 'upload');
     $options[] = array('name' => __('Number of Testimonials', 'woothemes'), 'desc' => __('Number of Testimonials to display.', 'woothemes'), 'id' => $shortname . '_homepage_testimonials_number', 'std' => '5', 'type' => 'select2', 'options' => $other_entries);
     /* Sensei */
     if (class_exists('Woothemes_Sensei')) {
         $options[] = array('name' => __('Sensei', 'woothemes'), 'type' => 'subheading');
         $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Sensei section.', 'woothemes'), 'id' => $shortname . '_homepage_sensei_title', 'std' => __('Featured Courses', 'woothemes'), 'type' => 'text');
         $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Sensei section.', 'woothemes'), 'id' => $shortname . '_homepage_sensei_byline', 'std' => __('Learn', 'woothemes'), 'type' => 'text');
     }
     /* Recent Posts */
     $options[] = array('name' => __('Recent Posts', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Recent Posts section.', 'woothemes'), 'id' => $shortname . '_homepage_recent_posts_title', 'std' => __('From the Hub', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Recent Posts section.', 'woothemes'), 'id' => $shortname . '_homepage_recent_posts_byline', 'std' => __('Discover', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Number of Recent Posts', 'woothemes'), 'desc' => __('Number of Recent Posts to display.', 'woothemes'), 'id' => $shortname . '_homepage_recent_posts_number', 'std' => '9', 'type' => 'select2', 'options' => array('6' => '6', '9' => '9', '12' => '12', '15' => '15', '18' => '18'));
     /* Our Team */
     $options[] = array('name' => __('Our Team', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Our Team section.', 'woothemes'), 'id' => $shortname . '_homepage_our_team_title', 'std' => __('Who\'s Writing', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Our Team section.', 'woothemes'), 'id' => $shortname . '_homepage_our_team_byline', 'std' => __('Our Team', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Number of Team Members', 'woothemes'), 'desc' => __('Number of Team Members to display.', 'woothemes'), 'id' => $shortname . '_homepage_our_team_number', 'std' => '5', 'type' => 'select2', 'options' => array('5', '10', '15'));
     /* Featured Products */
     $options[] = array('name' => __('Featured Products', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Section Title', 'woothemes'), 'desc' => __('Title for the Featured Products section.', 'woothemes'), 'id' => $shortname . '_homepage_featured_products_title', 'std' => __('Staff Picks', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Section Byline', 'woothemes'), 'desc' => __('Byline for the Featured Productts section.', 'woothemes'), 'id' => $shortname . '_homepage_featured_products_byline', 'std' => __('Featured Products', 'woothemes'), 'type' => 'text');
     $options[] = array('name' => __('Number of Featured Products', 'woothemes'), 'desc' => __('Number of Featured Products to display.', 'woothemes'), 'id' => $shortname . '_homepage_featured_products_number', 'std' => '5', 'type' => 'select2', 'options' => array('5', '10', '15'));
     /* WooCommerce */
     if (is_woocommerce_activated()) {
         $options[] = array('name' => __('WooCommerce', 'woothemes'), 'type' => 'heading', 'icon' => 'woocommerce');
         $options[] = array('name' => __('Custom Placeholder', 'woothemes'), 'desc' => __('Upload a custom placeholder to be displayed when there is no product image.', 'woothemes'), 'id' => $shortname . '_placeholder_url', 'std' => '', 'type' => 'upload');
         $options[] = array('name' => __('Header Cart Link', 'woothemes'), 'desc' => __('Display a link to the cart in the main navigation', 'woothemes'), 'id' => $shortname . 'commerce_header_cart_link', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Shop Archives Full Width', 'woothemes'), 'desc' => __('Display the product archives in a full-width single column format? (The sidebar is removed).', 'woothemes'), 'id' => $shortname . 'commerce_archives_fullwidth', 'std' => 'true', 'type' => 'checkbox');
         $options[] = array('name' => __('Product Details Full Width', 'woothemes'), 'desc' => __('Display the product details in a full-width single column format? (The sidebar is removed).'), 'id' => $shortname . 'commerce_products_fullwidth', 'std' => 'false', 'type' => 'checkbox');
     }
     /* Dynamic Images */
     $options[] = array('name' => __('Dynamic Images', 'woothemes'), 'type' => 'heading', 'icon' => 'image');
     $options[] = array('name' => __('Resizer Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Dynamic Image Resizing', 'woothemes'), 'desc' => '', 'id' => $shortname . '_wpthumb_notice', "std" => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>WP Post Thumbnail</strong> (default) or <strong>TimThumb</strong>.', 'woothemes'), 'type' => 'info');
     $options[] = array('name' => __('WP Post Thumbnail', 'woothemes'), 'desc' => __('Use WordPress post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), 'id' => $shortname . '_post_image_support', 'std' => 'true', 'class' => 'collapsed', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Dynamic Image Resizing', 'woothemes'), 'desc' => __('The post thumbnail will be dynamically resized using native WP resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), 'id' => $shortname . '_pis_resize', 'std' => 'true', 'class' => 'hidden', 'type' => 'checkbox');
     $options[] = array('name' => __('WP Post Thumbnail - Hard Crop', 'woothemes'), 'desc' => __('The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes'), 'id' => $shortname . '_pis_hard_crop', 'std' => 'true', 'class' => 'hidden last', 'type' => 'checkbox');
     $options[] = array('name' => __('TimThumb', 'woothemes'), "desc" => __('This will enable the <a href="http://code.google.com/p/timthumb/">TimThumb</a> (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel</strong>  below the post editor. Make sure your themes <em>cache</em> folder is writable. <a href="http://docs.woothemes.com/document/docs-featured-images/">Need help?</a>', 'woothemes'), 'id' => $shortname . '_resize', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Automatic Image Thumbnail', 'woothemes'), 'desc' => __('If no thumbnail is specified then the first uploaded image in the post is used.', 'woothemes'), 'id' => $shortname . '_auto_img', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Thumbnail Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Thumbnail Image Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'type' => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 825, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 350, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnails with posts.', 'woothemes'), 'id' => $shortname . '_thumb_align', 'std' => 'aligncenter', 'type' => 'select2', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Single Post - Show Thumbnail', 'woothemes'), 'desc' => __('Show the thumbnail in the single post page.', 'woothemes'), 'id' => $shortname . '_thumb_single', 'class' => 'collapsed', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Single Post - Thumbnail Dimensions', 'woothemes'), 'desc' => __('Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes'), 'id' => $shortname . '_image_dimensions', 'std' => '', 'class' => 'hidden last', 'type' => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 825, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 350, 'meta' => __('Height', 'woothemes'))));
     $options[] = array('name' => __('Single Post - Thumbnail Alignment', 'woothemes'), 'desc' => __('Select how to align your thumbnail with single posts.', 'woothemes'), 'id' => $shortname . '_thumb_single_align', 'std' => 'aligncenter', 'type' => 'select2', 'class' => 'hidden', 'options' => array('alignleft' => __('Left', 'woothemes'), 'alignright' => __('Right', 'woothemes'), 'aligncenter' => __('Center', 'woothemes')));
     $options[] = array('name' => __('Add Featured Image to RSS feed', 'woothemes'), 'desc' => __('Add the featured image to your RSS feed', 'woothemes'), 'id' => $shortname . '_rss_thumb', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Enable Lightbox', 'woothemes'), 'desc' => __('Enable the PrettyPhoto lightbox script on images within your website\'s content.', 'woothemes'), 'id' => $shortname . '_enable_lightbox', 'std' => 'false', 'type' => 'checkbox');
     /* Subscribe & Connect */
     $options[] = array('name' => __('Subscribe & Connect', 'woothemes'), 'type' => 'heading', 'icon' => 'connect');
     $options[] = array('name' => __('Setup', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Text', 'woothemes'), 'desc' => __('Change the default text in this area.', 'woothemes'), 'id' => $shortname . '_connect_content', 'std' => '', 'type' => 'textarea');
     $options[] = array('name' => __('Enable Related Posts', 'woothemes'), 'desc' => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), 'id' => $shortname . '_connect_related', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Subscribe Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s for the e-mail subscription form.', 'woothemes'), '<a href="http://www.woothemes.com/tutorials/how-to-find-your-feedburner-id-for-email-subscription/">' . __('Feedburner ID', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_newsletter_id', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Subscribe By E-mail to MailChimp', 'woothemes', 'woothemes'), 'desc' => sprintf(__('If you have a MailChimp account you can enter the %1$s to allow your users to subscribe to a MailChimp List.', 'woothemes'), '<a href="http://woochimp.heroku.com" target="_blank">' . __('MailChimp List Subscribe URL', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_mailchimp_list_url', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Connect Settings', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Enable RSS', 'woothemes'), 'desc' => __('Enable the subscribe and RSS icon.', 'woothemes'), 'id' => $shortname . '_connect_rss', 'std' => 'true', 'type' => 'checkbox');
     $options[] = array('name' => __('Twitter URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.twitter.com/woothemes', 'woothemes'), '<a href="http://www.twitter.com/">' . __('Twitter', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_twitter', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Facebook URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.facebook.com/woothemes', 'woothemes'), '<a href="http://www.facebook.com/">' . __('Facebook', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_facebook', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('YouTube URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.youtube.com/woothemes', 'woothemes'), '<a href="http://www.youtube.com/">' . __('YouTube', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_youtube', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Flickr URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.flickr.com/woothemes', 'woothemes'), '<a href="http://www.flickr.com/">' . __('Flickr', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_flickr', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('LinkedIn URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), '<a href="http://www.www.linkedin.com.com/">' . __('LinkedIn', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_linkedin', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Delicious URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://www.delicious.com/woothemes', 'woothemes'), '<a href="http://www.delicious.com/">' . __('Delicious', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_delicious', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Google+ URL', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), '<a href="http://plus.google.com/">' . __('Google+', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_googleplus', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Dribbble', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://dribbble.com/woothemes', 'woothemes'), '<a href="http://dribbble.com/">' . __('Dribbble', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_dribbble', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Instagram', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://instagram.com/woothemes', 'woothemes'), '<a href="http://instagram.com">' . __('Instagram', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_instagram', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Vimeo', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://vimeo.com/woothemes', 'woothemes'), '<a href="http://vimeo.com/">' . __('Vimeo', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_vimeo', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Pinterest', 'woothemes'), 'desc' => sprintf(__('Enter your %1$s URL e.g. http://pinterest.com/woothemes', 'woothemes'), '<a href="http://pinterest.com/">' . __('Pinterest', 'woothemes') . '</a>'), 'id' => $shortname . '_connect_pinterest', 'std' => '', 'type' => 'text');
     /* Contact Template Settings */
     $options[] = array('name' => __('Contact Page', 'woothemes'), 'icon' => 'maps', 'type' => 'heading');
     $options[] = array('name' => __('Contact Information', 'woothemes'), 'type' => 'subheading');
     $options[] = array("name" => __('Contact Information Panel', 'woothemes'), "desc" => __('Enable the contact information panel on your contact page template.', 'woothemes'), "id" => $shortname . "_contact_panel", "std" => "false", "class" => 'collapsed', "type" => "checkbox");
     $options[] = array('name' => __('Location Name', 'woothemes'), 'desc' => __('Enter the location name. Example: London Office', 'woothemes'), 'id' => $shortname . '_contact_title', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Location Address', 'woothemes'), 'desc' => __("Enter your company's address", 'woothemes'), 'id' => $shortname . '_contact_address', 'std' => '', 'class' => 'hidden', 'type' => 'textarea');
     $options[] = array('name' => __('Telephone', 'woothemes'), 'desc' => __('Enter your telephone number', 'woothemes'), 'id' => $shortname . '_contact_number', 'std' => '', 'class' => 'hidden', 'type' => 'text');
     $options[] = array('name' => __('Fax', 'woothemes'), 'desc' => __('Enter your fax number', 'woothemes'), 'id' => $shortname . '_contact_fax', 'std' => '', 'class' => 'hidden last', 'type' => 'text');
     $options[] = array('name' => __('Contact Form E-Mail', 'woothemes'), 'desc' => __("Enter your E-mail address to use on the 'Contact Form' page Template.", 'woothemes'), 'id' => $shortname . '_contactform_email', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Enable Subscribe and Connect', 'woothemes'), 'desc' => __('Enable the subscribe and connect functionality on the contact page template', 'woothemes'), 'id' => $shortname . '_contact_subscribe_and_connect', 'std' => 'false', 'type' => 'checkbox');
     $options[] = array('name' => __('Maps', 'woothemes'), 'type' => 'subheading');
     $options[] = array('name' => __('Contact Form Google Maps Coordinates', 'woothemes'), 'desc' => sprintf(__('Enter your Google Map coordinates to display a map on the Contact Form page template and a link to it on the Contact Us widget. You can get these details from %1$s', 'woothemes'), '<a href="http://itouchmap.com/latlong.html" target="_blank">Google Maps</a>'), 'id' => $shortname . '_contactform_map_coords', 'std' => '', 'type' => 'text');
     $options[] = array('name' => __('Disable Mousescroll', 'woothemes'), 'desc' => __('Turn off the mouse scroll action for all the Google Maps on the site. This could improve usability on your site.', 'woothemes'), 'id' => $shortname . '_maps_scroll', 'std' => '', 'type' => 'checkbox');
     $options[] = array('name' => __('Map Height', 'woothemes'), 'desc' => __('Height in pixels for the maps displayed on Single.php pages.', 'woothemes'), 'id' => $shortname . '_maps_single_height', 'std' => '250', 'type' => 'text');
     $options[] = array('name' => __('Default Map Zoom Level', 'woothemes'), 'desc' => __('Set this to adjust the default in the post & page edit backend.', 'woothemes'), 'id' => $shortname . '_maps_default_mapzoom', 'std' => '9', 'type' => 'select2', 'options' => $other_entries);
     $options[] = array('name' => __('Default Map Type', 'woothemes'), 'desc' => __('Set this to the default rendered in the post backend.', 'woothemes'), 'id' => $shortname . '_maps_default_maptype', 'std' => 'G_NORMAL_MAP', 'type' => 'select2', 'options' => array('G_NORMAL_MAP' => __('Normal', 'woothemes'), 'G_SATELLITE_MAP' => __('Satellite', 'woothemes'), 'G_HYBRID_MAP' => __('Hybrid', 'woothemes'), 'G_PHYSICAL_MAP' => __('Terrain', 'woothemes')));
     $options[] = array('name' => __('Map Callout Text', 'woothemes'), 'desc' => __('Text or HTML that will be output when you click on the map marker for your location.', 'woothemes'), 'id' => $shortname . '_maps_callout_text', 'std' => '', 'type' => 'textarea');
     // Add extra options through function
     if (function_exists('woo_options_add')) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     global $post;
     $woo_metaboxes = array();
     // Shown on both posts and pages
     // Show only on specific post types or page
     if (get_post_type() == 'post' || !get_post_type()) {
         // TimThumb is enabled in options
         if (get_option('woo_resize') == 'true') {
             $woo_metaboxes[] = array('name' => 'image', 'label' => __('Image', 'woothemes'), 'type' => 'upload', 'desc' => __('Upload an image or enter an URL.', 'woothemes'));
             $woo_metaboxes[] = array('name' => '_image_alignment', 'std' => __('Center', 'woothemes'), 'label' => __('Image Crop Alignment', 'woothemes'), 'type' => 'select2', 'desc' => __('Select crop alignment for resized image', 'woothemes'), 'options' => array('c' => 'Center', 't' => 'Top', 'b' => 'Bottom', 'l' => 'Left', 'r' => 'Right'));
             // TimThumb disabled in the options
         } else {
             $woo_metaboxes[] = array('name' => '_timthumb-info', 'label' => __('Image', 'woothemes'), 'type' => 'info', 'desc' => sprintf(__('%1$s is disabled. Use the %2$s panel in the sidebar instead, or enable TimThumb in the options panel.', 'woothemes'), '<strong>' . __('TimThumb', 'woothemes') . '</strong>', '<strong>' . __('Featured Image', 'woothemes') . '</strong>'));
         }
         $woo_metaboxes[] = array('name' => 'embed', 'std' => '', 'label' => __('Embed Code', 'woothemes'), 'type' => 'textarea', 'desc' => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End post
     $woo_metaboxes[] = array('name' => '_layout', 'std' => 'normal', 'label' => __('Layout', 'woothemes'), 'type' => 'images', 'desc' => __('Select the layout you want on this specific post/page.', 'woothemes'), 'options' => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array('name' => 'url', 'label' => __('Slide URL', 'woothemes'), 'type' => 'text', 'desc' => sprintf(__('Enter an URL to link the slider title to a page e.g. %s (optional)', 'woothemes'), 'http://yoursite.com/pagename/'));
         $woo_metaboxes[] = array('name' => 'embed', 'std' => '', 'label' => __('Embed Code', 'woothemes'), 'type' => 'textarea', 'desc' => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End Slide
     // Add extra metaboxes through function
     if (function_exists('woo_metaboxes_add')) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }
示例#15
0
function woo_options()
{
    // VARIABLES
    $themename = "Snapshot";
    $manualurl = 'http://www.woothemes.com/support/theme-documentation/snapshot/';
    $shortname = "woo";
    $GLOBALS['template_path'] = get_bloginfo('template_directory');
    //Access the WordPress Categories via an Array
    $woo_categories = array();
    $woo_categories_obj = get_categories('hide_empty=0');
    foreach ($woo_categories_obj as $woo_cat) {
        $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
    }
    $categories_tmp = array_unshift($woo_categories, "Select a category:");
    //Access the WordPress Pages via an Array
    $woo_pages = array();
    $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
    foreach ($woo_pages_obj as $woo_page) {
        $woo_pages[$woo_page->ID] = $woo_page->post_name;
    }
    $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
    //Stylesheets Reader
    $alt_stylesheet_path = TEMPLATEPATH . '/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
    $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");
    $layouts = array("1-photo.php", "2-gallery.php");
    // THIS IS THE DIFFERENT FIELDS
    $options = array();
    $options[] = array("name" => "General Settings", "type" => "heading");
    $options[] = array("name" => "Theme Stylesheet", "desc" => "Select your themes alternative color scheme.", "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
    $options[] = array("name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify an image URL directly.", "id" => $shortname . "_logo", "std" => "", "type" => "upload");
    $options[] = array("name" => "Custom Favicon", "desc" => "Upload a 16px x 16px <a href='http://www.faviconr.com/'>ico image</a> that will represent your website's favicon.", "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
    $options[] = array("name" => "Tracking 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");
    $options[] = array("name" => "Enable Dynamic Image Resizer", "desc" => "This will enable the thumb.php script. It dynamically resizes images on your site.", "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
    $options[] = array("name" => "RSS URL", "desc" => "Enter your preferred RSS URL. (Feedburner or other)", "id" => $shortname . "_feedburner_url", "std" => "", "type" => "text");
    $options[] = array("name" => "Custom CSS", "desc" => "Quickly add some CSS to your theme by adding it to this block.", "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
    $options[] = array("name" => "Layout Settings", "type" => "heading");
    $options[] = array("name" => "Photo or Design Gallery?", "desc" => "Select whether you are using this as a showcase of your own photos or a gallery of others designs.", "id" => $shortname . "_layout", "std" => "", "type" => "select", "options" => $layouts);
    // Add extra options through function
    if (function_exists("woo_options_add")) {
        $options = woo_options_add($options);
    }
    if (get_option('woo_template') != $options) {
        update_option('woo_template', $options);
    }
    if (get_option('woo_themename') != $themename) {
        update_option('woo_themename', $themename);
    }
    if (get_option('woo_shortname') != $shortname) {
        update_option('woo_shortname', $shortname);
    }
    if (get_option('woo_manual') != $manualurl) {
        update_option('woo_manual', $manualurl);
    }
    // Woo Metabox Options
    $woo_metaboxes = array("image" => array("name" => "image", "default" => "", "label" => "Screenshot (330x190)", "type" => "upload"), "large-image" => array("name" => "large-image", "default" => "", "label" => "Large Image (Max Width: 690px)", "type" => "upload"), "url" => array("name" => "url", "default" => "", "label" => "Website URL", "type" => "text"));
    // Add extra metaboxes through function
    if (function_exists("woo_metaboxes_add")) {
        $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
    }
    if (get_option('woo_custom_template') != $woo_metaboxes) {
        update_option('woo_custom_template', $woo_metaboxes);
    }
    /*
    function woo_update_options(){
            $options = get_option('woo_template',$options);  
            foreach ($options as $option){
                update_option($option['id'],$option['std']);
            }   
    }
    
    function woo_add_options(){
            $options = get_option('woo_template',$options);  
            foreach ($options as $option){
                update_option($option['id'],$option['std']);
            }   
    }
    
    
    //add_action('switch_theme', 'woo_update_options'); 
    if(get_option('template') == 'wooframework'){       
        woo_add_options();
    } // end function 
    */
}
示例#16
0
 function woo_options()
 {
     // THEME VARIABLES
     $themename = "Swatch";
     $themeslug = "swatch";
     // STANDARD VARIABLES. DO NOT TOUCH!
     $shortname = "woo";
     $manualurl = 'http://www.woothemes.com/support/theme-documentation/' . $themeslug . '/';
     //Access the NXTClass Categories via an Array
     $woo_categories = array();
     $woo_categories_obj = get_categories('hide_empty=0');
     foreach ($woo_categories_obj as $woo_cat) {
         $woo_categories[$woo_cat->cat_ID] = $woo_cat->cat_name;
     }
     $categories_tmp = array_unshift($woo_categories, "Select a category:");
     //Access the NXTClass Pages via an Array
     $woo_pages = array();
     $woo_pages_obj = get_pages('sort_column=post_parent,menu_order');
     foreach ($woo_pages_obj as $woo_page) {
         $woo_pages[$woo_page->ID] = $woo_page->post_name;
     }
     $woo_pages_tmp = array_unshift($woo_pages, "Select a page:");
     //Stylesheets Reader
     $alt_stylesheet_path = get_template_directory() . '/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
     $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");
     //URL Shorteners
     if (_iscurlinstalled()) {
         $options_select = array("Off", "TinyURL", "Bit.ly");
         $short_url_msg = 'Select the URL shortening service you would like to use.';
     } else {
         $options_select = array("Off");
         $short_url_msg = '<strong>cURL was not detected on your server, and is required in order to use the URL shortening services.</strong>';
     }
     // Setup an array of pages for a dropdown.
     $args = array('echo' => 0);
     $pages_dropdown = nxt_dropdown_pages($args);
     $pages = array();
     // Quick string hack to make sure we get the pages with the indents.
     $pages_dropdown = str_replace('<select name="page_id" id="page_id">', '', $pages_dropdown);
     $pages_dropdown = str_replace('</select>', '', $pages_dropdown);
     $pages_split = explode('</option>', $pages_dropdown);
     $pages[] = __('Select a Page:', 'woothemes');
     foreach ($pages_split as $k => $v) {
         $id = '';
         // Get the ID value.
         preg_match('/value="(.*?)"/i', $v, $matches);
         if (isset($matches[1])) {
             $id = $matches[1];
             $pages[$id] = trim(strip_tags($v));
         }
     }
     // End FOREACH Loop
     $woo_pages = $pages;
     // THIS IS THE DIFFERENT FIELDS
     $options = array();
     /* General */
     $options[] = array("name" => __('General Settings', 'woothemes'), "type" => "heading", "icon" => "general");
     $options[] = array("name" => __('Theme Stylesheet', 'woothemes'), "desc" => __('Select your themes alternative color scheme.', 'woothemes'), "id" => $shortname . "_alt_stylesheet", "std" => "default.css", "type" => "select", "options" => $alt_stylesheets);
     $options[] = array("name" => __('Custom Logo', 'woothemes'), "desc" => __('Upload a logo for your theme, or specify an image URL directly.', 'woothemes'), "id" => $shortname . "_logo", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Text Title', 'woothemes'), "desc" => sprintf(__('Enable text-based Site Title and Tagline. Setup title & tagline in %1$s.', 'woothemes'), '<a href="' . home_url() . '/nxt-admin/options-general.php">' . __('General Settings', 'woothemes') . '</a>'), "id" => $shortname . "_texttitle", "std" => "false", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => __('Site Title', 'woothemes'), "desc" => __('Change the site title typography.', 'woothemes'), "id" => $shortname . "_font_site_title", "std" => array('size' => '70', 'unit' => 'px', 'face' => 'StMarie-Thin', 'style' => 'normal', 'color' => '#3E3E3E'), "class" => "hidden", "type" => "typography");
     $options[] = array("name" => __('Site Description', 'woothemes'), "desc" => __('Enable the site description/tagline under site title.', 'woothemes'), "id" => $shortname . "_tagline", "class" => "hidden", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Site Description', 'woothemes'), "desc" => __('Change the site description typography.', 'woothemes'), "id" => $shortname . "_font_tagline", "std" => array('size' => '26', 'unit' => 'px', 'face' => 'BergamoStd-Italic', 'style' => 'italic', 'color' => '#3E3E3E'), "class" => "hidden last", "type" => "typography");
     $options[] = array("name" => __('Custom Favicon', 'woothemes'), "desc" => __('Upload a 16px x 16px <a href="http://www.faviconr.com/">ico image</a> that will represent your website\'s favicon.', 'woothemes'), "id" => $shortname . "_custom_favicon", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Tracking Code', 'woothemes'), "desc" => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'woothemes'), "id" => $shortname . "_google_analytics", "std" => "", "type" => "textarea");
     $options[] = array("name" => __('RSS URL', 'woothemes'), "desc" => __('Enter your preferred RSS URL. (Feedburner or other)', 'woothemes'), "id" => $shortname . "_feed_url", "std" => "", "type" => "text");
     $options[] = array("name" => __('E-Mail Subscription URL', 'woothemes'), "desc" => __('Enter your preferred E-mail subscription URL. (Feedburner or other)', 'woothemes'), "id" => $shortname . "_subscribe_email", "std" => "", "type" => "text");
     $options[] = array("name" => __('Contact Form E-Mail', 'woothemes'), "desc" => __('Enter your E-mail address to use on the Contact Form Page Template. Add the contact form by adding a new page and selecting "Contact Form" as page template.', 'woothemes'), "id" => $shortname . "_contactform_email", "std" => "", "type" => "text");
     $options[] = array("name" => __('Custom CSS', 'woothemes'), "desc" => __('Quickly add some CSS to your theme by adding it to this block.', 'woothemes'), "id" => $shortname . "_custom_css", "std" => "", "type" => "textarea");
     $options[] = array("name" => __('Post/Page Comments', 'woothemes'), "desc" => __('Select if you want to enable/disable comments on posts and/or pages.', 'woothemes'), "id" => $shortname . "_comments", "std" => "both", "type" => "select2", "options" => array("post" => __('Posts Only', 'woothemes'), "page" => __('Pages Only', 'woothemes'), "both" => __('Pages / Posts', 'woothemes'), "none" => __('None', 'woothemes')));
     $options[] = array("name" => __('Post Content', 'woothemes'), "desc" => __('Select if you want to show the full content or the excerpt on posts.', 'woothemes'), "id" => $shortname . "_post_content", "type" => "select2", "options" => array("excerpt" => __('The Excerpt', 'woothemes'), "content" => __('Full Content', 'woothemes')));
     $options[] = array("name" => __('Post Author Box', 'woothemes'), "desc" => sprintf(__('This will enable the post author box on the single posts page. Edit description in %1$s.', 'woothemes'), '<a href="' . home_url() . '/nxt-admin/profile.php">' . __('Profile', 'woothemes') . '</a>'), "id" => $shortname . "_post_author", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Display Breadcrumbs', 'woothemes'), "desc" => __('Display dynamic breadcrumbs on each page of your website.', 'woothemes'), "id" => $shortname . "_breadcrumbs_show", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Pagination Style', 'woothemes'), "desc" => __('Select the style of pagination you would like to use on the blog.', 'woothemes'), "id" => $shortname . "_pagination_type", "type" => "select2", "options" => array("paginated_links" => __('Numbers', 'woothemes'), "simple" => __('Next/Previous', 'woothemes')));
     /* Styling */
     $options[] = array("name" => __('Styling Options', 'woothemes'), "type" => "heading", "icon" => "styling");
     $options[] = array("name" => __('Body Background Color', 'woothemes'), "desc" => __('Pick a custom color for background color of the theme e.g. #697e09', 'woothemes'), "id" => "woo_body_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Body background image', 'woothemes'), "desc" => __('Upload an image for the theme\'s background', 'woothemes'), "id" => $shortname . "_body_img", "std" => "", "type" => "upload");
     $options[] = array("name" => __('Background image repeat', 'woothemes'), "desc" => __('Select how you would like to repeat the background-image', 'woothemes'), "id" => $shortname . "_body_repeat", "std" => "no-repeat", "type" => "select", "options" => array("no-repeat", "repeat-x", "repeat-y", "repeat"));
     $options[] = array("name" => __('Background image position', 'woothemes'), "desc" => __('Select how you would like to position the background', 'woothemes'), "id" => $shortname . "_body_pos", "std" => "top", "type" => "select", "options" => array("top left", "top center", "top right", "center left", "center center", "center right", "bottom left", "bottom center", "bottom right"));
     $options[] = array("name" => __('Link Color', 'woothemes'), "desc" => __('Pick a custom color for links or add a hex color code e.g. #697e09', 'woothemes'), "id" => "woo_link_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Link Hover Color', 'woothemes'), "desc" => __('Pick a custom color for links hover or add a hex color code e.g. #697e09', 'woothemes'), "id" => "woo_link_hover_color", "std" => "", "type" => "color");
     $options[] = array("name" => __('Button Color', 'woothemes'), "desc" => __('Pick a custom color for buttons or add a hex color code e.g. #697e09', 'woothemes'), "id" => "woo_button_color", "std" => "", "type" => "color");
     /* Typography */
     $options[] = array("name" => __('Typography', 'woothemes'), "type" => "heading", "icon" => "typography");
     $options[] = array("name" => __('Enable Custom Typography', 'woothemes'), "desc" => __('Enable the use of custom typography for your site. Custom styling will be output in your sites HEAD.', 'woothemes'), "id" => $shortname . "_typography", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('General Typography', 'woothemes'), "desc" => __('Change the general font.', 'woothemes'), "id" => $shortname . "_font_body", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#444444'), "type" => "typography");
     $options[] = array("name" => __('Navigation', 'woothemes'), "desc" => __('Change the navigation font.', 'woothemes'), "id" => $shortname . "_font_nav", "std" => array('size' => '13', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#FFFFFF'), "type" => "typography");
     $options[] = array("name" => __('Post Title', 'woothemes'), "desc" => __('Change the post title.', 'woothemes'), "id" => $shortname . "_font_post_title", "std" => array('size' => '30', 'unit' => 'px', 'face' => 'Arial', 'style' => 'bold', 'color' => '#444444'), "type" => "typography");
     $options[] = array("name" => __('Post Meta', 'woothemes'), "desc" => __('Change the post meta.', 'woothemes'), "id" => $shortname . "_font_post_meta", "std" => array('size' => '12', 'unit' => 'px', 'face' => 'Lucida Grande', 'style' => '', 'color' => '#444444'), "type" => "typography");
     $options[] = array("name" => __('Post Entry', 'woothemes'), "desc" => __('Change the post entry.', 'woothemes'), "id" => $shortname . "_font_post_entry", "std" => array('size' => '14', 'unit' => 'px', 'face' => 'Arial', 'style' => '', 'color' => '#444444'), "type" => "typography");
     $options[] = array("name" => __('Sidebar Widget Titles', 'woothemes'), "desc" => __('Change the sidebar widget titles.', 'woothemes'), "id" => $shortname . "_font_widget_titles", "std" => array('size' => '16', 'unit' => 'px', 'face' => 'Georgia', 'style' => 'bold', 'color' => '#444444'), "type" => "typography");
     $options[] = array("name" => __('Footer Widget Titles', 'woothemes'), "desc" => __('Change the footer widget titles.', 'woothemes'), "id" => $shortname . "_font_footer_widget_titles", "std" => array('size' => '10', 'unit' => 'px', 'face' => 'Arial', 'style' => 'normal', 'color' => '#AAA8A8'), "type" => "typography");
     /* Layout */
     $options[] = array("name" => __('Layout Options', 'woothemes'), "type" => "heading", "icon" => "layout");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => __('Main Layout', 'woothemes'), "desc" => __('Select which layout you want for your site.', 'woothemes'), "id" => $shortname . "_site_layout", "std" => "layout-left-content", "type" => "images", "options" => array('layout-left-content' => $url . '2cl.png', 'layout-right-content' => $url . '2cr.png'));
     $options[] = array("name" => __('Category Exclude - Homepage', 'woothemes'), "desc" => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your homepage (eg: uncategorized).', 'woothemes'), "id" => $shortname . "_exclude_cats_home", "std" => "", "type" => "text");
     $options[] = array("name" => __('Category Exclude - Blog Page Template', 'woothemes'), "desc" => __('Specify a comma seperated list of category IDs or slugs that you\'d like to exclude from your \'Blog\' page template (eg: uncategorized).', 'woothemes'), "id" => $shortname . "_exclude_cats_blog", "std" => "", "type" => "text");
     /* Slider */
     $options[] = array("name" => __('Homepage Slider', 'woothemes'), "icon" => "slider", "type" => "heading");
     $options[] = array("name" => __('Enable Slider', 'woothemes'), "desc" => __('Enable the slider on the homepage.', 'woothemes'), "id" => $shortname . "_slider", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Slider Entries', 'woothemes'), "desc" => __('Select the number of entries that should appear in the home page slider.', 'woothemes'), "id" => $shortname . "_slider_entries", "std" => "3", "type" => "select", "options" => $other_entries);
     $options[] = array("name" => __('Effect', 'woothemes'), "desc" => __('Select the animation effect.', 'woothemes'), "id" => $shortname . "_slider_effect", "type" => "select2", "options" => array("slide" => __('Slide', 'woothemes'), "fade" => __('Fade', 'woothemes')));
     $options[] = array("name" => __('Hover Pause', 'woothemes'), "desc" => __('Hovering over slideshow will pause it', 'woothemes'), "id" => $shortname . "_slider_hover", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Animation Speed', 'woothemes'), "desc" => __('The time in <b>seconds</b> the animation between frames will take.', 'woothemes'), "id" => $shortname . "_slider_speed", "std" => "0.6", "type" => "select", "options" => array('0.0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '2.0'));
     $options[] = array("name" => __('Auto Start', 'woothemes'), "desc" => __('Set the slider to start sliding automatically.', 'woothemes'), "id" => $shortname . "_slider_auto", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Auto Slide Interval', 'woothemes'), "desc" => __('The time in <b>seconds</b> each slide pauses for, before sliding to the next.', 'woothemes'), "id" => $shortname . "_slider_interval", "std" => "4", "type" => "select", "options" => array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10'));
     $options[] = array("name" => __('Auto Height', 'woothemes'), "desc" => __('Set the slider to adjust automatically depending on the height of the current slide contents.', 'woothemes'), "id" => $shortname . "_slider_autoheight", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Show Title with Image Background', 'woothemes'), "desc" => __('Show the post title when using an image as slider background.', 'woothemes'), "id" => $shortname . "_slider_title", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Show Excerpt with Image Background', 'woothemes'), "desc" => __('Show the post excerpt when using an image as slider background.', 'woothemes'), "id" => $shortname . "_slider_content", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Next/Previous', 'woothemes'), "desc" => __('Select to display next/previous buttons.', 'woothemes'), "id" => $shortname . "_slider_nextprev", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Pagination', 'woothemes'), "desc" => __('Select to display pagination.', 'woothemes'), "id" => $shortname . "_slider_pagination", "std" => "true", "type" => "checkbox");
     /* Homepage */
     $options[] = array("name" => __('Homepage', 'woothemes'), "type" => "heading", 'icon' => 'homepage');
     $options[] = array("name" => __('Mini-Features Area', 'woothemes'), "desc" => __('Enable the front page Mini-Features features area.', 'woothemes'), "id" => $shortname . "_mini_features", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Homepage Content', 'woothemes'), "desc" => __('(Optional) Select a page that you\'d like to display on the front page.', 'woothemes'), "id" => $shortname . "_main_page", "std" => __('Select a page:', 'woothemes'), "type" => "select2", "options" => $woo_pages);
     /* Portfolio */
     $options[] = array("name" => __('Portfolio Settings', 'woothemes'), "icon" => "portfolio", "type" => "heading");
     $options[] = array("name" => __('Enable Single Portfolio Gallery', 'woothemes'), "desc" => __('Enable the gallery feature in the single portfolio page layout.', 'woothemes'), "id" => $shortname . "_portfolio_gallery", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Portfolio Items URL Base', 'woothemes'), "desc" => sprintf(__('The base of all portfolio item URLs (visit the %s screen after changing this setting).', 'woothemes'), '<a href="' . admin_url('options-permalink.php') . '">' . __('Settings- Permalinks', 'woothemes') . '</a>'), "id" => $shortname . "_portfolioitems_rewrite", "std" => "portfolio-items", "type" => "text");
     $options[] = array("name" => __('Exclude Galleries from the Portfolio Navigation', 'woothemes'), "desc" => __('Optionally exclude portfolio galleries from the portfolio gallery navigation switcher. Place the gallery slugs here, separated by commas <br />(eg: one,two,three)', 'woothemes'), "id" => $shortname . "_portfolio_excludenav", "std" => "", "type" => "text");
     $options[] = array("name" => __('Portfolio Thumbnail Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the image size.', 'woothemes'), "id" => $shortname . "_portfolio_thumb_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_portfolio_thumb_width', 'type' => 'text', 'std' => 242, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_portfolio_thumb_height', 'type' => 'text', 'std' => 160, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Exclude Portfolio Items from Search Results', 'woothemes'), "desc" => __('Exclude portfolio items from results when searching your website.', 'woothemes'), "id" => $shortname . "_portfolio_excludesearch", "std" => "false", "type" => "checkbox");
     /* Testimonials */
     $options[] = array("name" => __('Feedback Settings', 'woothemes'), "icon" => "misc", "type" => "heading");
     $options[] = array("name" => __('Disable Feedback Manager', 'woothemes'), "desc" => __('Disable the feedback functionality.', 'woothemes'), "id" => $shortname . "_feedback_disable", "std" => "false", "type" => "checkbox");
     /* Dynamic Images */
     $options[] = array("name" => __('Dynamic Images', 'woothemes'), "type" => "heading", "icon" => "image");
     $options[] = array("name" => __('Dynamic Image Resizing', 'woothemes'), "desc" => "", "id" => $shortname . "_nxtthumb_notice", "std" => __('There are two alternative methods of dynamically resizing the thumbnails in the theme, <strong>nxt Post Thumbnail</strong> or <strong>TimThumb - Custom Settings panel</strong>. We recommend using nxt Post Thumbnail option.', 'woothemes'), "type" => "info");
     $options[] = array("name" => __('nxt Post Thumbnail', 'woothemes'), "desc" => __('Use NXTClass post thumbnail to assign a post thumbnail. Will enable the <strong>Featured Image panel</strong> in your post sidebar where you can assign a post thumbnail.', 'woothemes'), "id" => $shortname . "_post_image_support", "std" => "true", "class" => "collapsed", "type" => "checkbox");
     $options[] = array("name" => __('nxt Post Thumbnail - Dynamic Image Resizing', 'woothemes'), "desc" => __('The post thumbnail will be dynamically resized using native nxt resize functionality. <em>(Requires PHP 5.2+)</em>', 'woothemes'), "id" => $shortname . "_pis_resize", "std" => "true", "class" => "hidden", "type" => "checkbox");
     $options[] = array("name" => __('nxt Post Thumbnail - Hard Crop', 'woothemes'), "desc" => __('The post thumbnail will be cropped to match the target aspect ratio (only used if "Dynamic Image Resizing" is enabled).', 'woothemes'), "id" => $shortname . "_pis_hard_crop", "std" => "true", "class" => "hidden last", "type" => "checkbox");
     $options[] = array("name" => __('TimThumb - Custom Settings Panel', 'woothemes'), "desc" => sprintf(__('This will enable the %1$s (thumb.php) script which dynamically resizes images added through the <strong>custom settings panel below the post</strong>. Make sure your themes <em>cache</em> folder is writable. %2$s', 'woothemes'), '<a href="http://code.google.com/p/timthumb/">TimThumb</a>', '<a href="http://www.woothemes.com/2008/10/troubleshooting-image-resizer-thumbphp/">Need help?</a>'), "id" => $shortname . "_resize", "std" => "true", "type" => "checkbox");
     $options[] = array("name" => __('Automatic Image Thumbnail', 'woothemes'), "desc" => __('If no thumbnail is specifified then the first uploaded image in the post is used.', 'woothemes'), "id" => $shortname . "_auto_img", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Thumbnail Image Dimensions', 'woothemes'), "desc" => __('Enter an integer value i.e. 250 for the desired size which will be used when dynamically creating the images.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "type" => array(array('id' => $shortname . '_thumb_w', 'type' => 'text', 'std' => 100, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_thumb_h', 'type' => 'text', 'std' => 100, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Thumbnail Image alignment', 'woothemes'), "desc" => __('Select how to align your thumbnails with posts.', 'woothemes'), "id" => $shortname . "_thumb_align", "std" => "alignright", "type" => "radio", "options" => array("alignleft" => __('Left', 'woothemes'), "alignright" => __('Right', 'woothemes'), "aligncenter" => __('Center', 'woothemes')));
     $options[] = array("name" => __('Show thumbnail in Single Posts', 'woothemes'), "desc" => __('Show the attached image in the single post page.', 'woothemes'), "id" => $shortname . "_thumb_single", "class" => "collapsed", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Single Image Dimensions', 'woothemes'), "desc" => __('"Enter an integer value i.e. 250 for the image size. Max width is 576.', 'woothemes'), "id" => $shortname . "_image_dimensions", "std" => "", "class" => "hidden last", "type" => array(array('id' => $shortname . '_single_w', 'type' => 'text', 'std' => 200, 'meta' => __('Width', 'woothemes')), array('id' => $shortname . '_single_h', 'type' => 'text', 'std' => 200, 'meta' => __('Height', 'woothemes'))));
     $options[] = array("name" => __('Single Post Image alignment', 'woothemes'), "desc" => __('Select how to align your thumbnail with single posts.', 'woothemes'), "id" => $shortname . "_thumb_single_align", "std" => "alignright", "type" => "radio", "class" => "hidden", "options" => array("alignleft" => __('Left', 'woothemes'), "alignright" => __('Right', 'woothemes'), "aligncenter" => __('Center', 'woothemes')));
     $options[] = array("name" => __('Add thumbnail to RSS feed', 'woothemes'), "desc" => __('Add the the image uploaded via your Custom Settings to your RSS feed', 'woothemes'), "id" => $shortname . "_rss_thumb", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Enable Lightbox', 'woothemes'), "desc" => __('Enable the PrettyPhoto lighbox script on images within your website\'s content.', 'woothemes'), "id" => $shortname . "_enable_lightbox", "std" => "false", "type" => "checkbox");
     /* Footer */
     $options[] = array("name" => __('Footer Customization', 'woothemes'), "type" => "heading", "icon" => "footer");
     $options[] = array("name" => __('Title', 'woothemes'), "desc" => __('Add a heading for the widgetized footer regions.', 'woothemes'), "id" => $shortname . "_footer_title", "std" => '', "type" => "text");
     $url = get_template_directory_uri() . '/functions/images/';
     $options[] = array("name" => __('Footer Widget Areas', 'woothemes'), "desc" => __('Select how many footer widget areas you want to display.', 'woothemes'), "id" => $shortname . "_footer_sidebars", "std" => "4", "type" => "images", "options" => array('0' => $url . 'layout-off.png', '1' => $url . 'footer-widgets-1.png', '2' => $url . 'footer-widgets-2.png', '3' => $url . 'footer-widgets-3.png', '4' => $url . 'footer-widgets-4.png'));
     $options[] = array("name" => __('Custom Affiliate Link', 'woothemes'), "desc" => __('Add an affiliate link to the WooThemes logo in the footer of the theme.', 'woothemes'), "id" => $shortname . "_footer_aff_link", "std" => "", "type" => "text");
     $options[] = array("name" => __('Enable Custom Footer (Left)', 'woothemes'), "desc" => __('Activate to add the custom text below to the theme footer.', 'woothemes'), "id" => $shortname . "_footer_left", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Custom Text (Left)', 'woothemes'), "desc" => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), "id" => $shortname . "_footer_left_text", "std" => "", "type" => "textarea");
     $options[] = array("name" => __('Enable Custom Footer (Right)', 'woothemes'), "desc" => __('Activate to add the custom text below to the theme footer.', 'woothemes'), "id" => $shortname . "_footer_right", "std" => "false", "type" => "checkbox");
     $options[] = array("name" => __('Custom Text (Right)', 'woothemes'), "desc" => __('Custom HTML and Text that will appear in the footer of your theme.', 'woothemes'), "id" => $shortname . "_footer_right_text", "std" => "", "type" => "textarea");
     /* Subscribe & Connect */
     $options[] = array("name" => __('Subscribe & Connect', 'woothemes'), "type" => "heading", "icon" => "connect");
     $options[] = array("name" => __('Enable Subscribe & Connect - Single Post', 'woothemes'), "desc" => sprintf(__('Enable the subscribe & connect area on single posts. You can also add this as a %1$s in your sidebar.', 'woothemes'), '<a href="' . home_url() . '/nxt-admin/widgets.php">widget</a>'), "id" => $shortname . "_connect", "std" => 'false', "type" => "checkbox");
     $options[] = array("name" => __('Subscribe Title', 'woothemes'), "desc" => __('Enter the title to show in your subscribe & connect area.', 'woothemes'), "id" => $shortname . "_connect_title", "std" => '', "type" => "text");
     $options[] = array("name" => __('Text', 'woothemes'), "desc" => __('Change the default text in this area.', 'woothemes'), "id" => $shortname . "_connect_content", "std" => '', "type" => "textarea");
     $options[] = array("name" => __('Subscribe By E-mail ID (Feedburner)', 'woothemes'), "desc" => __('Enter your <a href="http://www.google.com/support/feedburner/bin/answer.py?hl=en&answer=78982">Feedburner ID</a> for the e-mail subscription form.', 'woothemes'), "id" => $shortname . "_connect_newsletter_id", "std" => '', "type" => "text");
     $options[] = array("name" => __('Subscribe By E-mail to MailChimp', 'woothemes', 'woothemes'), "desc" => __('If you have a MailChimp account you can enter the <a href="http://woochimp.heroku.com" target="_blank">MailChimp List Subscribe URL</a> to allow your users to subscribe to a MailChimp List.', 'woothemes'), "id" => $shortname . "_connect_mailchimp_list_url", "std" => '', "type" => "text");
     $options[] = array("name" => __('Enable RSS', 'woothemes'), "desc" => __('Enable the subscribe and RSS icon.', 'woothemes'), "id" => $shortname . "_connect_rss", "std" => 'true', "type" => "checkbox");
     $options[] = array("name" => __('Twitter URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.twitter.com/">Twitter</a> URL e.g. http://www.twitter.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_twitter", "std" => '', "type" => "text");
     $options[] = array("name" => __('Facebook URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.facebook.com/">Facebook</a> URL e.g. http://www.facebook.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_facebook", "std" => '', "type" => "text");
     $options[] = array("name" => __('YouTube URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.youtube.com/">YouTube</a> URL e.g. http://www.youtube.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_youtube", "std" => '', "type" => "text");
     $options[] = array("name" => __('Flickr URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.flickr.com/">Flickr</a> URL e.g. http://www.flickr.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_flickr", "std" => '', "type" => "text");
     $options[] = array("name" => __('LinkedIn URL', 'woothemes'), "desc" => __('Enter your  <a href="http://www.www.linkedin.com.com/">LinkedIn</a> URL e.g. http://www.linkedin.com/in/woothemes', 'woothemes'), "id" => $shortname . "_connect_linkedin", "std" => '', "type" => "text");
     $options[] = array("name" => __('Delicious URL', 'woothemes'), "desc" => __('Enter your <a href="http://www.delicious.com/">Delicious</a> URL e.g. http://www.delicious.com/woothemes', 'woothemes'), "id" => $shortname . "_connect_delicious", "std" => '', "type" => "text");
     $options[] = array("name" => __('Google+ URL', 'woothemes'), "desc" => __('Enter your <a href="http://plus.google.com/">Google+</a> URL e.g. https://plus.google.com/104560124403688998123/', 'woothemes'), "id" => $shortname . "_connect_googleplus", "std" => '', "type" => "text");
     $options[] = array("name" => __('Enable Related Posts', 'woothemes'), "desc" => __('Enable related posts in the subscribe area. Uses posts with the same <strong>tags</strong> to find related posts. Note: Will not show in the Subscribe widget.', 'woothemes'), "id" => $shortname . "_connect_related", "std" => 'true', "type" => "checkbox");
     // Add extra options through function
     if (function_exists("woo_options_add")) {
         $options = woo_options_add($options);
     }
     if (get_option('woo_template') != $options) {
         update_option('woo_template', $options);
     }
     if (get_option('woo_themename') != $themename) {
         update_option('woo_themename', $themename);
     }
     if (get_option('woo_shortname') != $shortname) {
         update_option('woo_shortname', $shortname);
     }
     if (get_option('woo_manual') != $manualurl) {
         update_option('woo_manual', $manualurl);
     }
     // Woo Metabox Options
     // Start name with underscore to hide custom key from the user
     $woo_metaboxes = array();
     global $post;
     /* "portfolio" Custom Post Type. */
     if (get_post_type() == 'portfolio' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "portfolio-image", "label" => __('Portfolio Image', 'woothemes'), "type" => "upload", "desc" => __('Upload an image or enter an URL to your portfolio image', 'woothemes'));
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "c", "label" => __('Image Crop Alignment', 'woothemes'), "type" => "select2", "desc" => __('Select crop alignment for resized image', 'woothemes'), "options" => array("c" => __('Center', 'woothemes'), "t" => __('Top', 'woothemes'), "b" => __('Bottom', 'woothemes'), "l" => __('Left', 'woothemes'), "r" => __('Right', 'woothemes')));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => __('Video Embed Code', 'woothemes'), "type" => "textarea", "desc" => __('Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.', 'woothemes'));
         $woo_metaboxes['lightbox-description'] = array("name" => "lightbox-description", "label" => __('Custom Lightbox Description', 'woothemes'), "type" => "textarea", "desc" => sprintf(__('Enter an optional description to show in the %s for this portfolio item. This will be the description for all items in the gallery, if one is available.', 'woothemes'), '<a href="http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/">' . __('PrettyPhoto lightbox', 'woothemes') . '</a>'));
         $woo_metaboxes['lightbox-url'] = array("name" => "lightbox-url", "label" => __('Lightbox URL', 'woothemes'), "type" => "text", "desc" => sprintf(__('Enter an optional URL to show in the %s for this portfolio item.', 'woothemes'), '<a href="http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/">' . __('PrettyPhoto lightbox', 'woothemes') . '</a>'));
         $woo_metaboxes['testimonial'] = array("name" => "testimonial", "label" => __('Testimonial', 'woothemes'), "type" => "textarea", "desc" => __('Enter a testimonial from your client to be displayed on the single portfolio page', 'woothemes'));
         $woo_metaboxes['testimonial_author'] = array("name" => "testimonial_author", "label" => __('Testimonial Author', 'woothemes'), "type" => "text", "desc" => __('Enter the name of the author of the testimonial e.g. Joe Bloggs', 'woothemes'));
         $woo_metaboxes[] = array("name" => "url", "label" => __('URL', 'woothemes'), "type" => "text", "desc" => __('Enter URL of your clients site. (optional)', 'woothemes'));
     }
     //End portfolio
     if (get_post_type() == 'post' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => __('Image', 'woothemes'), "type" => "upload", "desc" => __('Upload an image or enter an URL.', 'woothemes'));
         if (get_option('woo_resize') == "true") {
             $woo_metaboxes[] = array("name" => "_image_alignment", "std" => "c", "label" => __('Image Crop Alignment', 'woothemes'), "type" => "select2", "desc" => __('Select crop alignment for resized image', 'woothemes'), "options" => array("c" => __('Center', 'woothemes'), "t" => __('Top', 'woothemes'), "b" => __('Bottom', 'woothemes'), "l" => __('Left', 'woothemes'), "r" => __('Right', 'woothemes')));
         }
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => __('Video Embed Code', 'woothemes'), "type" => "textarea", "desc" => __('Enter the video embed code for your video (YouTube, Vimeo or similar)', 'woothemes'));
     }
     // End post
     if (get_post_type() == 'slide' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "image", "label" => __('Slide Image', 'woothemes'), "type" => "upload", "desc" => __('Upload an image or enter an URL to your slide image', 'woothemes'));
         $woo_metaboxes[] = array("name" => "embed", "std" => "", "label" => __('Video Embed Code', 'woothemes'), "type" => "textarea", "desc" => __('Enter the video embed code for your video (YouTube, Vimeo or similar). Will show instead of your image.', 'woothemes'));
         $woo_metaboxes[] = array("name" => "url", "label" => __('URL', 'woothemes'), "type" => "text", "desc" => __('Enter URL if you want to add a link to the uploaded image and title. (optional)', 'woothemes'));
     }
     //End slide
     if (get_post_type() == 'infobox' || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "mini", "label" => __('Mini-features Icon', 'woothemes'), "type" => "upload", "desc" => __('Upload icon for use with the Mini-Feature on the homepage (optimal size: 32x32px) (optional)', 'woothemes'));
         $woo_metaboxes[] = array("name" => "mini_excerpt", "label" => __('Mini-features Excerpt', 'woothemes'), "type" => "textarea", "desc" => __('Enter the text to show in your Mini-Feature.', 'woothemes'));
         $woo_metaboxes[] = array("name" => "mini_readmore", "std" => "", "label" => __('Mini-features URL', 'woothemes'), "type" => "text", "desc" => __('Add an URL for your Read More button in your Mini-Feature on homepage (optional)', 'woothemes'));
     }
     // End mini
     if (get_post_type() == 'feedback' || !get_post_type()) {
         $woo_metaboxes['feedback_author'] = array("name" => "feedback_author", "label" => __('Feedback Author', 'woothemes'), "type" => "text", "desc" => __('Enter the name of the author of the feedback e.g. Joe Bloggs', 'woothemes'));
         $woo_metaboxes['feedback_url'] = array("name" => "feedback_url", "label" => __('Feedback URL', 'woothemes'), "type" => "text", "desc" => __('(optional) Enter the URL to the feedback author e.g. http://www.woothemes.com', 'woothemes'));
     }
     // End feedback
     if (in_array(get_post_type(), array('page', 'post', 'portfolio')) || !get_post_type()) {
         $woo_metaboxes[] = array("name" => "_layout", "std" => "normal", "label" => __('Layout', 'woothemes'), "type" => "images", "desc" => __('Select the layout you want on this specific post/page.', 'woothemes'), "options" => array('layout-default' => $url . 'layout-off.png', 'layout-full' => get_template_directory_uri() . '/functions/images/' . '1c.png', 'layout-left-content' => get_template_directory_uri() . '/functions/images/' . '2cl.png', 'layout-right-content' => get_template_directory_uri() . '/functions/images/' . '2cr.png'));
     }
     // Add extra metaboxes through function
     if (function_exists("woo_metaboxes_add")) {
         $woo_metaboxes = woo_metaboxes_add($woo_metaboxes);
     }
     if (get_option('woo_custom_template') != $woo_metaboxes) {
         update_option('woo_custom_template', $woo_metaboxes);
     }
 }