/** * Setup theme settings. * * @since vantage 1.0 */ function vantage_theme_settings() { siteorigin_settings_add_section('logo', __('Logo', 'vantage')); siteorigin_settings_add_section('layout', __('Layout', 'vantage')); siteorigin_settings_add_section('home', __('Home', 'vantage')); siteorigin_settings_add_section('navigation', __('Navigation', 'vantage')); siteorigin_settings_add_section('blog', __('Blog', 'vantage')); siteorigin_settings_add_section('social', __('Social', 'vantage')); siteorigin_settings_add_section('general', __('General', 'vantage')); /** * Logo Settings */ siteorigin_settings_add_field('logo', 'image', 'media', __('Logo Image', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('Your own custom logo.', 'vantage'))); siteorigin_settings_add_teaser('logo', 'image_retina', __('Retina Logo', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('A double sized version of your logo for retina displays. Must be used in addition to standard logo.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/retina-logo.png')); siteorigin_settings_add_field('logo', 'header_text', 'text', __('Header Text', 'vantage'), array('description' => __('Text that appears to the right of your logo.', 'vantage'))); /** * Layout Settings */ siteorigin_settings_add_field('layout', 'responsive', 'checkbox', __('Responsive Layout', 'vantage'), array('description' => __('Scale your layout for small screen devices.', 'vantage'))); siteorigin_settings_add_field('layout', 'fitvids', 'checkbox', __('Enable FitVids.js', 'vantage'), array('description' => __('Include FitVids.js fluid embedded video layouts.', 'vantage'))); siteorigin_settings_add_field('layout', 'bound', 'select', __('Layout Bound', 'vantage'), array('options' => array('boxed' => __('Boxed', 'vantage'), 'full' => __('Full Width', 'vantage')), 'description' => __('Change the width of the bounding box.', 'vantage'))); siteorigin_settings_add_field('layout', 'masthead', 'select', __('Masthead Layout', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/masthead', 'Part Name'), 'description' => __("Change which header area layout you're using.", 'vantage'))); siteorigin_settings_add_field('layout', 'menu', 'select', __('Masthead Menu', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/menu', 'Part Name'), 'description' => __("Choose how the masthead menu is displayed.", 'vantage'))); siteorigin_settings_add_field('layout', 'footer', 'select', __('Footer Layout', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/footer', 'Part Name'), 'description' => __("Change which footer area layout you're using.", 'vantage'))); /** * Navigation settings */ siteorigin_settings_add_teaser('navigation', 'responsive_menu', __('Responsive Menu', 'vantage'), array('description' => __('Use a special responsive menu for small screen devices.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/mobile-nav.png')); siteorigin_settings_add_teaser('navigation', 'responsive_menu_text', __('Responsive Menu Text', 'vantage'), array('description' => __('The button used for the responsive menu.', 'vantage'))); siteorigin_settings_add_field('navigation', 'use_sticky_menu', 'checkbox', __('Sticky Menu', 'vantage'), array('description' => __('Sticks the menu to the top of the screen when a user scrolls down.', 'vantage'))); siteorigin_settings_add_field('navigation', 'menu_search', 'checkbox', __('Search in Menu', 'vantage'), array('description' => __('Display a search in the main menu.', 'vantage'))); siteorigin_settings_add_field('navigation', 'display_scroll_to_top', 'checkbox', __('Display Scroll To Top', 'vantage'), array('description' => __('Display a scroll-to-top button when a user scrolls down.', 'vantage'))); siteorigin_settings_add_field('navigation', 'post_nav', 'checkbox', __('Post Navigation', 'vantage'), array('description' => __('Display next/previous post navigation.', 'vantage'))); siteorigin_settings_add_field('navigation', 'home_icon', 'checkbox', __('Home Page Icon', 'vantage'), array('description' => __('Display home icon for home page menu links.', 'vantage'))); siteorigin_settings_add_field('navigation', 'mobile_navigation', 'checkbox', __('Mobile Navigation', 'vantage'), array('description' => __('Enables Sticky Menu and Scroll To Top for mobile devices.', 'vantage'))); /** * Home Page */ siteorigin_settings_add_field('home', 'slider', 'select', __('Home Page Slider', 'vantage'), array('options' => siteorigin_metaslider_get_options(true), 'description' => sprintf(__('This theme supports <a href="%s" target="_blank">Meta Slider</a>. <a href="%s">Install it</a> for free to create beautiful responsive sliders - <a href="%s" target="_blank">More Info</a>', 'vantage'), 'https://siteorigin.com/metaslider/', siteorigin_metaslider_install_link(), 'https://siteorigin.com/vantage-documentation/slider/'))); siteorigin_settings_add_field('home', 'slider_stretch', 'checkbox', __('Stretch Home Slider', 'vantage'), array('label' => __('Stretch', 'vantage'), 'description' => __('Stretch the home page slider to the width of the screen if using the full width layout.', 'vantage'))); /** * Blog Settings */ siteorigin_settings_add_field('blog', 'archive_layout', 'select', __('Blog Archive Layout', 'vantage'), array('options' => vantage_blog_layout_options(), 'description' => __('Show the post author in blog archive pages.', 'vantage'))); siteorigin_settings_add_field('blog', 'archive_content', 'select', __('Post Content', 'vantage'), array('options' => array('full' => __('Full Post', 'vantage'), 'excerpt' => __('Post Excerpt', 'vantage')), 'description' => __('Choose how to display posts on post archive when using default blog layout.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_author', 'checkbox', __('Post Author', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post author in blog archive pages.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_date', 'checkbox', __('Post Date', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post date.', 'vantage'))); siteorigin_settings_add_field('blog', 'featured_image', 'checkbox', __('Featured Image', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the featured image on a post single page.', 'vantage'))); siteorigin_settings_add_field('blog', 'featured_image_type', 'select', __('Featured Image Type', 'vantage'), array('options' => array('large' => __('Large', 'vantage'), 'icon' => __('Small Icon', 'vantage')), 'description' => __('Size of the featured image in the blog post archives.', 'vantage'))); /** * Social Settings */ siteorigin_settings_add_teaser('social', 'ajax_comments', __('Ajax Comments', 'vantage'), array('description' => __('Keep your conversations flowing with ajax comments.', 'vantage'))); siteorigin_settings_add_teaser('social', 'share_post', __('Post Sharing', 'vantage'), array('description' => __('Show icons to share your posts on Facebook, Twitter and Google+.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/share.png')); siteorigin_settings_add_teaser('social', 'twitter', __('Twitter Handle', 'vantage'), array('description' => __('This handle will be recommended after a user shares one of your posts.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/share-rec.png')); /** * General Settings */ siteorigin_settings_add_field('general', 'site_info_text', 'text', __('Site Information Text', 'vantage'), array('description' => __("Text displayed in your footer. {site-title}, {copyright} and {year} will be replaced with your website title, a copyright symbol and the current year.", 'vantage'))); }
/** * Initialize the settings. */ function ultra_settings_init() { siteorigin_settings_add_section('header', __('Header', 'ultra')); siteorigin_settings_add_section('navigation', __('Navigation', 'ultra')); siteorigin_settings_add_section('layout', __('Layout', 'ultra')); siteorigin_settings_add_section('home', __('Home', 'ultra')); siteorigin_settings_add_section('pages', __('Pages', 'ultra')); siteorigin_settings_add_section('blog', __('Blog', 'ultra')); siteorigin_settings_add_section('comments', __('Comments', 'ultra')); siteorigin_settings_add_section('footer', __('Footer', 'ultra')); siteorigin_settings_add_section('text', __('Site Text', 'ultra')); // Header siteorigin_settings_add_field('header', 'logo', 'media', __('Logo', 'ultra'), array('description' => __('Your own custom logo.', 'ultra'))); siteorigin_settings_add_field('header', 'tagline', 'checkbox', __('Tagline', 'ultra'), array('description' => __('Display the website tagline.', 'ultra'))); siteorigin_settings_add_field('header', 'top_bar', 'checkbox', __('Top Bar', 'ultra'), array('description' => __('Display the top bar.', 'ultra'))); siteorigin_settings_add_field('header', 'sticky', 'checkbox', __('Sticky Header', 'ultra'), array('description' => __('Sticks the header to the top of the screen as the user scrolls down.', 'ultra'))); siteorigin_settings_add_field('header', 'opacity', 'text', __('Sticky Header Opacity', 'ultra'), array('description' => __('Set the header background opacity once it turns sticky. 0.1 (lowest) - 1 (highest).', 'ultra'))); siteorigin_settings_add_field('header', 'scale', 'checkbox', __('Sticky Header Scaling', 'ultra'), array('description' => __('Scale the header down as it becomes sticky.', 'ultra'))); // Navigation siteorigin_settings_add_field('navigation', 'menu_search', 'checkbox', __('Menu Search', 'ultra'), array('description' => __('Display a search icon in the main menu.', 'ultra'))); siteorigin_settings_add_field('navigation', 'responsive_menu', 'checkbox', __('Responsive Menu', 'ultra'), array('description' => __('Use a special responsive menu for small screen devices.', 'ultra'))); siteorigin_settings_add_field('navigation', 'responsive_menu_collapse', 'number', __('Responsive Menu Collapse', 'ultra'), array('description' => __('The pixel resolution when the primary menu collapses into a responsive menu.', 'ultra'))); siteorigin_settings_add_field('navigation', 'breadcrumb_trail', 'checkbox', __('Breadcrumb Trail', 'ultra'), array('description' => __('Display a breadcrumb trail below the menu. De-activate this setting if using Yoast Breadcrumbs or Breadcrumb NavXT.', 'ultra'))); siteorigin_settings_add_field('navigation', 'post_nav', 'checkbox', __('Post Navigation', 'ultra'), array('description' => __('Display next/previous post navigation.', 'ultra'))); siteorigin_settings_add_field('navigation', 'scroll_top', 'checkbox', __('Scroll to Top', 'ultra'), array('description' => __('Display the scroll to top button.', 'ultra'))); // Layout siteorigin_settings_add_field('layout', 'responsive', 'checkbox', __('Responsive Layout', 'ultra'), array('description' => __('Adapt the site layout for mobile devices.', 'ultra'))); siteorigin_settings_add_field('layout', 'fitvids', 'checkbox', __('Enable FitVids.js', 'ultra'), array('description' => __('Include FitVids.js for fluid width video embeds.', 'ultra'))); // Home siteorigin_settings_add_field('home', 'slider', 'select', __('Home Slider', 'ultra'), array('options' => siteorigin_metaslider_get_options(true), 'description' => sprintf(__('This theme supports <a href="%s" target="_blank">Meta Slider</a>. <a href="%s">Install it</a> for free to easily build beautiful responsive sliders - <a href="%s" target="_blank">read more</a>.', 'ultra'), 'https://getdpd.com/cart/hoplink/15318?referrer=1ag7po4k2uas40wowgw', siteorigin_metaslider_install_link(), 'http://ultrathemes.com/documentation/'))); siteorigin_settings_add_field('home', 'slider_stretch', 'checkbox', __('Stretch Slider', 'ultra'), array('label' => __('Stretch Slider', 'ultra'), 'description' => __('Stretch the home page slider to full screen width.', 'ultra'))); siteorigin_settings_add_field('home', 'header_overlaps', 'checkbox', __('Header Overlaps Slider', 'ultra'), array('description' => __('Should the header overlap the home page slider?', 'ultra'))); // Pages siteorigin_settings_add_field('pages', 'featured_image', 'checkbox', __('Featured Image', 'ultra'), array('description' => __('Display the featured image on pages.', 'ultra'))); // Blog siteorigin_settings_add_field('blog', 'page_title', 'text', __('Blog Page Title', 'ultra'), array('description' => __('The page title of the blog page.', 'ultra'))); siteorigin_settings_add_field('blog', 'archive_featured_image', 'checkbox', __('Archive Featured Image', 'ultra'), array('description' => __('Display the featured image on the blog archive pages.', 'ultra'))); siteorigin_settings_add_field('blog', 'archive_content', 'select', __('Archive Post Content', 'ultra'), array('options' => array('full' => __('Full Post Content', 'ultra'), 'excerpt' => __('Post Excerpt', 'ultra')), 'description' => __('Choose how to display your post content on blog and archive pages. Select Full Post Content if using the "more" quicktag.', 'ultra'))); siteorigin_settings_add_field('blog', 'read_more', 'text', __('Read More Text', 'ultra'), array('description' => __('The link text displayed when posts are split using the "more" quicktag.', 'ultra'), 'conditional' => array('show' => array('blog_archive_content' => 'full'), 'hide' => 'else'))); siteorigin_settings_add_field('blog', 'excerpt_length', 'number', __('Post Excerpt Length', 'ultra'), array('description' => __('If no manual post excerpt is added one will be generated. How many words should it be?', 'ultra'), 'conditional' => array('show' => array('blog_archive_content' => 'excerpt'), 'hide' => 'else'))); siteorigin_settings_add_field('blog', 'post_featured_image', 'checkbox', __('Post Featured Image', 'ultra'), array('description' => __('Display the featured image on the single post page.', 'ultra'))); siteorigin_settings_add_field('blog', 'post_date', 'checkbox', __('Post Date', 'ultra'), array('description' => __('Display the post date.', 'ultra'))); siteorigin_settings_add_field('blog', 'post_author', 'checkbox', __('Post Author', 'ultra'), array('description' => __('Display the post author.', 'ultra'))); siteorigin_settings_add_field('blog', 'post_comment_count', 'checkbox', __('Post Comment Count', 'ultra'), array('description' => __('Display the post comment count.', 'ultra'))); siteorigin_settings_add_field('blog', 'post_cats', 'checkbox', __('Post Categories', 'ultra'), array('description' => __('Display the post categories.', 'ultra'))); siteorigin_settings_add_field('blog', 'post_tags', 'checkbox', __('Post Tags', 'ultra'), array('description' => __('Display the post tags.', 'ultra'))); siteorigin_settings_add_field('blog', 'edit_link', 'checkbox', __('Edit Link', 'ultra'), array('description' => __('Display an Edit link below post content. Visible if a user is logged in and allowed to edit the content. Also applies to Pages.', 'ultra'))); // Comments siteorigin_settings_add_field('comments', 'allowed_tags', 'checkbox', __('Comment Form Allowed Tags', 'ultra'), array('description' => __('Display the explanatory text below the comment form that lets users know which HTML tags may be used.', 'ultra'))); // Footer siteorigin_settings_add_field('footer', 'copyright_text', 'text', __('Copyright Text', 'ultra'), array('description' => __('{site-title}, {copyright} and {year} can be used to display your website title, a copyright symbol and the current year.', 'ultra'))); // Site Text siteorigin_settings_add_field('text', 'phone', 'text', __('Phone Number', 'ultra'), array('description' => __('A phone number displayed in the top bar. Use international dialing format to enable click to call.', 'ultra'))); siteorigin_settings_add_field('text', 'email', 'text', __('Email Address', 'ultra'), array('description' => __('An email address to be displayed in the top bar', 'ultra'))); siteorigin_settings_add_field('text', 'comments_closed', 'text', __('Comments Closed', 'ultra'), array('description' => __('The text visitors see at the bottom of posts when comments are closed.', 'ultra'))); siteorigin_settings_add_field('text', 'no_results_heading', 'text', __('No Search Results Heading', 'ultra'), array('description' => __('The search page heading visitors see when no results are found.', 'ultra'))); siteorigin_settings_add_field('text', 'no_results_copy', 'text', __('No Search Results Text', 'ultra'), array('description' => __('The search page text visitors see when no results are found.', 'ultra'))); siteorigin_settings_add_field('text', '404_heading', 'text', __('404 Error Page Heading', 'ultra'), array('description' => __('The heading visitors see when no page is found.', 'ultra'))); siteorigin_settings_add_field('text', '404_copy', 'text', __('404 Error Page Text', 'ultra'), array('description' => __('The text visitors see no page is found.', 'ultra'))); }
/** * Setup theme settings. * * @since vantage 1.0 */ function vantage_theme_settings() { siteorigin_settings_add_section('logo', __('Logo', 'vantage')); siteorigin_settings_add_section('layout', __('Layout', 'vantage')); siteorigin_settings_add_section('home', __('Home', 'vantage')); siteorigin_settings_add_section('navigation', __('Navigation', 'vantage')); siteorigin_settings_add_section('blog', __('Blog', 'vantage')); siteorigin_settings_add_section('social', __('Social', 'vantage')); siteorigin_settings_add_section('general', __('General', 'vantage')); /** * Logo Settings */ siteorigin_settings_add_field('logo', 'image', 'media', __('Logo Image', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('Your own custom logo.', 'vantage'))); siteorigin_settings_add_field('logo', 'image_retina', 'media', __('Retina Logo', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('A double sized version of your logo for retina displays. Must be used in addition to standard logo.', 'vantage'))); siteorigin_settings_add_field('logo', 'in_menu_constrain', 'checkbox', __('Constrain Logo Height', 'vantage'), array('label' => __('Yes', 'vantage'), 'description' => __('When using the "logo in menu" masthead layout, constrain the logo size to fit the menu height.', 'vantage'), 'conditional' => array('show' => array('layout_masthead' => 'logo-in-menu'), 'hide' => 'else'))); // siteorigin_settings_add_teaser('logo', 'image_retina', __('Retina Logo', 'vantage'), array( // 'choose' => __('Choose Image', 'vantage'), // 'update' => __('Set Logo', 'vantage'), // 'description' => __('A double sized version of your logo for retina displays. Must be used in addition to standard logo.', 'vantage'), // 'teaser-image' => get_template_directory_uri().'/upgrade/teasers/retina-logo.png', // ) ); siteorigin_settings_add_field('logo', 'header_text', 'text', __('Header Text', 'vantage'), array('description' => __('Text that appears to the right of your logo.', 'vantage'))); // // siteorigin_settings_add_field('logo', 'sub_menu', 'select', __('Sub Menu', 'vantage'), array( // 'options' => array( // 'boxed' => __('Boxed', 'vantage'), // 'full' => __('Full Width', 'vantage'), // ), // 'description' => __('Change the width of the bounding box.', 'vantage') // ) ); /** * Layout Settings */ siteorigin_settings_add_field('layout', 'responsive', 'checkbox', __('Responsive Layout', 'vantage'), array('description' => __('Scale your layout for small screen devices.', 'vantage'))); siteorigin_settings_add_field('layout', 'fitvids', 'checkbox', __('Enable FitVids.js', 'vantage'), array('description' => __('Include FitVids.js fluid embedded video layouts.', 'vantage'))); siteorigin_settings_add_field('layout', 'bound', 'select', __('Layout Bound', 'vantage'), array('options' => array('boxed' => __('Boxed', 'vantage'), 'full' => __('Full Width', 'vantage')), 'description' => __('Change the width of the bounding box.', 'vantage'))); siteorigin_settings_add_field('layout', 'masthead', 'select', __('Masthead Layout', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/masthead', 'Part Name'), 'description' => __("Change which header area layout you're using.", 'vantage'))); siteorigin_settings_add_field('layout', 'menu', 'select', __('Masthead Menu', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/menu', 'Part Name'), 'description' => __("Choose how the masthead menu is displayed.", 'vantage'))); siteorigin_settings_add_field('layout', 'footer', 'select', __('Footer Layout', 'vantage'), array('options' => siteorigin_settings_template_part_names('parts/footer', 'Part Name'), 'description' => __("Change which footer area layout you're using.", 'vantage'))); siteorigin_settings_add_field('layout', 'force_panels_full', 'checkbox', __('Force Page Builder Styles Full Width', 'vantage'), array('description' => __('Force Page Builder rows with styles to be full width. Only necessary for legacy reasons.', 'vantage'))); /** * Navigation settings */ siteorigin_settings_add_field('navigation', 'responsive_menu', 'checkbox', __('Responsive Menu', 'vantage'), array('description' => __('Use a special responsive menu for small screen devices.', 'vantage'))); // siteorigin_settings_add_teaser('navigation', 'responsive_menu', __('Responsive Menu', 'vantage'), array( // 'description' => __('Use a special responsive menu for small screen devices.', 'vantage'), // 'teaser-image' => get_template_directory_uri().'/upgrade/teasers/mobile-nav.png', // )); siteorigin_settings_add_teaser('navigation', 'responsive_menu_text', __('Responsive Menu Text', 'vantage'), array('description' => __('The button used for the responsive menu.', 'vantage'))); siteorigin_settings_add_teaser('navigation', 'responsive_menu_search', __('Responsive Menu Search', 'vantage'), array('description' => __('Enable search in the responsive menu.', 'vantage'))); siteorigin_settings_add_field('navigation', 'use_sticky_menu', 'checkbox', __('Sticky Menu', 'vantage'), array('description' => __('Sticks the menu to the top of the screen when a user scrolls down.', 'vantage'))); siteorigin_settings_add_field('navigation', 'menu_search', 'checkbox', __('Search in Menu', 'vantage'), array('description' => __('Display a search in the main menu.', 'vantage'))); siteorigin_settings_add_field('navigation', 'display_scroll_to_top', 'checkbox', __('Display Scroll To Top', 'vantage'), array('description' => __('Display a scroll-to-top button when a user scrolls down.', 'vantage'))); siteorigin_settings_add_field('navigation', 'post_nav', 'checkbox', __('Post Navigation', 'vantage'), array('description' => __('Display next/previous post navigation.', 'vantage'))); siteorigin_settings_add_field('navigation', 'home_icon', 'checkbox', __('Home Page Icon', 'vantage'), array('description' => __('Display home icon for home page menu links.', 'vantage'))); // siteorigin_settings_add_field('navigation', 'mobile_navigation', 'checkbox', __('Mobile Navigation', 'vantage'), array( // 'description' => __('Enables Sticky Menu and Scroll To Top for mobile devices.', 'vantage') // )); if (function_exists('yoast_breadcrumb')) { siteorigin_settings_add_field('navigation', 'yoast_breadcrumbs', 'checkbox', __('Yoast Breadcrumbs', 'vantage'), array('description' => __('Display Yoast SEO breadcrumbs if you have it installed.', 'vantage'))); } /** * Home Page */ siteorigin_settings_add_field('home', 'slider', 'select', __('Home Page Slider', 'vantage'), array('options' => siteorigin_metaslider_get_options(true), 'description' => sprintf(__('This theme supports <a href="%s" target="_blank">Meta Slider</a>. <a href="%s">Install it</a> for free to create beautiful responsive sliders - <a href="%s" target="_blank">More Info</a>', 'vantage'), 'https://siteorigin.com/metaslider/', siteorigin_metaslider_install_link(), 'https://siteorigin.com/vantage-documentation/slider/'))); siteorigin_settings_add_field('home', 'slider_stretch', 'checkbox', __('Stretch Home Slider', 'vantage'), array('label' => __('Stretch', 'vantage'), 'description' => __('Stretch the home page slider to the width of the screen if using the full width layout.', 'vantage'))); /** * Blog Settings */ siteorigin_settings_add_field('blog', 'archive_layout', 'select', __('Blog Archive Layout', 'vantage'), array('options' => vantage_blog_layout_options(), 'description' => __('Choose the layout to be used on blog and archive pages.', 'vantage'))); siteorigin_settings_add_field('blog', 'archive_content', 'select', __('Post Content', 'vantage'), array('options' => array('full' => __('Full Post', 'vantage'), 'excerpt' => __('Post Excerpt', 'vantage')), 'description' => __('Choose how to display posts on post archive when using default blog layout.', 'vantage'), 'conditional' => array('show' => array('blog_archive_layout' => 'blog'), 'hide' => 'else'))); siteorigin_settings_add_field('blog', 'featured_image_type', 'select', __('Featured Image Type', 'vantage'), array('options' => array('large' => __('Large', 'vantage'), 'icon' => __('Small Icon', 'vantage')), 'description' => __('Size of the featured image in the blog post archives when using default blog layout.', 'vantage'))); siteorigin_settings_add_field('blog', 'featured_image', 'checkbox', __('Featured Image', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the featured image on a post single page.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_metadata', 'checkbox', __('Post Metadata', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post metadata under the post title.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_date', 'checkbox', __('Post Date', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post date under the post title.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_author', 'checkbox', __('Post Author', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post author under the post title.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_comment_count', 'checkbox', __('Post Comment Count', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the number of comments under the post title.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_categories', 'checkbox', __('Post Categories', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post categories below the single post.', 'vantage'))); siteorigin_settings_add_field('blog', 'post_tags', 'checkbox', __('Post Tags', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post tags below the single post.', 'vantage'))); siteorigin_settings_add_field('blog', 'author_box', 'checkbox', __('Author Box', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show an author box below each blog post.', 'vantage'))); siteorigin_settings_add_field('blog', 'read_more', 'text', __('Read More Text', 'vantage'), array('description' => __('The link displayed when post content is split using the "more" quicktag.', 'vantage'))); /** * Social Settings */ siteorigin_settings_add_teaser('social', 'ajax_comments', __('Ajax Comments', 'vantage'), array('description' => __('Keep your conversations flowing with ajax comments.', 'vantage'))); siteorigin_settings_add_teaser('social', 'share_post', __('Post Sharing', 'vantage'), array('description' => __('Show icons to share your posts on Facebook, Twitter and Google+.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/share.png')); siteorigin_settings_add_teaser('social', 'twitter', __('Twitter Handle', 'vantage'), array('description' => __('This handle will be recommended after a user shares one of your posts.', 'vantage'), 'teaser-image' => get_template_directory_uri() . '/upgrade/teasers/share-rec.png')); /** * General Settings */ siteorigin_settings_add_field('general', 'site_info_text', 'text', __('Site Information Text', 'vantage'), array('description' => __("Text displayed in your footer. {site-title}, {copyright} and {year} will be replaced with your website title, a copyright symbol and the current year.", 'vantage'))); siteorigin_settings_add_teaser('general', 'adaptive_images', __('Mobile Adaptive Images', 'vantage'), array('description' => __('Rescale images to the most appropriate size for mobile devices.', 'vantage'))); siteorigin_settings_add_field('general', 'js_enqueue_footer', 'checkbox', __('Enqueue JavaScript in Footer', 'vantage'), array('description' => __('Enqueue JavaScript files in the footer, if possible.', 'vantage'))); }
/** * Setup theme settings. * * @since vantage 1.0 */ function vantage_theme_settings() { $settings = SiteOrigin_Settings::single(); $settings->add_section('logo', __('Logo', 'vantage')); $settings->add_section('layout', __('Layout', 'vantage')); $settings->add_section('home', __('Home', 'vantage')); $settings->add_section('navigation', __('Navigation', 'vantage')); $settings->add_section('blog', __('Blog', 'vantage')); $settings->add_section('social', __('Social', 'vantage')); $settings->add_section('general', __('General', 'vantage')); /** * Logo Settings */ $settings->add_field('logo', 'image', 'media', __('Logo Image', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('Your own custom logo.', 'vantage'))); $settings->add_field('logo', 'in_menu_constrain', 'checkbox', __('Constrain Logo Height', 'vantage'), array('label' => __('Yes', 'vantage'), 'description' => __('When using the "logo in menu" masthead layout, constrain the logo size to fit the menu height.', 'vantage'))); $settings->add_field('logo', 'with_text', 'checkbox', __('Display site title alongside logo', 'vantage'), array('description' => __("Only applicable if a Logo Image has been set.", 'vantage'))); $settings->add_field('logo', 'image_retina', 'media', __('Retina Logo', 'vantage'), array('choose' => __('Choose Image', 'vantage'), 'update' => __('Set Logo', 'vantage'), 'description' => __('A double sized version of your logo for retina displays. Must be used in addition to standard logo.', 'vantage'))); $settings->add_field('logo', 'header_text', 'text', __('Header Text', 'vantage'), array('description' => __('Text that appears to the right of your logo. It will be hidden if widgets are placed in the header.', 'vantage'), 'sanitize_callback' => 'wp_kses_post')); $settings->add_field('logo', 'no_widget_overlay', 'checkbox', __('No Widget Overlay', 'vantage'), array('description' => __("If enabled, header widgets won't overlap main logo image.", 'vantage'))); /** * Layout Settings */ $settings->add_field('layout', 'responsive', 'checkbox', __('Responsive Layout', 'vantage'), array('description' => __('Scale your layout for small screen devices.', 'vantage'))); $settings->add_field('layout', 'fitvids', 'checkbox', __('Enable FitVids.js', 'vantage'), array('description' => __('Include FitVids.js fluid embedded video layouts.', 'vantage'))); $settings->add_field('layout', 'bound', 'select', __('Layout Bound', 'vantage'), array('options' => array('boxed' => __('Boxed', 'vantage'), 'full' => __('Full Width', 'vantage')), 'description' => __('Change the width of the bounding box.', 'vantage'))); $settings->add_field('layout', 'masthead', 'select', __('Masthead Layout', 'vantage'), array('options' => $settings->template_part_names('parts/masthead', 'Part Name'), 'description' => __("Change which header area layout you're using.", 'vantage'))); $settings->add_field('layout', 'menu', 'select', __('Masthead Menu', 'vantage'), array('options' => $settings->template_part_names('parts/menu', 'Part Name'), 'description' => __("Choose how the masthead menu is displayed.", 'vantage'))); $settings->add_field('layout', 'footer', 'select', __('Footer Layout', 'vantage'), array('options' => $settings->template_part_names('parts/footer', 'Part Name'), 'description' => __("Change which footer area layout you're using.", 'vantage'))); $settings->add_field('layout', 'force_panels_full', 'checkbox', __('Force Page Builder Styles Full Width', 'vantage'), array('description' => __('Force Page Builder rows with styles to be full width. Only necessary for legacy reasons.', 'vantage'))); /** * Navigation settings */ $settings->add_field('navigation', 'responsive_menu', 'checkbox', __('Mobile Menu', 'vantage'), array('description' => __('Use a special mobile menu for small screen devices.', 'vantage'))); $settings->add_field('navigation', 'responsive_menu_collapse', 'number', __('Mobile Menu Collapse', 'vantage'), array('description' => __('The resolution when the menu collapses into a mobile navigation menu. Value is in pixels.', 'vantage'))); $settings->add_field('navigation', 'responsive_menu_text', 'text', __('Mobile Menu Text', 'vantage'), array('description' => __('The button used for the mobile menu.', 'vantage'))); $settings->add_field('navigation', 'responsive_menu_search', 'checkbox', __('Mobile Menu Search', 'vantage'), array('description' => __('Enable search in the mobile menu.', 'vantage'))); $settings->add_field('navigation', 'use_sticky_menu', 'checkbox', __('Sticky Menu', 'vantage'), array('description' => __('Sticks the menu to the top of the screen when a user scrolls down.', 'vantage'))); $settings->add_field('navigation', 'menu_search', 'checkbox', __('Search in Menu', 'vantage'), array('description' => __('Display a search in the main menu.', 'vantage'))); $settings->add_field('navigation', 'display_scroll_to_top', 'checkbox', __('Display Scroll To Top', 'vantage'), array('description' => __('Display a scroll-to-top button when a user scrolls down.', 'vantage'))); $settings->add_field('navigation', 'post_nav', 'checkbox', __('Post Navigation', 'vantage'), array('description' => __('Display next/previous post navigation.', 'vantage'))); $settings->add_field('navigation', 'home_icon', 'checkbox', __('Home Page Icon', 'vantage'), array('description' => __('Display home icon for home page menu links.', 'vantage'))); $settings->add_field('navigation', 'mobile_navigation', 'checkbox', __('Mobile Navigation', 'vantage'), array('description' => __('Enables Sticky Menu and Scroll To Top for mobile devices.', 'vantage'))); if (function_exists('yoast_breadcrumb') || function_exists('bcn_display')) { $settings->add_field('navigation', 'yoast_breadcrumbs', 'checkbox', __('Breadcrumbs', 'vantage'), array('description' => __('Display breadcrumbs if you have Yoast SEO or Breadcrumb NavXT installed.', 'vantage'))); } /** * Home Page */ $settings->add_field('home', 'slider', 'select', __('Home Page Slider', 'vantage'), array('options' => siteorigin_metaslider_get_options(true), 'description' => sprintf(__('This theme supports <a href="%s" target="_blank">Meta Slider</a>. <a href="%s">Install it</a> for free to create beautiful responsive sliders - <a href="%s" target="_blank">More Info</a>', 'vantage'), 'https://siteorigin.com/metaslider/', siteorigin_metaslider_install_link(), 'https://siteorigin.com/vantage-documentation/slider/'))); $settings->add_field('home', 'slider_stretch', 'checkbox', __('Stretch Home Slider', 'vantage'), array('label' => __('Stretch', 'vantage'), 'description' => __('Stretch the home page slider to the width of the screen if using the full width layout.', 'vantage'))); /** * Blog Settings */ $settings->add_field('blog', 'archive_layout', 'select', __('Blog Archive Layout', 'vantage'), array('options' => vantage_blog_layout_options(), 'description' => __('Choose the layout to be used on blog and archive pages.', 'vantage'))); $settings->add_field('blog', 'archive_content', 'select', __('Post Content', 'vantage'), array('options' => array('full' => __('Full Post', 'vantage'), 'excerpt' => __('Post Excerpt', 'vantage')), 'description' => __('Choose how to display posts on post archive when using default blog layout.', 'vantage'))); $settings->add_field('blog', 'excerpt_length', 'number', __('Excerpt Length', 'vantage'), array('description' => __('If no manual post excerpt is added one will be generated. How many words should it be? Only applicable if Post Excerpt has been selected from the Post Content setting.', 'vantage'), 'sanitize_callback' => 'absint')); $settings->add_field('blog', 'featured_image_type', 'select', __('Featured Image Type', 'vantage'), array('options' => array('large' => __('Large', 'vantage'), 'icon' => __('Small Icon', 'vantage')), 'description' => __('Size of the featured image in the blog post archives when using default blog layout.', 'vantage'))); $settings->add_field('blog', 'featured_image', 'checkbox', __('Featured Image', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the featured image on a post single page.', 'vantage'))); $settings->add_field('blog', 'post_metadata', 'checkbox', __('Post Metadata', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post metadata under the post title.', 'vantage'))); $settings->add_field('blog', 'post_date', 'checkbox', __('Post Date', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post date under the post title.', 'vantage'))); $settings->add_field('blog', 'post_author', 'checkbox', __('Post Author', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post author under the post title.', 'vantage'))); $settings->add_field('blog', 'post_comment_count', 'checkbox', __('Post Comment Count', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the number of comments under the post title.', 'vantage'))); $settings->add_field('blog', 'post_categories', 'checkbox', __('Post Categories', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post categories below the single post.', 'vantage'))); $settings->add_field('blog', 'post_tags', 'checkbox', __('Post Tags', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show the post tags below the single post.', 'vantage'))); $settings->add_field('blog', 'author_box', 'checkbox', __('Author Box', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show an author box below each blog post.', 'vantage'))); $settings->add_field('blog', 'comment_author', 'text', __("Post Author's Comments", 'vantage'), array('description' => __("Text displayed as a label next to the post author's comments.", 'vantage'), 'sanitize_callback' => 'wp_kses_post')); $settings->add_field('blog', 'read_more_button', 'checkbox', __('Read More Button', 'vantage'), array('label' => __('Display', 'vantage'), 'description' => __('Show read more button when Post Excerpt is chosen.', 'vantage'))); $settings->add_field('blog', 'read_more', 'text', __('Read More Text', 'vantage'), array('description' => __('The link displayed when post content is split using the "more" quicktag or when the read more button is enabled.', 'vantage'))); $settings->add_field('blog', 'circle_column_count', 'range', __('Circle Icon Archive Column Count', 'vantage'), array('description' => __('The number of columns to display when the circle icon archive layout is set.', 'vantage'), 'min' => 2, 'max' => 6, 'step' => 1)); $settings->add_field('blog', 'grid_column_count', 'range', __('Grid Archive Column Count', 'vantage'), array('description' => __('The number of columns to display when the grid archive layout is set.', 'vantage'), 'min' => 2, 'max' => 6, 'step' => 1)); /** * Social Settings */ $settings->add_teaser('social', 'ajax_comments', 'checkbox', __('Ajax Comments', 'vantage'), array('description' => __('Keep your conversations flowing with ajax comments.', 'vantage'), 'featured' => 'theme/ajax-comments')); /** * General Settings */ $settings->add_field('general', 'site_info_text', 'text', __('Site Information Text', 'vantage'), array('description' => __("Text displayed in your footer. {site-title}, {copyright} and {year} will be replaced with your website title, a copyright symbol and the current year.", 'vantage'), 'sanitize_callback' => 'wp_kses_post')); $settings->add_teaser('general', 'attribution', 'checkbox', __('SiteOrigin Attribution', 'vantage'), array('description' => __("Add or remove a link to SiteOrigin in your footer.", 'vantage'), 'featured' => 'theme/no-attribution')); $settings->add_field('general', 'js_enqueue_footer', 'checkbox', __('Enqueue JavaScript in Footer', 'vantage'), array('description' => __('Enqueue JavaScript files in the footer, if possible.', 'vantage'))); }