Example #1
0
function select_pages($parent, $level = 0)
{
    $new = $parent->hasContent('ssp_slideshow') ? '' : ' (NEW)';
    echo '<option value="' . $parent->id . '" class="level' . $level . '">' . $parent->title() . $new . '</option>';
    foreach ($parent->children() as $child) {
        select_pages($child, $level + 1);
    }
}
<?php

$custom_options = array(array("id" => 'c1', "type" => 'group_head'), array("title" => 'Logo', "type" => 'section_head'), array("id" => $theme_options_prefix . '_logo', "desc" => 'Upload a .jpg, .gif or .png logo file for your theme, or specify the image URL directly. If left blank, a plain text option will be on display.', "selectoptiondef" => '', "type" => 'input1'), array("type" => 'section_foot'), array("title" => 'Favicon', "type" => 'section_head'), array("id" => $theme_options_prefix . '_favicon', "desc" => 'Upload a 16px x 16px Png/Gif image that will represent your website&#039;s favicon.', "selectoptiondef" => '', "type" => 'input1'), array("type" => 'section_foot'), array("title" => 'Number of Posts Displayed on', "type" => 'section_head'), array("id" => $theme_options_prefix . '_homepage_num', "desc" => 'Homepage', "num_sum" => 20, "selectoptiondef" => 10, "type" => 'select1'), array("id" => $theme_options_prefix . '_category_num', "desc" => 'Category Pages', "num_sum" => 20, "selectoptiondef" => 10, "type" => 'select1'), array("id" => $theme_options_prefix . '_archive_num', "desc" => 'Archive Pages', "num_sum" => 20, "selectoptiondef" => 10, "type" => 'select1'), array("id" => $theme_options_prefix . '_search_num', "desc" => 'Search Pages', "num_sum" => 20, "selectoptiondef" => 10, "type" => 'select1'), array("id" => $theme_options_prefix . '_tag_num', "desc" => 'Tag Pages', "num_sum" => 20, "selectoptiondef" => 10, "type" => 'select1'), array("type" => 'section_foot'), array("title" => 'Categories 1 on Homepage', "type" => 'section_head'), array("id" => $theme_options_prefix . '_home_cat1', "selectoptiondef" => 0, "options" => select_category2(), "type" => 'select4'), array("id" => $theme_options_prefix . '_home_cat1_num', "selectoptiondef" => 4, "num_sum" => 10, "type" => 'select5'), array("id" => $theme_options_prefix . '_home_cat1_text', "desc" => 'Categories 1 Text', "selectoptiondef" => 'Categories 1', "type" => 'input4'), array("title" => 'Categories 2 on Homepage', "type" => 'option_head'), array("id" => $theme_options_prefix . '_home_cat2', "selectoptiondef" => 0, "options" => select_category2(), "type" => 'select4'), array("id" => $theme_options_prefix . '_home_cat2_num', "selectoptiondef" => 4, "num_sum" => 10, "type" => 'select5'), array("id" => $theme_options_prefix . '_home_cat2_text', "desc" => 'Categories 2 Text', "selectoptiondef" => 'Categories 2', "type" => 'input4'), array("title" => 'Categories 3 on Homepage', "type" => 'option_head'), array("id" => $theme_options_prefix . '_home_cat3', "selectoptiondef" => 0, "options" => select_category2(), "type" => 'select4'), array("id" => $theme_options_prefix . '_home_cat3_num', "selectoptiondef" => 4, "num_sum" => 10, "type" => 'select5'), array("id" => $theme_options_prefix . '_home_cat3_text', "desc" => 'Categories 3 Text', "selectoptiondef" => 'Categories 3', "type" => 'input4'), array("type" => 'section_foot'), array("title" => 'Featured Articles', "type" => 'section_head'), array("id" => $theme_options_prefix . '_featured_articles', "selectoptiondef" => 0, "options" => select_category(), "type" => 'select4'), array("id" => $theme_options_prefix . '_featured_articles_num', "selectoptiondef" => 3, "num_sum" => 10, "type" => 'select5'), array("id" => $theme_options_prefix . '_featured_articles_enable', "desc" => 'Enable Featured Articles?', "selectoptiondef" => 'true', "type" => 'checkbox2'), array("type" => 'section_foot'), array("title" => 'Date Format', "type" => 'section_head'), array("id" => $theme_options_prefix . '_date_format', "desc" => 'The date format on your current WordPress post.', "selectoptiondef" => 'F j, Y', "type" => 'input3'), array("type" => 'section_foot'), array("title" => 'Enable Comments on Posts', "type" => 'section_checkbox_head'), array("id" => $theme_options_prefix . '_show_comments', "desc" => 'Yes,include user comments on posts.', "selectoptiondef" => 'true', "type" => 'checkbox'), array("type" => 'section_checkbox_foot'), array("title" => 'Head Scripts', "type" => 'section_head'), array("id" => $theme_options_prefix . '_header_code', "desc" => 'Adding some text or scripts to the header of your WordPress theme.', "selectoptiondef" => '', "type" => 'textarea2'), array("type" => 'section_foot'), array("title" => 'Tracking Code', "type" => 'section_head'), array("id" => $theme_options_prefix . '_footer_code', "desc" => 'Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', "selectoptiondef" => '', "type" => 'textarea2'), array("type" => 'section_foot'), array("type" => 'group_foot'), array("id" => 'c2', "type" => 'group_head'), array("title" => 'Enable featured slider?', "type" => 'section_checkbox_head'), array("id" => $theme_options_prefix . '_top_gallery_posts', "desc" => 'Check this to enable the Featured Content Slider.', "selectoptiondef" => 'true', "type" => 'checkbox'), array("type" => 'section_checkbox_foot'), array("title" => 'Featured Category', "type" => 'section_head'), array("id" => $theme_options_prefix . '_top_gallery_category', "options" => select_category(), "selectoptiondef" => '0', "type" => 'select3'), array("type" => 'section_foot'), array("title" => 'Number of Featured Sliders', "type" => 'section_head'), array("id" => $theme_options_prefix . '_featured_num', "num_sum" => 20, "selectoptiondef" => 5, "type" => 'select2'), array("type" => 'section_foot'), array("type" => 'group_foot'), array("id" => 'c3', "type" => 'group_head'), array("title" => 'Recommended SEO plugins for wordpress', "type" => 'section_head'), array("name" => 'All in One SEO Pack', "href" => 'http://wordpress.org/extend/plugins/all-in-one-seo-pack/', "type" => 'link'), array("type" => 'section_foot'), array("title" => 'SEO Plugin Resources', "type" => 'section_head'), array("name" => '10 Free and Recommended SEO WordPress Plugins', "href" => 'http://www.designzzz.com/free-seo-wordpress-widgets-plugins/', "type" => 'link'), array("type" => 'section_foot'), array("type" => 'group_foot'), array("id" => 'c4', "type" => 'group_head'), array("title" => 'The Top Right Nav Menu', "desc" => 'Exclude pages, categories and links from the top right nav menu:', "type" => 'section_box_head'), array("id" => $theme_options_prefix . '_exclude_TR_pages', "title" => 'Pages', "selectoptiondef" => '', "options" => select_pages(), "type" => 'checkbox_li'), array("id" => $theme_options_prefix . '_exclude_TR_cat', "title" => 'Categories', "selectoptiondef" => '', "options" => select_category1(), "type" => 'checkbox_li'), array("id" => $theme_options_prefix . '_exclude_TR_links', "title" => 'Links', "selectoptiondef" => '', "options" => select_links(), "type" => 'checkbox_li'), array("type" => 'section_box_foot'), array("title" => 'Horizontal Navigation Menu', "desc" => 'Exclude pages, categories and links from horizontal navigation menu:', "type" => 'section_box_head'), array("id" => $theme_options_prefix . '_exclude_hor_pages', "title" => 'Pages', "selectoptiondef" => '', "options" => select_pages(), "type" => 'checkbox_li'), array("id" => $theme_options_prefix . '_exclude_hor_cat', "title" => 'Categories', "selectoptiondef" => '', "options" => select_category1(), "type" => 'checkbox_li'), array("id" => $theme_options_prefix . '_exclude_hor_links', "title" => 'Links', "selectoptiondef" => '', "options" => select_links(), "type" => 'checkbox_li'), array("type" => 'section_box_foot'), array("title" => 'Enable Dropdown menus', "type" => 'section_checkbox_head'), array("id" => $theme_options_prefix . '_show_dropdown', "selectoptiondef" => 'true', "desc" => 'Check this to enable the drop down menus.', "type" => 'checkbox'), array("type" => 'section_checkbox_foot'), array("title" => 'Number of Dropdown Tiers Shown', "type" => 'section_head'), array("id" => $theme_options_prefix . '_dropdown_menus_num', "num_sum" => 20, "selectoptiondef" => 3, "type" => 'select2'), array("type" => 'section_foot'), array("type" => 'group_foot'), array("id" => 'c5', "type" => 'group_head'), array("title" => 'Banner Ad Top (468*60 px)', "type" => 'section_box_head1'), array("id" => $theme_options_prefix . '_ad468_location', "class" => 'option_list', "title" => '468*60 Banner Ads #1 - Image Location', "selectoptiondef" => get_template_directory_uri() . '/images/468x60.gif', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad468_url', "class" => 'option_list bor_bottom', "title" => '468*60 Banner Ads #1 - Destination URL', "selectoptiondef" => '#', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad468_googleads', "class" => 'option_list', "title" => 'or Input 468*60 Google Adsense Ads', "selectoptiondef" => '', "desc" => '', "type" => 'option_list1'), array("type" => 'section_box_foot1'), array("title" => 'Sidebar 125*125 Banner Ads', "type" => 'section_head'), array("id" => $theme_options_prefix . '_ad125_location1', "class" => 'option_list', "title" => '125*125 Banner Ads #1 - Image Location', "selectoptiondef" => get_template_directory_uri() . '/images/125x125_01.gif', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url1', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #1 - Destination URL', "selectoptiondef" => '#', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location2', "class" => 'option_list', "title" => '125*125 Banner Ads #2 - Image Location', "selectoptiondef" => get_template_directory_uri() . '/images/125x125_02.gif', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url2', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #2 - Destination URL', "selectoptiondef" => '#', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location3', "class" => 'option_list', "title" => '125*125 Banner Ads #3 - Image Location', "selectoptiondef" => get_template_directory_uri() . '/images/125x125_03.gif', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url3', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #3 - Destination URL', "selectoptiondef" => '#', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location4', "class" => 'option_list', "title" => '125*125 Banner Ads #4 - Image Location', "selectoptiondef" => get_template_directory_uri() . '/images/125x125_04.gif', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url4', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #4 - Destination URL', "selectoptiondef" => '#', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location5', "class" => 'option_list', "title" => '125*125 Banner Ads #5 - Image Location', "selectoptiondef" => '', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url5', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #5 - Destination URL', "selectoptiondef" => '', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location6', "class" => 'option_list', "title" => '125*125 Banner Ads #6 - Image Location', "selectoptiondef" => '', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url6', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #6 - Destination URL', "selectoptiondef" => '', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location7', "class" => 'option_list', "title" => '125*125 Banner Ads #7 - Image Location', "selectoptiondef" => '', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url7', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #7 - Destination URL', "selectoptiondef" => '', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_location8', "class" => 'option_list', "title" => '125*125 Banner Ads #8 - Image Location', "selectoptiondef" => '', "desc" => 'Enter the URL for this Banner AD.', "type" => 'option_list'), array("id" => $theme_options_prefix . '_ad125_url8', "class" => 'option_list bor_bottom', "title" => '125*125 Banner Ads #8 - Destination URL', "selectoptiondef" => '', "desc" => 'Enter the URL where this banner ad points to.', "type" => 'option_list'), array("type" => 'section_foot'), array("type" => 'group_foot'), array("id" => 'c6', "type" => 'group_head'), array("title" => 'Twitter Account:', "type" => 'section_head'), array("id" => $theme_options_prefix . '_twitter_account', "desc" => 'Enter your Twitter Account here.', "selectoptiondef" => 'GavynW', "type" => 'input2'), array("type" => 'section_foot'), array("title" => 'Twitter Text:', "type" => 'section_box_head1'), array("id" => $theme_options_prefix . '_twitter_text', "selectoptiondef" => 'Twitter!', "desc" => 'Edit Twitter Text you want to be displayed.', "type" => 'input2'), array("type" => 'section_box_foot1'), array("title" => 'About Us:', "type" => 'section_head'), array("id" => $theme_options_prefix . '_about_us', "desc" => 'Edit About Us you want to be displayed.', "selectoptiondef" => 'Wizzy,Awesome Theme', "type" => 'input2'), array("type" => 'section_foot'), array("title" => 'About Us Text:', "type" => 'section_head'), array("id" => $theme_options_prefix . '_about_text', "desc" => 'Edit About Us Text you want to be displayed', "selectoptiondef" => 'You were cries one clean tanglesome one a partywall, below the top of repentance on by the man was striking thing such a sing the twitterings and jackboots incloted, is the countrybossed bergones of his big cleanminded giant ivy.', "type" => 'textarea2'), array("type" => 'section_foot'), array("title" => 'Flickr:', "type" => 'section_head'), array("id" => $theme_options_prefix . '_flickr_account', "desc" => 'Enter your Flickr Account here.', "selectoptiondef" => '65961696@N02', "type" => 'input2'), array("type" => 'section_foot'), array("title" => 'Contact Form E-Mail:', "type" => 'section_head'), array("id" => $theme_options_prefix . '_contact_email', "desc" => 'Enter your Contact Email Account here.', "selectoptiondef" => get_bloginfo('admin_email'), "type" => 'input2'), array("type" => 'section_foot'), array("type" => 'group_foot'));