Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Initializes the Response Theme Options
- *
- * Author: Tyler Cunningham
- * Copyright: © 2012
- * {@link http://cyberchimps.com/ CyberChimps LLC}
- *
- * Released under the terms of the GNU General Public License.
- * You should have received a copy of the GNU General Public License,
- * along with this software. In the main directory, see: /licensing/
- * If not, see: {@link http://www.gnu.org/licenses/}.
- *
- * @package Response
- * @since 1.0.4
- */
- require( get_template_directory() . '/core/classy-options/classy-options-framework/classy-options-framework.php');
- add_action('init', 'chimps_init_options');
- function chimps_init_options() {
- global $options, $themeslug, $themename, $themenamefull;
- $options = new ClassyOptions($themename, $themenamefull." Options");
- $terms2 = get_terms('category', 'hide_empty=0');
- $blogoptions = array();
- $blogoptions['all'] = "All";
- foreach($terms2 as $term) {
- $blogoptions[$term->slug] = $term->name;
- }
- $options
- ->section("Welcome")
- ->info("<h1>Response</h1>
- <p><strong>A Free Responsive Starter WordPress Theme Framework</strong></p>
- <p><a href='http://cyberchimps.com/responsepro/' target='_blank'>Upgrade to Response Pro for just $25!</a></p>
- <p>Response includes a Responsive Design (which magically adjusts to mobile devices such as the iPhone and iPad), Responsive Slider, Drag & Drop Header Elements, Page and Blog Elements, simplified Theme Options, and is built with HTML5 and CSS3. Upgrade to Response Pro for even more Drag & Drop Elements.</p>
- <p>To get started simply work your way through the options below, add your content, and always remember to hit save after making any changes.</p>
- <p>The Response Slider options are under the Response Page Options which are available below the Page content entry area in WP-Admin when you edit a page. This way you can configure each page individually. You will also find the Drag & Drop Page Elements editor within the response Pro Page Options as well.</p>
- <p>We tried to make Response as easy to use as possible, but if you still need help please read the <a href='http://cyberchimps.com/response/docs/' target='_blank'>documentation</a>, and visit our <a href='http://cyberchimps.com/forum/' target='_blank'>support forum</a>.</p>
- <p>Thank you for using Response.</p>
- ")
- ->section("Design")
- ->subsection("Typography")
- ->select($themeslug."_font", "Choose a Font", array( 'options' => array("Arial" => "Arial (default)", "Courier New" => "Courier New", "Georgia" => "Georgia", "Helvetica" => "Helvetica", "Lucida Grande" => "Lucida Grande", "Tahoma" => "Tahoma", "Times New Roman" => "Times New Roman", "Verdana" => "Verdana", "Maven+Pro" => "Maven Pro", "Ubuntu" => "Ubuntu")))
- ->subsection_end()
- ->open_outersection()
- ->textarea($themeslug."_css_options", "Custom CSS")
- ->close_outersection()
- ->section("Header")
- ->open_outersection()
- ->section_order("header_section_order", "Drag & Drop Header Elements", array('options' => array("response_logo_icons" => "Logo + Icons", "response_banner" => "Banner", "response_custom_header_element" => "Custom", "response_navigation" => "Menu"), 'default' => 'response_logo_icons,response_navigation'))
- ->upload($themeslug."_banner", "Banner Image")
- ->text($themeslug."_banner_url", "Banner URL", array('default' => home_url()))
- ->textarea($themeslug."_custom_header_element", "Custom HTML")
- ->close_outersection()
- ->subsection("Header Options")
- ->checkbox($themeslug."_custom_logo", "Custom Logo" , array('default' => true))
- ->upload($themeslug."_logo", "Logo", array('default' => array('url' => TEMPLATE_URL . '/images/responselogo.png')))
- ->upload($themeslug."_favicon", "Custom Favicon")
- ->subsection_end()
- ->subsection("Social")
- ->images($themeslug."_icon_style", "Icon set", array( 'options' => array('legacy' => TEMPLATE_URL . '/images/social/thumbs/icons-classic.png', 'default' =>
- TEMPLATE_URL . '/images/social/thumbs/icons-default.png' ), 'default' => 'default' ) )
- ->text($themeslug."_twitter", "Twitter Icon URL", array('default' => 'http://twitter.com'))
- ->checkbox($themeslug."_hide_twitter_icon", "Hide Twitter Icon", array('default' => true))
- ->text($themeslug."_facebook", "Facebook Icon URL", array('default' => 'http://facebook.com'))
- ->checkbox($themeslug."_hide_facebook_icon", "Hide Facebook Icon" , array('default' => true))
- ->text($themeslug."_gplus", "Google + Icon URL", array('default' => 'http://plus.google.com'))
- ->checkbox($themeslug."_hide_gplus_icon", "Hide Google + Icon" , array('default' => true))
- ->text($themeslug."_flickr", "Flickr Icon URL", array('default' => 'http://flikr.com'))
- ->checkbox($themeslug."_hide_flickr", "Hide Flickr Icon")
- ->text($themeslug."_linkedin", "LinkedIn Icon URL", array('default' => 'http://linkedin.com'))
- ->checkbox($themeslug."_hide_linkedin", "Hide LinkedIn Icon")
- ->text($themeslug."_youtube", "YouTube Icon URL", array('default' => 'http://youtube.com'))
- ->checkbox($themeslug."_hide_youtube", "Hide YouTube Icon")
- ->text($themeslug."_googlemaps", "Google Maps Icon URL", array('default' => 'http://maps.google.com'))
- ->checkbox($themeslug."_hide_googlemaps", "Hide Google maps Icon")
- ->text($themeslug."_email", "Email Address")
- ->checkbox($themeslug."_hide_email", "Hide Email Icon")
- ->text($themeslug."_rsslink", "RSS Icon URL")
- ->checkbox($themeslug."_hide_rss_icon", "Hide RSS Icon" , array('default' => true))
- ->subsection_end()
- ->subsection("Tracking and Scripts")
- ->textarea($themeslug."_ga_code", "Google Analytics Code")
- ->textarea($themeslug."_custom_header_scripts", "Custom Header Scripts")
- ->subsection_end()
- ->section("Home")
- ->open_outersection()
- ->section_order($themeslug."_home_section_order", "Drag & Drop Home Elements", array('options' => array("response_index" => "Post Page", "response_home_slider" => "Feature Slider", "response_callout_section" => "Callout Section"), "default" => 'response_home_slider,response_index'))
- ->close_outersection()
- ->subsection("Home Options")
- ->images($themeslug."_home_sidebar", "Sidebar Options", array( 'options' => array("none" => TEMPLATE_URL . '/images/options/none.png',"two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "left" => TEMPLATE_URL . '/images/options/left.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->checkbox($themeslug."_post_formats", "Post Format Icons", array('default' => true))
- ->checkbox($themeslug."_show_excerpts", "Post Excerpts")
- ->text($themeslug."_excerpt_link_text", "Excerpt Link Text", array('default' => '(More)…'))
- ->text($themeslug."_excerpt_length", "Excerpt Character Length", array('default' => '55'))
- ->checkbox($themeslug."_show_featured_images", "Featured Images")
- ->select($themeslug."_featured_image_align", "Featured Image Alignment", array( 'options' => array("key1" => "Left", "key2" => "Center", "key3" => "Right")))
- ->text($themeslug."_featured_image_height", "Featured Image Height", array('default' => '100'))
- ->text($themeslug."_featured_image_width", "Featured Image Width", array('default' => '100'))
- ->multicheck($themeslug."_hide_byline", "Post Byline Elements", array( 'options' => array($themeslug."_hide_author" => "Author" , $themeslug."_hide_categories" => "Categories", $themeslug."_hide_date" => "Date", $themeslug."_hide_comments" => "Comments", $themeslug."_hide_share" => "Share", $themeslug."_hide_tags" => "Tags"), 'default' => array( $themeslug."_hide_tags" => true, $themeslug."_hide_share" => true, $themeslug."_hide_author" => true, $themeslug."_hide_date" => true, $themeslug."_hide_comments" => true, $themeslug."_hide_categories" => true ) ) )
- ->subsection_end()
- ->subsection("Feature Slider")
- ->upload($themeslug."_home_slide_one_image", "Slide One Image", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_home_slide_one_url", "Slide One Link", array('default' => 'http://cyberchimps.com'))
- ->upload($themeslug."_home_slide_two_image", "Slide Two", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_home_slide_two_url", "Slide Two Link", array('default' => 'http://cyberchimps.com'))
- ->upload($themeslug."_home_slide_three_image", "Slide Three", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_home_slide_three_url", "Slide Three Link", array('default' => 'http://cyberchimps.com'))
- ->subsection_end()
- ->subsection("Callout Options")
- ->textarea($themeslug."_home_callout_text", "Enter your Callout text")
- ->subsection_end()
- ->section("Blog")
- ->open_outersection()
- ->section_order($themeslug."_blog_section_order", "Drag & Drop Blog Elements", array('options' => array("response_index" => "Post Page", "response_blog_slider" => "Feature Slider", "response_callout_section" => "Callout Section"), "default" => 'response_blog_slider,response_index'))
- ->close_outersection()
- ->subsection("Blog Options")
- ->images($themeslug."_blog_sidebar", "Sidebar Options", array( 'options' => array("none" => TEMPLATE_URL . '/images/options/none.png',"two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "left" => TEMPLATE_URL . '/images/options/left.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->checkbox($themeslug."_post_formats", "Post Format Icons", array('default' => true))
- ->checkbox($themeslug."_show_excerpts", "Post Excerpts")
- ->text($themeslug."_excerpt_link_text", "Excerpt Link Text", array('default' => '(More)…'))
- ->text($themeslug."_excerpt_length", "Excerpt Character Length", array('default' => '55'))
- ->checkbox($themeslug."_show_featured_images", "Featured Images")
- ->select($themeslug."_featured_image_align", "Featured Image Alignment", array( 'options' => array("key1" => "Left", "key2" => "Center", "key3" => "Right")))
- ->text($themeslug."_featured_image_height", "Featured Image Height", array('default' => '100'))
- ->text($themeslug."_featured_image_width", "Featured Image Width", array('default' => '100'))
- ->multicheck($themeslug."_hide_byline", "Post Byline Elements", array( 'options' => array($themeslug."_hide_author" => "Author" , $themeslug."_hide_categories" => "Categories", $themeslug."_hide_date" => "Date", $themeslug."_hide_comments" => "Comments", $themeslug."_hide_share" => "Share", $themeslug."_hide_tags" => "Tags"), 'default' => array( $themeslug."_hide_tags" => true, $themeslug."_hide_share" => true, $themeslug."_hide_author" => true, $themeslug."_hide_date" => true, $themeslug."_hide_comments" => true, $themeslug."_hide_categories" => true ) ) )
- ->subsection_end()
- ->subsection("Feature Slider")
- ->upload($themeslug."_blog_slide_one_image", "Slide One Image", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_blog_slide_one_url", "Slide One Link", array('default' => 'http://cyberchimps.com'))
- ->upload($themeslug."_blog_slide_two_image", "Slide Two", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_blog_slide_two_url", "Slide Two Link", array('default' => 'http://cyberchimps.com'))
- ->upload($themeslug."_blog_slide_three_image", "Slide Three", array('default' => array('url' => TEMPLATE_URL . '/images/responseslider.jpg')))
- ->text($themeslug."_blog_slide_three_url", "Slide Three Link", array('default' => 'http://cyberchimps.com'))
- ->subsection_end()
- ->subsection("Callout Options")
- ->textarea($themeslug."_blog_callout_text", "Enter your Callout text")
- ->subsection_end()
- ->section("Templates")
- ->subsection("Single Post")
- ->images($themeslug."_single_sidebar", "Sidebar Options", array( 'options' => array("left" => TEMPLATE_URL . '/images/options/left.png', "two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "none" => TEMPLATE_URL . '/images/options/none.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->checkbox($themeslug."_single_breadcrumbs", "Breadcrumbs", array('default' => true))
- ->checkbox($themeslug."_single_show_featured_images", "Featured Images")
- ->checkbox($themeslug."_single_post_formats", "Post Format Icons", array('default' => true))
- ->multicheck($themeslug."_single_hide_byline", "Post Byline Elements", array( 'options' => array($themeslug."_hide_author" => "Author" , $themeslug."_hide_categories" => "Categories", $themeslug."_hide_date" => "Date", $themeslug."_hide_comments" => "Comments", $themeslug."_hide_share" => "Share", $themeslug."_hide_tags" => "Tags"), 'default' => array( $themeslug."_hide_tags" => true, $themeslug."_hide_share" => true, $themeslug."_hide_author" => true, $themeslug."_hide_date" => true, $themeslug."_hide_comments" => true, $themeslug."_hide_categories" => true ) ) )
- ->checkbox($themeslug."_post_pagination", "Post Pagination Links", array('default' => true))
- ->subsection_end()
- ->subsection("Archive")
- ->images($themeslug."_archive_sidebar", "Sidebar Options", array( 'options' => array("left" => TEMPLATE_URL . '/images/options/left.png', "two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "none" => TEMPLATE_URL . '/images/options/none.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->checkbox($themeslug."_archive_breadcrumbs", "Breadcrumbs", array('default' => true))
- ->checkbox($themeslug."_archive_show_excerpts", "Post Excerpts", array('default' => true))
- ->checkbox($themeslug."_archive_show_featured_images", "Featured Images")
- ->checkbox($themeslug."_archive_post_formats", "Post Format Icons", array('default' => true))
- ->multicheck($themeslug."_archive_hide_byline", "Post Byline Elements", array( 'options' => array($themeslug."_hide_author" => "Author" , $themeslug."_hide_categories" => "Categories", $themeslug."_hide_date" => "Date", $themeslug."_hide_comments" => "Comments", $themeslug."_hide_share" => "Share", $themeslug."_hide_tags" => "Tags"), 'default' => array( $themeslug."_hide_tags" => true, $themeslug."_hide_share" => true, $themeslug."_hide_author" => true, $themeslug."_hide_date" => true, $themeslug."_hide_comments" => true, $themeslug."_hide_categories" => true ) ) )
- ->subsection_end()
- ->subsection("Search")
- ->images($themeslug."_search_sidebar", "Sidebar Options", array( 'options' => array("left" => TEMPLATE_URL . '/images/options/left.png', "two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "none" => TEMPLATE_URL . '/images/options/none.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->checkbox($themeslug."_search_show_excerpts", "Post Excerpts", array('default' => true))
- ->subsection_end()
- ->subsection("404")
- ->images($themeslug."_404_sidebar", "Select the Sidebar Type", array( 'options' => array("left" => TEMPLATE_URL . '/images/options/left.png', "two-right" => TEMPLATE_URL . '/images/options/tworight.png', "right-left" => TEMPLATE_URL . '/images/options/rightleft.png', "none" => TEMPLATE_URL . '/images/options/none.png', "right" => TEMPLATE_URL . '/images/options/right.png'), 'default' => 'right'))
- ->textarea($themeslug."_custom_404", "Custom 404 Content")
- ->subsection_end()
- ->section("Footer")
- ->open_outersection()
- ->text($themeslug."_footer_text", "Footer Copyright Text")
- ->close_outersection()
- ;
- }
Advertisement
Add Comment
Please, Sign In to add comment