Example #1
0
    /* OptionTree is not loaded yet */
    if (!function_exists('ot_settings_id')) {
        return false;
    }
    /**
     * Get a copy of the saved settings array. 
     */
    $saved_settings = get_option(ot_settings_id(), array());
    /**
     * Custom settings array that will eventually be 
     * passes to the OptionTree Settings API Class.
     */
    $custom_settings = array('contextual_help' => array('content' => array(array('id' => 'option_types_help', 'title' => __('Option Types', 'themecountry'), 'content' => '<p>' . __('Help content goes here!', 'themecountry') . '</p>')), 'sidebar' => '<p>' . __('Sidebar content goes here!', 'themecountry') . '</p>'), 'sections' => array(array('id' => 'option_general', 'title' => __('General', 'themecountry')), array('id' => 'option_style', 'title' => __('Styles', 'themecountry')), array('id' => 'option_header', 'title' => __('Header', 'themecountry')), array('id' => 'option_footer', 'title' => __('Footer', 'themecountry')), array('id' => 'option_blog', 'title' => __('Home Page', 'themecountry')), array('id' => 'option_home_slider', 'title' => __('Feature Slider', 'themecountry')), array('id' => 'option_single', 'title' => __('Single Post', 'themecountry')), array('id' => 'option_sidebar', 'title' => __('Sidebar', 'themecountry')), array('id' => 'option_social_button', 'title' => __('Social Buttons', 'themecountry')), array('id' => 'option_typography', 'title' => __('Typography', 'themecountry')), array('id' => 'option_ad_mangment', 'title' => __('Ad Managment', 'themecountry')), array('id' => 'option_import_export', 'title' => __('Import/Export', 'themecountry'))), 'settings' => array(array('id' => 'responsive', 'label' => __('Responsiveness', 'themecountry'), 'desc' => __('Wimple pro is responsive witch mean that the layout is adapt to Mobile and table screen. Using This option to enable or disable responsiveness.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'header-code', 'label' => __('Header Code', 'themecountry'), 'desc' => __('If you have any code you want to appear between and , Pastes it here. For example: Google Web Master Cool Code or Pinterest Verify Code.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'tracking-code', 'label' => __('Footer Code (Tracing, JavaScript Code)', 'themecountry'), 'desc' => __('If you have tracking code (Google Analytic or other ), Pastes Your Code here which be inserted before the closing body tag of your theme.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_general', 'rows' => '3'), array('id' => 'page-comments', 'label' => __('Comment on Page', 'themecountry'), 'desc' => __('Use this option to to enable or completely Hide Comment and Comment form on Page', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'back_to_top', 'label' => __('Back To Top Button', 'themecountry'), 'desc' => __('Use this option to hide or show "Back To Top" button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_general'), array('id' => 'logo', 'label' => __('Custom Logo Image', 'themecountry'), 'desc' => __('Upload your custom logo image here.', 'themecountry'), 'type' => 'upload', 'section' => 'option_header'), array('id' => 'header_layout', 'label' => __('Header Layout', 'themecountry'), 'desc' => __('Use this option to Choose Header Design Style for your website.', 'themecountry'), 'std' => 'left', 'type' => 'radio-image', 'section' => 'option_header', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Header Content With Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/header-menu.png'), array('value' => 'right', 'label' => __('Header Suppurate From Navigation', 'themecountry'), 'src' => get_template_directory_uri() . '/images/header-layout/menu-out-of-header.png'))), array('id' => 'fixed_menu', 'label' => __('Floating Navigation Menu', 'themecountry'), 'desc' => __('Use this option to enable Floating Navigation Menu.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_header'), array('id' => 'footer-widgets', 'label' => __('Footer Widget Columns', 'themecountry'), 'desc' => __('Select Number of Columns for your Footer area or Disable it.', 'themecountry'), 'std' => '3', 'type' => 'radio-image', 'section' => 'option_footer', 'class' => '', 'choices' => array(array('value' => '0', 'label' => __('Disable', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/layout-off.png'), array('value' => '1', 'label' => __('1 Column', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-1.png'), array('value' => '2', 'label' => __('2 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-2.png'), array('value' => '3', 'label' => __('3 Columns', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/footer-widgets-3.png'))), array('id' => 'copyright', 'label' => __('Footer Copyright Text', 'themecountry'), 'desc' => __('Add Text you want to show in "Copyright Sction" at Bottom Left of your Website.', 'themecountry'), 'type' => 'textarea-simple', 'rows' => '3', 'section' => 'option_footer'), array('id' => 'post-text', 'label' => __('Home Page Entry Text', 'themecountry'), 'desc' => __('Use this option to show Expert or Full Content from your each post show on Homepage and Archive Page.', 'themecountry'), 'std' => 'excerpt', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'excerpt', 'label' => __('Show Excerpt', 'themecountry')), array('value' => 'content', 'label' => __('Show Content', 'themecountry')))), array('id' => 'home-post-read-more', 'label' => __('Read More Button', 'themecountry'), 'desc' => __('Enable or Disable Read More Button on Homepage for Each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'excerpt-length', 'label' => 'Excerpt Length', 'desc' => __('Number of word as Expert Length To be Shown in Homepage when you choose to show entry text as Excerpt.', 'themecountry'), 'std' => '34', 'type' => 'numeric-slider', 'section' => 'option_blog', 'min_max_step' => '0,100,1'), array('id' => 'home-post-meta', 'label' => __('HomePage & Single Post Meta Info', 'themecountry'), 'desc' => __('Use this button to Show or Hide Post Meta Info on HomePage. (Author name, Date etc.).', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_blog'), array('id' => 'home-post-meta-show', 'label' => __('What To Hide in Meta Info', 'themecountry'), 'desc' => __('Choose What Meta Info to Hide.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_blog', 'choices' => array(array('value' => 'autho_name', 'label' => __('Author Name', 'themecountry')), array('value' => 'date', 'label' => __('Date', 'themecountry')), array('value' => 'category', 'label' => __('Category', 'themecountry')), array('value' => 'tag', 'label' => __('Tag', 'themecountry')), array('value' => 'comment_count', 'label' => __('Comment Count', 'themecountry')))), array('id' => 'pagination', 'label' => __('Pagination', 'themecountry', 'themecountry'), 'desc' => __('Choose your Preferred Pagination Style.', 'themecountry'), 'std' => 'default', 'type' => 'radio', 'section' => 'option_blog', 'choices' => array(array('value' => 'default', 'label' => __('Default (Older Posts/Newer Posts)', 'themecountry')), array('value' => 'numberal', 'label' => __('Numberal (1 2 3 ...)', 'themecountry')), array('value' => 'loading', 'label' => __('Load More...', 'themecountry')), array('value' => 'infinite', 'label' => __('Auto Infinite Scroll', 'themecountry')))), array('id' => 'enable-home-slider', 'label' => __('Featured Content Slider', 'themecountry'), 'desc' => __('use this option to enable or Disable Featured Content Slider.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'number-of-post', 'label' => __('Number of Slides', 'themecountry'), 'desc' => __('Enter the number of Slides', 'themecountry'), 'std' => '5', 'type' => 'text', 'section' => 'option_home_slider'), array('id' => 'type-of-slider', 'label' => __('Use Categories Slider', 'themecountry'), 'desc' => __('Use Post from Category As Featured Content Sliders', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_home_slider'), array('id' => 'category-slide-option', 'label' => __('Choose Categories', 'themecountry'), 'desc' => '', 'std' => '', 'type' => 'category-checkbox', 'section' => 'option_home_slider', 'operator' => 'and'), array('id' => 'customize_slider_option', 'label' => __('Custom Sliders', 'themecountry'), 'desc' => __('With this option you can set up a Sliders with custom image and text instead of the default slidshow automatically generated from your posts.', 'themecountry'), 'std' => '', 'type' => 'list-item', 'section' => 'option_home_slider', 'operator' => 'and', 'settings' => array(array('id' => 'slide_image', 'label' => __('Image', 'themecountry'), 'desc' => __('Upload or select an image for this slide', 'themecountry'), 'type' => 'upload'), array('id' => 'slide_url', 'label' => __('Link', 'themecountry'), 'desc' => __('URL of the slide', 'themecountry'), 'std' => '#', 'type' => 'text', 'operator' => 'and'))), array('id' => 'author-bio', 'label' => __('Author Bio', 'themecountry'), 'desc' => __('Display Author Bio below each Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'author-highlight', 'label' => __('Highlight Author Comment', 'themecountry'), 'desc' => __('Use this Option to highlight author comments.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'breadcrumb', 'label' => __('Breadcrumbs', 'themecountry'), 'desc' => __('Use This Option to enable or Disable breadcrumbs.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'yoast_breadcrumb', 'desc' => __('Check it if you install WordPress SEO by Yoast', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_single', 'choices' => array(array('value' => 'yoast_breadcrumb_yes', 'label' => __('Use Yoast Breadcrumb', 'option-tree-theme')))), array('id' => 'post-nav', 'label' => __('Post Navigation', 'themecountry'), 'desc' => __('Shows links to the next and previous post', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'post-related', 'label' => __('Related Posts', 'themecountry'), 'desc' => __('Use This Option to enable or Disable related Posts below your Post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'related-posts-taxonomy', 'label' => __('Related Posts Taxonomy', 'themecountry'), 'desc' => __('Choose the Way Related Post Work.', 'themecountry'), 'std' => 'tag', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'tag', 'label' => 'Tags'), array('value' => 'category', 'label' => 'Categories'))), array('id' => 'number-related', 'std' => '3', 'label' => __('Number Related Posts', 'themecountry'), 'desc' => __('Enter the number of posts to show in the related posts section.', 'themecountry'), 'type' => 'text', 'section' => 'option_single'), array('id' => 'display-related-posts', 'label' => __('Display Related Posts', 'themecountry'), 'desc' => __('Related Posts type to display.'), 'std' => 'thumbnail', 'type' => 'radio', 'section' => 'option_single', 'choices' => array(array('value' => 'thumbnail', 'label' => __('Thumbnail and Title', 'themecountry')), array('value' => 'list', 'label' => __('Only Tittle, In List style.', 'themecountry')))), array('id' => 'pinterest', 'label' => __('Pinterest Pin In Button', 'themecountry'), 'desc' => __('Use This Option to enable or Disable Pinterest "Pin In" button which will be shown when visitor add mouse hover images in your post.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_single'), array('id' => 'sidebar-areas', 'label' => __('Create Sidebars', 'themecountry'), 'desc' => __('Create Custom Sidebars Here if you want to Have Different Sidebar for Homepage and Single Post and So on.', 'themecountry'), 'type' => 'list-item', 'section' => 'option_sidebar', 'choices' => array(), 'settings' => array(array('id' => 'id', 'label' => __('Sidebar ID', 'themecountry'), 'desc' => __('This ID must be unique, for example "sidebar-about"', 'themecountry'), 'std' => 'sidebar-select', 'type' => 'text', 'choices' => array()))), array('id' => 's1-home', 'label' => __('Home', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Hompage.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-single', 'label' => __('Single', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Single Post.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive', 'label' => __('Archive (Date Based)', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Archive Page (Date Based Archive)', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-archive-category', 'label' => __('Archive Category', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Category Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-search', 'label' => __('Search', 'themecountry'), 'desc' => __('Choose Sidebar to Show On Search Page', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-404', 'label' => __('Error 404', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Error 404, Page Not Found" Page.', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 's1-page', 'label' => __('Page', 'themecountry'), 'desc' => __('Choose Sidebar to Show On "Page".', 'themecountry'), 'type' => 'sidebar-select', 'section' => 'option_sidebar'), array('id' => 'tc-google-typography', 'label' => '', 'desc' => '', 'type' => 'typography-google', 'section' => 'option_typography'), array('id' => 'social-button-enable', 'label' => __('Social Sharing Button', 'themecountry'), 'desc' => __('Use This Option to Show Social Sharing Button.', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'twitter-username', 'label' => __('Twitter Username', 'themecountry'), 'desc' => __('Your @username will be added to share-tweets of your posts (optional)', 'themecountry'), 'type' => 'text', 'section' => 'option_social_button'), array('id' => 'social-sharing-pos', 'label' => __('Social Sharing Buttons Position', 'themecountry'), 'desc' => __('Choose position for Social Sharing Buttons.', 'themecountry'), 'type' => 'checkbox', 'section' => 'option_social_button', 'std' => 'top', 'choices' => array(array('value' => 'top', 'label' => __('After Title', 'themecountry')), array('value' => 'bottom', 'label' => __('After Post', 'themecountry')), array('value' => 'float', 'label' => __('Float Social To Left', 'themecountry')))), array('id' => 'social-twitter', 'label' => __('Twitter', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-facebook', 'label' => __('Facebook', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-google-plus', 'label' => __('Google Plus', 'themecountry'), 'std' => 'on', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-linkedin', 'label' => __('Linkedin', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'social-pinterest', 'label' => __('Pinterest', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_social_button'), array('id' => 'ad-header-banner', 'label' => __('Header Banner Ads', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown on the top of Header ( Note: This Ads won`t be shown If you choose the 1st design in Header Option )', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'ad-after-post-title', 'label' => __('Below Post Title', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post title.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'top-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-middle-post', 'label' => __('Middle Post Content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown right middle of your post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'middle-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'ad-below-post', 'label' => __('Below Post content', 'themecountry'), 'desc' => __('Paste Your Ads Code Here ( Adsense, Buy Sell Ads ). It will be shown Below Each Post.', 'themecountry'), 'type' => 'textarea-simple', 'section' => 'option_ad_mangment', 'rows' => '3'), array('id' => 'below-ads-position', 'label' => '', 'desc' => __('Choose Alignment Of your Ads.', 'themecountry'), 'type' => 'select', 'section' => 'option_ad_mangment', 'choices' => array(array('value' => 'ad-none', 'label' => __('None', 'themecountry')), array('value' => 'ad-left', 'label' => __('Left', 'themecountry')), array('value' => 'ad-center', 'label' => __('Center', 'themecountry')), array('value' => 'ad-right', 'label' => __('Right', 'themecountry')))), array('id' => 'duration-ads-top', 'label' => __('Ads and Post Age', 'themecountry'), 'desc' => __('Only Show Ads on Post Which is Older than number of days you choose.', 'themecountry'), 'type' => 'numeric-slider', 'std' => '100', 'section' => 'option_ad_mangment'), array('id' => 'layout-width-sidebar', 'label' => __('Layout', 'themecountry'), 'desc' => __('Choose To Show Sidebar On Left Or Right or No-Sidebar', 'themecountry'), 'std' => 'right', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'left', 'label' => __('Sidebare Left', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cr.png'), array('value' => 'right', 'label' => __('Sidebar Right', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-2cl.png'), array('value' => 'no-sidebar', 'label' => __('No Sidebar', 'themecountry'), 'src' => get_template_directory_uri() . '/images/layout/col-1cl.png'))), array('id' => 'on-off-option-style', 'label' => __('Custom Header Color', 'themecountry'), 'desc' => __('Enable Custom Header Color Setting Or Use Our Ready Made Color Scheme.', 'themecountry'), 'std' => 'off', 'type' => 'on-off', 'section' => 'option_style'), array('id' => 'header_style', 'label' => __('Ready Made Header Color Scheme', 'themecountry'), 'desc' => __('Choose Color You Like.', 'themecountry'), 'std' => 'default', 'type' => 'radio-image', 'section' => 'option_style', 'class' => '', 'choices' => array(array('value' => 'default', 'label' => '', 'src' => get_template_directory_uri() . '/images/default.jpg'), array('value' => 'green-sea', 'label' => '', 'src' => get_template_directory_uri() . '/images/green-sea.jpg'), array('value' => 'belize-hole', 'label' => '', 'src' => get_template_directory_uri() . '/images/belize-hole.jpg'), array('value' => 'wisteria', 'label' => '', 'src' => get_template_directory_uri() . '/images/wisteria.jpg'), array('value' => 'midnight-blue', 'label' => '', 'src' => get_template_directory_uri() . '/images/midnight-blue.jpg'), array('value' => 'orange', 'label' => '', 'src' => get_template_directory_uri() . '/images/orange.jpg'), array('value' => 'pumkin', 'label' => '', 'src' => get_template_directory_uri() . '/images/pumkin.jpg'), array('value' => 'asbestos', 'label' => '', 'src' => get_template_directory_uri() . '/images/asbestos.jpg'), array('value' => 'pomegranate', 'label' => '', 'src' => get_template_directory_uri() . '/images/pomegranate.jpg'))), array('id' => 'primary_header_color', 'label' => __('Custom Primary Header Color', 'themecountry'), 'desc' => __('Pick the primary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'secondary_header_color', 'label' => __('Custom Secondary Header Color', 'themecountry'), 'desc' => __('Pick the secondary header color.', 'themecountry'), 'type' => 'colorpicker', 'std' => '', 'section' => 'option_style', 'operator' => 'and'), array('id' => 'custom_style', 'label' => __('Custom CSS', 'themecountry'), 'desc' => __('Add you CSS Custom Code here. (Only For Advance User)', 'themecountry'), 'type' => 'css', 'section' => 'option_style', 'rows' => '3'), array('id' => 'text_desscription_import_export', 'desc' => sprintf(__('<b>Click link to <a href="%s">Import/Export</a></b>', 'themecountry'), admin_url('themes.php?page=tc-theme-backup')), 'std' => '', 'type' => 'textblock', 'section' => 'option_import_export')));
    /* allow settings to be filtered before saving */
    $custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);
    /* settings are not the same update the DB */
    if ($saved_settings !== $custom_settings) {
        update_option(ot_settings_id(), $custom_settings);
    }
    /* Lets OptionTree know the UI Builder is being overridden */
    global $ot_has_custom_theme_options;
    $ot_has_custom_theme_options = true;
}
/*--------------------------------------------------------------------
 * 
 * Default Font Settings
 *
 --------------------------------------------------------------------*/
if (function_exists('register_typography')) {
    register_typography(array('Logo Font' => array('preview_text' => 'Logo', 'preview_color' => 'dark', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '34px', 'css_selectors' => '.site-header .site-branding a, .top-site-branding .site-title a, .line-layout .site-header .site-title a, .line-layout .line-logo .line-site-title a'), 'primary_navigation_font' => array('preview_text' => 'Primary Navigation', 'preview_color' => 'dark', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '14px', 'font_color' => '#fff', 'additional_css' => 'text-transform: uppercase;', 'css_selectors' => '.main-navigation .nav-menu li a'), 'home_title_font' => array('preview_text' => 'Home Post Title', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_size' => '24px', 'font_variant' => '700', 'font_color' => '#333', 'css_selectors' => '.entry-header .entry-title a'), 'single_title_font' => array('preview_text' => 'Single Post Title', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_size' => '32px', 'font_variant' => '700', 'font_color' => '#333', 'css_selectors' => '.page .entry-title, .single-post .entry-title'), 'content_font' => array('preview_text' => 'Body Text', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_size' => '18px', 'font_variant' => 'normal', 'font_color' => '#333', 'css_selectors' => 'body, .widget ul li a,.f-widget ul li a .site-footer .textwidget'), 'sidebar_title_font' => array('preview_text' => 'Sidebar Title', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => '500', 'font_size' => '18px', 'font_color' => '#333', 'css_selectors' => '.widget-title, .site-footer-widget .widget-title', 'additional_css' => 'text-transform: uppercase;'), 'h1_headline' => array('preview_text' => 'H1 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '36px', 'font_color' => '#333', 'css_selectors' => 'h1'), 'h2_headline' => array('preview_text' => 'H2 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '32px', 'font_color' => '#333', 'css_selectors' => 'h2'), 'h3_headline' => array('preview_text' => 'H3 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '24px', 'font_color' => '#333', 'css_selectors' => 'h3'), 'h4_headline' => array('preview_text' => 'H4 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '20px', 'font_color' => '#333', 'css_selectors' => 'h4'), 'h5_headline' => array('preview_text' => 'H5 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '18px', 'font_color' => '#333', 'css_selectors' => 'h5'), 'h6_headline' => array('preview_text' => 'H6 Headline', 'preview_color' => 'light', 'font_family' => 'Montserrat', 'font_variant' => 'normal', 'font_size' => '16px', 'font_color' => '#333', 'css_selectors' => 'h6')));
}
Example #2
0
 */
function validate_callback_function($field, $value, $existing_value)
{
    $error = false;
    $value = 'just testing';
    /*
    do your validation
    
    if(something){
        $value = $value;
    }elseif(somthing else){
        $error = true;
        $value = $existing_value;
        $field['msg'] = 'your custom error message';
    }
    */
    $return['value'] = $value;
    if ($error == true) {
        $return['error'] = $field;
    }
    return $return;
}
//function
/*--------------------------------------------------------------------
 * 
 * Default Font Settings
 *
 --------------------------------------------------------------------*/
if (function_exists('register_typography')) {
    register_typography(array('navigation_font' => array('preview_text' => 'Navigation Font', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '14px', 'font_color' => '#222222', 'css_selectors' => '.menu li, .menu li a', 'additional_css' => 'text-transform: uppercase;'), 'home_title_font' => array('preview_text' => 'Blog Article Title', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_size' => '30px', 'font_variant' => '500', 'font_color' => '#222', 'css_selectors' => '.latestPost .title a', 'additional_css' => 'text-transform: uppercase;'), 'single_title_font' => array('preview_text' => 'Single Article Title', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_size' => '30px', 'font_variant' => '500', 'font_color' => '#222', 'css_selectors' => '.single-title', 'additional_css' => 'text-transform: uppercase;'), 'content_font' => array('preview_text' => 'Content Font', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_size' => '15px', 'font_variant' => 'normal', 'font_color' => '#222', 'css_selectors' => 'body'), 'sidebar_title' => array('preview_text' => 'Sidebar Widget Title', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '18px', 'font_color' => '#444444', 'css_selectors' => '#sidebars h3'), 'sidebar_font' => array('preview_text' => 'Sidebar Font', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => 'normal', 'font_size' => '14px', 'font_color' => '#444444', 'css_selectors' => '#sidebars .widget'), 'h1_headline' => array('preview_text' => 'H1 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '28px', 'font_color' => '#222222', 'css_selectors' => 'h1', 'additional_css' => 'text-transform: uppercase;'), 'h2_headline' => array('preview_text' => 'H2 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '24px', 'font_color' => '#222222', 'css_selectors' => 'h2', 'additional_css' => 'text-transform: uppercase;'), 'h3_headline' => array('preview_text' => 'H3 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '22px', 'font_color' => '#222222', 'css_selectors' => 'h3', 'additional_css' => 'text-transform: uppercase;'), 'h4_headline' => array('preview_text' => 'H4 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '20px', 'font_color' => '#222222', 'css_selectors' => 'h4', 'additional_css' => 'text-transform: uppercase;'), 'h5_headline' => array('preview_text' => 'H5 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '18px', 'font_color' => '#222222', 'css_selectors' => 'h5', 'additional_css' => 'text-transform: uppercase;'), 'h6_headline' => array('preview_text' => 'H6 Headline', 'preview_color' => 'light', 'font_family' => 'Ubuntu', 'font_variant' => '500', 'font_size' => '16px', 'font_color' => '#222222', 'css_selectors' => 'h6', 'additional_css' => 'text-transform: uppercase;')));
}
Example #3
0
 */
function validate_callback_function($field, $value, $existing_value)
{
    $error = false;
    $value = 'just testing';
    /*
    do your validation
    
    if(something){
    	$value = $value;
    }elseif(somthing else){
    	$error = true;
    	$value = $existing_value;
    	$field['msg'] = 'your custom error message';
    }
    */
    $return['value'] = $value;
    if ($error == true) {
        $return['error'] = $field;
    }
    return $return;
}
//function
/*--------------------------------------------------------------------
 * 
 * Default Font Settings
 *
 --------------------------------------------------------------------*/
if (function_exists('register_typography')) {
    register_typography(array('logo_font' => array('preview_text' => 'Logo', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => '500', 'font_size' => '44px', 'font_color' => '#33bcf2', 'css_selectors' => '#logo a'), 'navigation_font' => array('preview_text' => 'Navigation Font', 'preview_color' => 'dark', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '18px', 'font_color' => '#ffffff', 'css_selectors' => '.primary-navigation li, .primary-navigation li a', 'additional_css' => 'text-transform: uppercase;'), 'home_title_font' => array('preview_text' => 'Home Article Title', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_size' => '24px', 'font_variant' => 'normal', 'font_color' => '#555555', 'css_selectors' => '.latestPost .title, .latestPost .title a', 'additional_css' => 'line-height: 36px;'), 'single_title_font' => array('preview_text' => 'Single Article Title', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_size' => '38px', 'font_variant' => 'normal', 'font_color' => '#555555', 'css_selectors' => '.single-title', 'additional_css' => 'line-height: 53px;'), 'content_font' => array('preview_text' => 'Content Font', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_size' => '16px', 'font_variant' => 'normal', 'font_color' => '#707070', 'css_selectors' => 'body'), 'sidebar_title_font' => array('preview_text' => 'Widget Title', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => '500', 'font_size' => '18px', 'font_color' => '#555555', 'css_selectors' => '.widget .widget-title', 'additional_css' => 'text-transform: uppercase;'), 'sidebar_font' => array('preview_text' => 'Sidebar Font', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '16px', 'font_color' => '#707070', 'css_selectors' => '#sidebars .widget'), 'footer_font' => array('preview_text' => 'Footer Font', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '14px', 'font_color' => '#707070', 'css_selectors' => '.footer-widgets'), 'h1_headline' => array('preview_text' => 'Content H1', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '38px', 'font_color' => '#555555', 'css_selectors' => 'h1'), 'h2_headline' => array('preview_text' => 'Content H2', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '34px', 'font_color' => '#555555', 'css_selectors' => 'h2'), 'h3_headline' => array('preview_text' => 'Content H3', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '30px', 'font_color' => '#555555', 'css_selectors' => 'h3'), 'h4_headline' => array('preview_text' => 'Content H4', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '28px', 'font_color' => '#555555', 'css_selectors' => 'h4'), 'h5_headline' => array('preview_text' => 'Content H5', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '24px', 'font_color' => '#555555', 'css_selectors' => 'h5'), 'h6_headline' => array('preview_text' => 'Content H6', 'preview_color' => 'light', 'font_family' => 'Roboto', 'font_variant' => 'normal', 'font_size' => '20px', 'font_color' => '#555555', 'css_selectors' => 'h6')));
}
Example #4
0
 */
function validate_callback_function($field, $value, $existing_value)
{
    $error = false;
    $value = 'just testing';
    /*
    do your validation
    
    if(something){
    	$value = $value;
    }elseif(somthing else){
    	$error = true;
    	$value = $existing_value;
    	$field['msg'] = 'your custom error message';
    }
    */
    $return['value'] = $value;
    if ($error == true) {
        $return['error'] = $field;
    }
    return $return;
}
//function
/*--------------------------------------------------------------------
 * 
 * Default Font Settings
 *
 --------------------------------------------------------------------*/
if (function_exists('register_typography')) {
    register_typography(array('h1_headline' => array('preview_text' => 'H1 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '28px', 'font_color' => '#555555', 'css_selectors' => 'h1'), 'h2_headline' => array('preview_text' => 'H2 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '24px', 'font_color' => '#555555', 'css_selectors' => 'h2'), 'h3_headline' => array('preview_text' => 'H3 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '22px', 'font_color' => '#555555', 'css_selectors' => 'h3'), 'h4_headline' => array('preview_text' => 'H4 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '20px', 'font_color' => '#555555', 'css_selectors' => 'h4'), 'h5_headline' => array('preview_text' => 'H5 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '18px', 'font_color' => '#555555', 'css_selectors' => 'h5'), 'h6_headline' => array('preview_text' => 'H6 Headline', 'preview_color' => 'light', 'font_family' => 'Open Sans', 'font_variant' => '700', 'font_size' => '16px', 'font_color' => '#555555', 'css_selectors' => 'h6'), 'navigation_font' => array('preview_text' => 'Navigation Font', 'preview_color' => 'light', 'font_family' => '', 'font_variant' => '', 'font_size' => '14px', 'font_color' => '#404040', 'css_selectors' => '#navigation ul li a'), 'content_font' => array('preview_text' => 'Content Font', 'preview_color' => 'light', 'font_family' => '', 'font_size' => '14px', 'font_variant' => '', 'font_color' => '#696868', 'css_selectors' => 'body')));
}