function apollo_initialize_options() { $apollo = new apollo_launchpad(); $template = $apollo->template(); $templateuri = $apollo->template_uri(); // If the theme options don't exist, create them. if (!get_option('apollo_display_options')) { add_option('apollo_display_options'); } // First, we register a section. This is necessary since all future options must belong to a add_settings_section('apollo_general_settings', 'Launchpad Options', array(&$this, 'apollo_general_options_callback'), 'apollo_display_options'); add_settings_field('active', 'Activate Launchpad', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('active', 'checkbox', 0, '')); $options = array(); $editable_roles = get_editable_roles(); foreach ($editable_roles as $role => $details) { $name = translate_user_role($details['name']); $options[$name] = esc_attr($role); } add_settings_field('launchdate', 'Launch Date', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('launchdate', 'date', date("Y/m/d G:i:s", time()), 'When does your site launch?')); add_settings_field('automatic_launch', 'Automatic Launch', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('automatic_launch', 'checkbox', 0, 'Check this ON to automatically disable the plugin after the launch date.')); add_settings_field('display_tagline', 'Display Site Tagline', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('display_tagline', 'checkbox', 1, '')); add_settings_field('title', 'Introduction Title', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('title', 'text', 'Welcome!')); add_settings_field('intro', 'Introduction Copy', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('intro', 'memo', 'We are launching a new site very soon! Be sure to return later.')); add_settings_field('video', 'Intro Video', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('video', 'text', '', 'If you have a video, enter it\'s URL here.')); add_settings_field('subscription_embed', 'Newsletter Embed Code', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('subscription_embed', 'memo', 'Subscribe', 'Newsletter signup form embed code.')); add_settings_field('show_obox_logo', 'Display Obox Logo', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('show_obox_logo', 'checkbox', '', 'Display the Obox logo, creators of The Launchpad, in your footer.')); add_settings_field('copyright_text', 'Footer Copyright Text', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('copyright_text', 'text', 'Copyright ' . get_bloginfo("name") . ' 2012. ', 'Enter in your custom copyright text for the site\'s footer.')); add_settings_field('role', 'Minimum User Rights', array(&$this, 'apollo_input'), 'apollo_display_options', 'apollo_general_settings', array('role', 'select', 'administrator', 'Select which users are able to access the front end site.', $options)); // Finally, we register the fields with WordPress register_setting('apollo_display_options', 'apollo_display_options', array(&$this, 'handle_form')); add_settings_section('apollo_general_settings', 'Social Link Options', array(&$this, 'apollo_social_options_callback'), 'apollo_social_options'); add_settings_field('facebook', 'Facebook', array(&$this, 'apollo_input'), 'apollo_social_options', 'apollo_general_settings', array('facebook', 'text', '', '')); add_settings_field('vimeo', 'Vimeo', array(&$this, 'apollo_input'), 'apollo_social_options', 'apollo_general_settings', array('vimeo', 'text', '', '')); add_settings_field('tumblr', 'Tumblr', array(&$this, 'apollo_input'), 'apollo_social_options', 'apollo_general_settings', array('tumblr', 'text', '', '')); add_settings_field('wordpress', 'Wordpress', array(&$this, 'apollo_input'), 'apollo_social_options', 'apollo_general_settings', array('wordpress', 'text', '', '')); add_settings_field('twitter', 'Twitter', array(&$this, 'apollo_input'), 'apollo_social_options', 'apollo_general_settings', array('twitter', 'text', '', '')); // Finally, we register the fields with WordPress register_setting('apollo_social_options', 'apollo_social_options', array(&$this, 'handle_form')); add_settings_section('apollo_general_settings', 'Theme & Display Options', array(&$this, 'apollo_theme_options_callback'), 'apollo_theme_options'); add_settings_field('theme', 'Theme', array(&$this, 'apollo_input'), 'apollo_theme_options', 'apollo_general_settings', array('theme', 'select', '', '', array("Grunge" => "grunge", "Minimal" => "minimal", "Slick Gloss" => "slick-gloss"))); add_settings_field('font', 'Font', array(&$this, 'apollo_input'), 'apollo_theme_options', 'apollo_general_settings', array('font', 'select', '', '', array("-- Theme Default --" => "", "Sans Serif" => "sans-serif-style", "Serif Sans Serif" => "serif-sans-style", "Serif" => "serif-style"))); add_settings_field('typekit', 'Typekit ID', array(&$this, 'apollo_input'), 'apollo_theme_options', 'apollo_general_settings', array('typekit', 'text', '', 'Enter in the Typekit Kit ID for your custom font.')); add_settings_field('logo', 'Logo', array(&$this, 'apollo_input'), 'apollo_theme_options', 'apollo_general_settings', array('logo', 'file', '', '')); add_settings_field('background', 'Background', array(&$this, 'apollo_input'), 'apollo_theme_options', 'apollo_general_settings', array('background', 'file', '', '', array("Blue Haze" => $templateuri . "/" . $template . "/images/bg/2co-bg.jpg", "aurorarain" => $templateuri . "/" . $template . "/images/bg/aurorarain.jpg", "beachsunset" => $templateuri . "/" . $template . "/images/bg/beachsunset.jpg", "california" => $templateuri . "/" . $template . "/images/bg/california.jpg", "deepwater" => $templateuri . "/" . $template . "/images/bg/deepwater.jpg", "dusksky" => $templateuri . "/" . $template . "/images/bg/dusksky.jpg", "field" => $templateuri . "/" . $template . "/images/bg/field.jpg", "meadow" => $templateuri . "/" . $template . "/images/bg/meadow.jpg", "nightsky" => $templateuri . "/" . $template . "/images/bg/nightsky.jpg", "rocky" => $templateuri . "/" . $template . "/images/bg/rocky.jpg", "silentshore" => $templateuri . "/" . $template . "/images/bg/silentshore.jpg", "texture" => $templateuri . "/" . $template . "/images/bg/texture.jpg"))); // Finally, we register the fields with WordPress register_setting('apollo_theme_options', 'apollo_theme_options', array(&$this, 'handle_form')); add_settings_section('apollo_general_settings', 'Home Page Order', array(&$this, 'apollo_order_options_callback'), 'apollo_order_options'); add_settings_field('order', 'Click and drag the blocks to order them on your landing page', array(&$this, 'apollo_order'), 'apollo_order_options', 'apollo_general_settings', array('Count Down Timer' => 'count-down-timer', 'Video' => 'video', 'Secondary Title & Intro' => 'welcome', 'Email Subscription Form' => 'subs-form', 'Social Links' => 'social-links')); // Finally, we register the fields with WordPress $this->home_page_order_fallback(); register_setting('apollo_order_options', 'apollo_order_options', array(&$this, 'handle_form')); add_settings_section('apollo_general_settings', 'Custom CSS', array(&$this, 'apollo_css_options_callback'), 'apollo_css_options'); add_settings_field('css', 'Custom CSS', array(&$this, 'apollo_input'), 'apollo_css_options', 'apollo_general_settings', array('css', 'memo', '', '')); register_setting('apollo_css_options', 'apollo_css_options', array(&$this, 'handle_form')); }
function apollo_includes() { include_once "functions/load-includes.php"; $launchpad = new apollo_launchpad(); $launchpad->initiate(); }