static function add_options()
 {
     $opt_name = "webidia_framework_opts";
     $args = array('opt_name' => $opt_name, 'use_cdn' => TRUE, 'display_name' => 'Webidia Framework Options', 'display_version' => FALSE, 'page_title' => 'Webidia Framework Options', 'update_notice' => TRUE, 'intro_text' => '', 'footer_text' => '', 'menu_type' => 'submenu', 'allow_sub_menu' => TRUE, 'menu_title' => 'Options', 'page_parent' => 'webidia-framework', 'customizer' => TRUE, 'admin_bar' => FALSE, 'dev_mode' => FALSE, 'default_mark' => '*', 'hints' => array('icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light'), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('duration' => '500', 'event' => 'mouseover'), 'hide' => array('duration' => '500', 'event' => 'mouseleave unfocus'))), 'output' => TRUE, 'output_tag' => TRUE, 'settings_api' => TRUE, 'cdn_check_time' => '1440', 'compiler' => TRUE, 'page_permissions' => 'manage_options', 'save_defaults' => TRUE, 'show_import_export' => TRUE, 'database' => 'options', 'transient_time' => '3600', 'network_sites' => TRUE);
     Redux::setArgs($opt_name, $args);
     $tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'admin_folder'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'admin_folder')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'admin_folder'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'admin_folder')));
     Redux::setHelpTab($opt_name, $tabs);
     $content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'admin_folder');
     Redux::setHelpSidebar($opt_name, $content);
     Redux::setSection($opt_name, array('title' => __('Plugins', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-adjust-alt', 'fields' => array(array('id' => 'wf_options_general_basic_smoothscroll', 'type' => 'switch', 'title' => __('Smooth Scroll', 'webidia_framework'), 'subtitle' => __('', 'webidia_framework'), 'default' => true, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'wf_options_general_basic_animations', 'type' => 'switch', 'title' => __('Animations', 'webidia_framework'), 'subtitle' => __('', 'webidia_framework'), 'default' => true, 'on' => 'Enabled', 'off' => 'Disabled'))));
     Redux::setSection($opt_name, array('title' => __('Page Builder', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-adjust-alt', 'fields' => array(array('id' => 'disable_spb', 'type' => 'button_set', 'title' => __('Webidia Page Builder', 'webidiaframework'), 'subtitle' => __('Enable/Disable the Webidia Page Builder functionality with this option.', 'webidiaframework'), 'desc' => '', 'options' => array('1' => 'Disabled', '0' => 'Enabled'), 'default' => '0'), array('id' => 'spb-post-types', 'type' => 'select', 'data' => 'post_types', 'multi' => true, 'default' => array('page', 'post', 'portfolio', 'team', 'spb-section'), 'title' => __('Page Builder Post Types', 'webidiaframework'), 'desc' => __('Select here which post types you would like to enable the page builder for.', 'webidiaframework')))));
     Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-1'));
     Redux::setSection($opt_name, array('title' => __('Webidia Slider', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-website', 'fields' => array(array('id' => 'disable_ss', 'type' => 'button_set', 'title' => __('Webidia Slider', 'webidiaframework'), 'subtitle' => __('Enable/Disable the Webidia Slider functionality with this option.', 'webidiaframework'), 'desc' => '', 'options' => array('1' => 'Disabled', '0' => 'Enabled'), 'default' => '0'))));
     Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-2'));
     Redux::setSection($opt_name, array('title' => __('Custom Post Types', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-view-mode', 'fields' => array(array('id' => 'cpt-disable', 'type' => 'checkbox', 'title' => __('Disable Custom Post Types', 'webidiaframework'), 'subtitle' => __('You can disable the custom post types used within the theme here, by checking the corresponding box. NOTE: If you do not want to disable any, then make sure none of the boxes are checked.', 'webidiaframework'), 'options' => array('portfolio' => 'Portfolio', 'galleries' => 'Galleries', 'team' => 'Team', 'clients' => 'Clients', 'testimonials' => 'Testimonials', 'directory' => 'Directory', 'faqs' => 'FAQ', 'spb-section' => 'SPB Section'), 'default' => array('portfolio' => '0', 'galleries' => '0', 'team' => '0', 'clients' => '0', 'testimonials' => '0', 'directory' => '0', 'webidia-slider' => '0')))));
     Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-3'));
     Redux::setSection($opt_name, array('title' => __('Performance', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-fire', 'fields' => array(array('id' => 'enable_min_styles', 'type' => 'button_set', 'title' => __('Load pre-minified stylesheets', 'webidia-builder'), 'subtitle' => __('Enable this option to load pre-minified stlysheets, for faster page speed.', 'webidia-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'), array('id' => 'enable_min_scripts', 'type' => 'button_set', 'title' => __('Load pre-minified scripts', 'webidia-builder'), 'subtitle' => __('Enable this option to load pre-minified scripts, for faster page speed.', 'webidia-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'))));
 }
/**
 * ---> SET ARGUMENTS
 * All the possible arguments for Redux.
 * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
 * */
$args = array('opt_name' => $opt_name, 'display_name' => 'Vehicle Booking System', 'display_version' => '1.0.0', 'menu_type' => 'submenu', 'allow_sub_menu' => false, 'menu_title' => __('VBS Options', 'vbs'), 'page_title' => __('Vehicle Booking Options', 'vbs'), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => false, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => '', 'dev_mode' => false, 'update_notice' => false, 'customizer' => false, 'page_priority' => null, 'page_parent' => 'vbs_admin_menu', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'vbs_options', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'database' => '', 'use_cdn' => false, 'hints' => array('icon' => 'fa fa-question', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light', 'shadow' => true, 'rounded' => false, 'style' => ''), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('effect' => 'slide', 'duration' => '500', 'event' => 'mouseover'), 'hide' => array('effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave'))));
$args['share_icons'][] = array('url' => 'http://www.facebook.com/interactivedes', 'title' => 'Like us on Facebook', 'icon' => 'fa fa-facebook');
$args['share_icons'][] = array('url' => 'http://twitter.com/intera_design', 'title' => 'Follow us on Twitter', 'icon' => 'fa fa-twitter');
$args['share_icons'][] = array('url' => 'http://www.linkedin.com/companies/820832', 'title' => 'Find us on LinkedIn', 'icon' => 'fa fa-linkedin');
$args['share_icons'][] = array('url' => 'http://github.com/gnikolopoulos', 'title' => 'Find us on GitHub', 'icon' => 'fa fa-github');
// Add content after the form.
$args['footer_text'] = __('<p>Development by <a href="http://interactive-design.gr" target="_blank" >Interactive Design | creative studio</a></p>', 'vbs');
Redux::setArgs($opt_name, $args);
/*
 * ---> END ARGUMENTS
 */
/*
 *
 * ---> START SECTIONS
 *
 */
Redux::setSection($opt_name, array('title' => __('General', 'vbs'), 'id' => 'opt-general', 'icon' => 'fa fa-cogs', 'fields' => array(array('id' => 'use_base', 'type' => 'switch', 'title' => __('Use base Location', 'vbs'), 'default' => true), array('id' => 'base_location', 'type' => 'text', 'title' => __('Set your base location', 'vbs'), 'default' => 'Pl. Sintagmatos, Athina 105 63, Greece'), array('id' => 'currency_symbol', 'type' => 'text', 'title' => __('Set Currency symbol', 'vbs'), 'default' => '€'))));
Redux::setSection($opt_name, array('title' => __('Styling', 'vbs'), 'id' => 'opt-styling', 'icon' => 'fa fa-paint-brush', 'fields' => array(array('id' => 'form_style', 'type' => 'button_set', 'title' => __('Form Style', 'vbs'), 'options' => array('stacked' => 'Stacked', 'horizontal' => 'Horizontal'), 'default' => 'stacked'))));
Redux::setSection($opt_name, array('title' => __('PayPal', 'vbs'), 'id' => 'opt-paypal', 'icon' => 'fa fa-paypal', 'fields' => array(array('id' => 'paypal_email', 'type' => 'text', 'title' => __('PayPal email', 'vbs'), 'default' => '*****@*****.**', 'validate' => 'email'), array('id' => 'paypal_mode', 'type' => 'switch', 'title' => __('Sandbox mode', 'vbs'), 'subtitle' => __('Enable PayPal Sandbox mode', 'vbs'), 'default' => true), array('id' => 'business_name', 'type' => 'text', 'title' => __('Will appear on the PayPal form', 'vbs'), 'default' => 'Your Company LLC.'), array('id' => 'currency_code', 'type' => 'text', 'title' => __('Currency', 'vbs'), 'default' => 'USD'), array('id' => 'return_page', 'type' => 'select', 'title' => __('Page to return to after transaction', 'vbs'), 'data' => 'pages'))));
Redux::setSection($opt_name, array('title' => __('Email', 'vbs'), 'id' => 'opt-email', 'icon' => 'fa fa-envelope', 'fields' => array(array('id' => 'default_email', 'type' => 'text', 'title' => __('Email to be used as the From: field', 'vbs'), 'default' => '*****@*****.**', 'validate' => 'email'), array('id' => 'email_mode', 'type' => 'switch', 'title' => __('Use PHP mailer?', 'vbs'), 'subtitle' => __('Use PHP Mailer instead of wp_mail()', 'vbs'), 'default' => true))));
Redux::setSection($opt_name, array('title' => __('PHP Mailer', 'vbs'), 'desc' => __('Only needed when you don\'t want to use wp_mail()', 'vbs'), 'id' => 'opt-mailer', 'icon' => 'fa fa-paper-plane', 'fields' => array(array('id' => 'smtp_host', 'type' => 'text', 'title' => __('SMTP Host', 'vbs'), 'default' => 'mail.example.com'), array('id' => 'smtp_port', 'type' => 'text', 'title' => __('SMTP Port', 'vbs'), 'default' => '25'), array('id' => 'smtp_auth', 'type' => 'switch', 'title' => __('SMTP requires authentication?', 'vbs'), 'default' => true), array('id' => 'smtp_secure', 'type' => 'radio', 'title' => __('Use  SSL/TLS?', 'vbs'), 'options' => array('none' => 'None', 'ssl' => 'Use SSL', 'tls' => 'Use TLS'), 'default' => 'none'), array('id' => 'smtp_login', 'type' => 'password', 'username' => true, 'title' => 'SMTP Account', 'placeholder' => array('username' => 'SMTP username', 'password' => 'SMTP Password')))));
Redux::setSection($opt_name, array('title' => __('Email Template', 'vbs'), 'id' => 'opt-template', 'icon' => 'fa fa-columns', 'fields' => array(array('id' => 'email_logo', 'type' => 'media', 'url' => true, 'title' => __('Logo image', 'vbs'), 'subtitle' => __('140x50px', 'vbs'), 'default' => array('url' => PLUGIN_DIR_URL . 'templates/default/img/logo.jpg')), array('id' => 'email_banner', 'type' => 'media', 'url' => true, 'title' => __('Heading image', 'vbs'), 'subtitle' => __('600x300px', 'vbs'), 'default' => array('url' => PLUGIN_DIR_URL . 'templates/default/img/banner.jpg')), array('id' => 'email_template', 'type' => 'text', 'title' => __('Folder name that contains the mail template', 'vbs'), 'subtitle' => __('Must be under the /templates folder', 'vbs'), 'default' => 'default'), array('id' => 'email_title', 'type' => 'text', 'title' => __('Email title/Subject', 'vbs'), 'default' => 'Your booking details'), array('id' => 'email_heading', 'type' => 'text', 'title' => __('Header text for notification emails', 'vbs'), 'default' => 'Thank you for booking with us!'), array('id' => 'email_intro', 'type' => 'textarea', 'title' => __('Email intro text', 'vbs'), 'subtitle' => __('No HTML allowed', 'vbs'), 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo', 'validate' => 'no_html'))));
Redux::setSection($opt_name, array('title' => __('Social', 'vbs'), 'id' => 'opt-social', 'icon' => 'fa fa-share-alt', 'fields' => array(array('id' => 'facebook_url', 'type' => 'text', 'title' => __('Your Facebook page/profile URL', 'vbs'), 'default' => 'http://facebook.com', 'validate' => 'url'), array('id' => 'linkedin_url', 'type' => 'text', 'title' => __('Your LinkedIn profile URL', 'vbs'), 'default' => 'http://linkedin.com', 'validate' => 'url'), array('id' => 'twitter_url', 'type' => 'text', 'title' => __('Your Twitter profile URL', 'vbs'), 'default' => 'http://twitter.com', 'validate' => 'url'))));
/*
 * <--- END SECTIONS
 */
/*
 * ---> END ARGUMENTS
 */
/*
 * ---> START HELP TABS
 */
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')));
Redux::setHelpTab($opt_name, $tabs);
// Set the help sidebar
$content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'redux-framework-demo');
Redux::setHelpSidebar($opt_name, $content);
/*
 * <--- END HELP TABS
 */
/*
 *
 * ---> START SECTIONS
 *
 */
/*

        As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Basic Field', 'redux-framework-demo'), 'id' => 'basic', 'desc' => __('Basic field with no subsections.', 'redux-framework-demo'), 'icon' => 'el el-home', 'fields' => array(array('id' => 'opt-text', 'type' => 'text', 'title' => __('Example Text', 'redux-framework-demo'), 'desc' => __('Example description.', 'redux-framework-demo'), 'subtitle' => __('Example subtitle.', 'redux-framework-demo'), 'hint' => array('content' => 'This is a <b>hint</b> tool-tip for the text field.<br/><br/>Add any HTML based text you like here.')))));
Redux::setSection($opt_name, array('title' => __('Basic Fields', 'redux-framework-demo'), 'id' => 'basic', 'desc' => __('Basic fields as subsections.', 'redux-framework-demo'), 'icon' => 'el el-home'));
Redux::setSection($opt_name, array('title' => __('Text', 'redux-framework-demo'), 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="//docs.reduxframework.com/core/fields/text/" target="_blank">//docs.reduxframework.com/core/fields/text/</a>', 'id' => 'opt-text-subsection', 'subsection' => true, 'fields' => array(array('id' => 'text-example', 'type' => 'text', 'title' => __('Text Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Field Description', 'redux-framework-demo'), 'default' => 'Default Text'))));
Redux::setSection($opt_name, array('title' => __('Text Area', 'redux-framework-demo'), 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="//docs.reduxframework.com/core/fields/textarea/" target="_blank">//docs.reduxframework.com/core/fields/textarea/</a>', 'id' => 'opt-textarea-subsection', 'subsection' => true, 'fields' => array(array('id' => 'textarea-example', 'type' => 'textarea', 'title' => __('Text Area Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Field Description', 'redux-framework-demo'), 'default' => 'Default Text'))));
/*
 * <--- END SECTIONS
 */
Пример #4
0
 * ---> SET ARGUMENTS
 * All the possible arguments for Redux.
 * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
 * */
/*ADDED in Ultra Admin - START */
// manageoptions and super admin
$ultraadmin_permissions = ultra_get_option("ultraadmin_plugin_access", "manage_options");
if ($ultraadmin_permissions == "super_admin" && is_super_admin()) {
    $ultraadmin_permissions = 'manage_options';
}
// specific user
$ultraadmin_userid = ultra_get_option("ultraadmin_plugin_userid", "");
if ($ultraadmin_permissions == "specific_user" && $ultraadmin_userid == get_current_user_id()) {
    $ultraadmin_permissions = 'read';
}
// if plugin is network activated, then hide it from inner sites.
$menu_type = 'menu';
if (!function_exists('is_plugin_active_for_network')) {
    require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
// Makes sure the plugin is defined before trying to use it
if (is_plugin_active_for_network('ultra-admin/ultra-core.php')) {
    if (!is_main_site()) {
        $menu_type = 'hidden';
    }
}
/*ADDED in Ultra Admin - END*/
// $theme = wp_get_theme(); // For use with some settings. Not necessary.
$args = array('opt_name' => $manager_option, 'display_name' => 'Quản lý thiết bị phòng thực hành', 'display_version' => '1.0', 'menu_type' => $menu_type, 'allow_sub_menu' => true, 'menu_title' => __('Management', 'redux-framework-ultra-demo'), 'page_title' => __('Management', 'redux-framework-ultra-demo'), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => true, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => 'manager_option', 'dev_mode' => false, 'update_notice' => true, 'customizer' => false, 'page_priority' => null, 'page_parent' => 'themes.php', 'page_permissions' => $ultraadmin_permissions, 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'manager_control', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'footer_credit' => '&nbsp;', 'database' => '', 'system_info' => false, 'hints' => array('icon' => 'el el-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light', 'shadow' => true, 'rounded' => false, 'style' => ''), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('effect' => 'slide', 'duration' => '500', 'event' => 'mouseover'), 'hide' => array('effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave'))));
Redux::setArgs($manager_option, $args);
function vortex_systen_main_function()
{
    if (!function_exists('is_plugin_active')) {
        include_once ABSPATH . 'wp-admin/includes/plugin.php';
    }
    if (class_exists('myCRED_Hook')) {
        include plugin_dir_path(__FILE__) . 'mycredcomments.php';
        include plugin_dir_path(__FILE__) . 'mycredposts.php';
        function vortex_mycred_references_filter($references)
        {
            $references['vortex_like_posts_mycred_author_content'] = __('Receive like for posts(content author)', 'vortex_system_ld');
            $references['vortex_like_posts_mycred_author'] = __('Receive like for posts(like author)', 'vortex_system_ld');
            $references['vortex_like_coms_mycred_author_content'] = __('Receive like for comments(content author)', 'vortex_system_ld');
            $references['vortex_like_coms_mycred_author'] = __('Receive like for comments(like author)', 'vortex_system_ld');
            return $references;
        }
        add_filter('mycred_all_references', 'vortex_mycred_references_filter');
    }
    if (function_exists('is_plugin_active')) {
        if (is_plugin_active('redux-framework/redux-framework.php')) {
            load_plugin_textdomain('vortex_system_ld', FALSE, basename(plugin_dir_path(__FILE__)) . '/languages');
            $reduxoption = plugin_dir_path(__FILE__) . 'admin/vortexlikedislike.php';
            $reduxframework = plugin_dir_path(plugin_dir_path(__FILE__)) . 'redux-framework/ReduxCore/framework.php';
            if (!class_exists('ReduxFramework') && file_exists($reduxframework)) {
                include $reduxframework;
            }
            if (!isset($vortex_like_dislike) && file_exists($reduxoption)) {
                include $reduxoption;
            }
            //donation button
            function vortex_system_donation_button()
            {
                echo '<form style="width:260px;margin:0 auto;" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
						<input type="hidden" name="cmd" value="_s-xclick">
						<input type="hidden" name="hosted_button_id" value="VVGFFVJSFVZ7S">
						<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
						<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
						</form>
						';
            }
            add_action('redux/vortex_like_dislike/panel/before', 'vortex_system_donation_button');
            add_action('redux/vortex_like_dislike/panel/after', 'vortex_system_donation_button');
            Redux::init('vortex_like_dislike');
            global $vortex_like_dislike;
            if ($vortex_like_dislike['v-switch-posts'] && isset($vortex_like_dislike['v-switch-posts'])) {
                include plugin_dir_path(__FILE__) . 'posts-pages.php';
                //load metabox
                include plugin_dir_path(__FILE__) . 'metabox.php';
            }
            if ($vortex_like_dislike['v-switch-comments'] && isset($vortex_like_dislike['v-switch-comments'])) {
                include plugin_dir_path(__FILE__) . 'comments.php';
            }
            //add custom fields when comment is submited
            add_action('comment_post', 'vortex_system_add_likes_dislikes_comments');
            function vortex_system_add_likes_dislikes_comments($comment_ID)
            {
                global $vortex_like_dislike;
                $likes = 0;
                $dislikes = 0;
                if (isset($vortex_like_dislike['v_start_comment_like'])) {
                    $likes = $vortex_like_dislike['v_start_comment_like'];
                }
                if (isset($vortex_like_dislike['v_start_comment_dislike'])) {
                    $dislikes = $vortex_like_dislike['v_start_comment_dislike'];
                }
                add_comment_meta($comment_ID, 'vortex_system_likes', $likes, true);
                add_comment_meta($comment_ID, 'vortex_system_dislikes', $dislikes, true);
            }
            //add custom fields when post is published
            add_action('publish_post', 'post_published_notification');
            function post_published_notification($ID)
            {
                global $vortex_like_dislike;
                $likes = 0;
                $dislikes = 0;
                if (isset($vortex_like_dislike['v_start_post_like'])) {
                    $likes = $vortex_like_dislike['v_start_post_like'];
                }
                if (isset($vortex_like_dislike['v_start_post_dislike'])) {
                    $dislikes = $vortex_like_dislike['v_start_post_dislike'];
                }
                add_post_meta($ID, 'vortex_system_likes', $likes, true);
                add_post_meta($ID, 'vortex_system_dislikes', $dislikes, true);
            }
        }
    }
}
Пример #6
0
<?php

// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Pages', 'span'), 'id' => 'pages_options', 'desc' => __('General Options for Pages', 'span'), 'customizer_width' => '400px', 'icon' => 'el el-file'));
global $option_namespace;
$option_namespace = 'pages';
require get_template_directory() . '/admin/parts/_global-options.php';
						<td>activate ShopStyler customizer</td>
					</tr>
					<tr>
						<td>Set Shop as homepage</td>
						<td>When enabled will set WordPress homepage to the shop page</td>
					</tr>
					<tr>
						<td>Set Shop as homepage</td>
						<td>When enabled will set WordPress homepage to the shop page</td>
					</tr>
				</table>
				', 'shopstyler-plugin')), array('id' => 'redux-help-tab-2', 'title' => __('Shop Page', 'shopstyler-plugin'), 'content' => __('<p>Shop Page settings</p>', 'shopstyler-plugin')), array('id' => 'redux-help-tab-3', 'title' => __('Product Page', 'shopstyler-plugin'), 'content' => __('<p>Product Page settings</p>', 'shopstyler-plugin')), array('id' => 'redux-help-tab-4', 'title' => __('Sidebar', 'shopstyler-plugin'), 'content' => __('<p>Sidebar settings</p>', 'shopstyler-plugin')));
Redux::setHelpTab($opt_name, $tabs);
// Set the help sidebar
$content = __('<p>ShopStyler Documentation</p><a href="http://shopstyler.moodgiver.com/docs"><button>Read</button></a>', 'shopstyler-plugin');
Redux::setHelpSidebar($opt_name, $content);
/*
 * <--- END HELP TABS
 */
//load custom palettes
/*
 *
 * ---> START SECTIONS
 *
 */
/*

        As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
/*************************** START SETTINGS
    
Пример #8
0
<?php

/*
 * Header Options
 */
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Header', 'inspiry'), 'id' => 'header-section', 'desc' => __('This section contains options for header.', 'inspiry'), 'fields' => array(array('id' => 'inspiry_header_variation', 'type' => 'image_select', 'title' => __('Header Design Variation', 'inspiry'), 'subtitle' => __('Select the design variation that you want to use for site header.', 'inspiry'), 'options' => array('1' => array('title' => __('1st Variation', 'inspiry'), 'img' => get_template_directory_uri() . '/inc/theme-options/images/header-variation-1.png'), '2' => array('title' => __('2nd Variation', 'inspiry'), 'img' => get_template_directory_uri() . '/inc/theme-options/images/header-variation-2.png')), 'default' => '1'), array('id' => 'inspiry_header_menu_title', 'type' => 'text', 'title' => __('Menu Button Title', 'inspiry'), 'default' => __('Menu', 'inspiry'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_favicon', 'type' => 'media', 'url' => false, 'title' => __('Favicon', 'inspiry'), 'subtitle' => __('Upload your website favicon.', 'inspiry')), array('id' => 'inspiry_logo', 'type' => 'media', 'url' => false, 'title' => __('Logo', 'inspiry'), 'subtitle' => __('Upload logo image for your Website. Otherwise site title will be displayed in place of logo.', 'inspiry')), array('id' => 'inspiry_header_phone', 'type' => 'text', 'title' => __('Phone Number', 'inspiry'), 'default' => ''), array('id' => 'inspiry_facebook_url', 'type' => 'text', 'title' => __('Facebook URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_twitter_url', 'type' => 'text', 'title' => __('Twitter URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_google_url', 'type' => 'text', 'title' => __('Google Plus URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_banner_image', 'type' => 'media', 'url' => false, 'title' => __('Banner Image', 'inspiry'), 'desc' => __('Banner image should have minimum width of 2000px and minimum height of 320px.', 'inspiry'), 'subtitle' => __('This banner image will be displayed on all the pages where banner image is not overridden by page specific banner settings.', 'inspiry')), array('id' => 'inspiry_display_wpml_flags', 'type' => 'switch', 'title' => __('WPML Language Switcher Flags', 'inspiry'), 'subtitle' => __('Do you want to display WPML language switcher flags in header top bar ?', 'inspiry'), 'desc' => __('This option only works if WPML plugin is installed.', 'inspiry'), 'default' => 1, 'on' => __('Display', 'inspiry'), 'off' => __('Hide', 'inspiry')), array('id' => 'inspiry_page_loader', 'type' => 'switch', 'title' => __('Page Loader', 'inspiry'), 'desc' => __('You can enable or disable page loader.', 'inspiry'), 'default' => 1, 'on' => __('Enable', 'inspiry'), 'off' => __('Disable', 'inspiry')), array('id' => 'inspiry_page_loader_gif', 'type' => 'media', 'url' => false, 'title' => __('Page Loader Gif', 'inspiry'), 'desc' => __('You can upload your page loader gif here or default one will be displayed.', 'inspiry'), 'required' => array('inspiry_page_loader', '=', 1)), array('id' => 'inspiry_quick_js', 'type' => 'ace_editor', 'title' => __('Quick JavaScript', 'inspiry'), 'desc' => __('You can paste your JavaScript code here.', 'inspiry'), 'mode' => 'javascript', 'theme' => 'chrome'))));
Redux::setSection($opt_name, array('title' => __('Section', 'digitalnoir-option'), 'id' => 'presentation-section', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/section/" target="_blank">http://docs.reduxframework.com/core/fields/section/</a>', 'subsection' => true, 'fields' => array(array('id' => 'section-start', 'type' => 'section', 'title' => __('Section Example', 'digitalnoir-option'), 'subtitle' => __('With the "section" field you can create indented option sections.', 'digitalnoir-option'), 'indent' => true), array('id' => 'section-test', 'type' => 'text', 'title' => __('Field Title', 'digitalnoir-option'), 'subtitle' => __('Field Subtitle', 'digitalnoir-option')), array('id' => 'section-test-media', 'type' => 'media', 'title' => __('Field Title', 'digitalnoir-option'), 'subtitle' => __('Field Subtitle', 'digitalnoir-option')), array('id' => 'section-end', 'type' => 'section', 'indent' => false), array('id' => 'section-info', 'type' => 'info', 'desc' => __('And now you can add more fields below and outside of the indent.', 'digitalnoir-option')))));
Redux::setSection($opt_name, array('id' => 'presentation-divide-sample', 'type' => 'divide'));
// -> START Switch & Button Set
Redux::setSection($opt_name, array('title' => __('Switch & Button Set', 'digitalnoir-option'), 'id' => 'switch_buttonset', 'desc' => __('', 'digitalnoir-option'), 'icon' => 'el el-cogs'));
Redux::setSection($opt_name, array('title' => __('Button Set', 'digitalnoir-option'), 'id' => 'switch_buttonset-set', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/button-set/" target="_blank">http://docs.reduxframework.com/core/fields/button-set/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-button-set', 'type' => 'button_set', 'title' => __('Button Set Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => '2'), array('id' => 'opt-button-set-multi', 'type' => 'button_set', 'title' => __('Button Set, Multi Select', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'multi' => true, 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => array('2', '3')))));
Redux::setSection($opt_name, array('title' => __('Switch', 'digitalnoir-option'), 'id' => 'switch_buttonset-switch', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/switch/" target="_blank">http://docs.reduxframework.com/core/fields/switch/</a>', 'subsection' => true, 'fields' => array(array('id' => 'switch-on', 'type' => 'switch', 'title' => __('Switch On', 'digitalnoir-option'), 'subtitle' => __('Look, it\'s on!', 'digitalnoir-option'), 'default' => true), array('id' => 'switch-off', 'type' => 'switch', 'title' => __('Switch Off', 'digitalnoir-option'), 'subtitle' => __('Look, it\'s on!', 'digitalnoir-option'), 'default' => false), array('id' => 'switch-parent', 'type' => 'switch', 'title' => __('Switch - Nested Children, Enable to show', 'digitalnoir-option'), 'subtitle' => __('Look, it\'s on! Also hidden child elements!', 'digitalnoir-option'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'switch-child1', 'type' => 'switch', 'required' => array('switch-parent', '=', '1'), 'title' => __('Switch - This and the next switch required for patterns to show', 'digitalnoir-option'), 'subtitle' => __('Also called a "fold" parent.', 'digitalnoir-option'), 'desc' => __('Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'digitalnoir-option'), 'default' => false), array('id' => 'switch-child2', 'type' => 'switch', 'required' => array('switch-parent', '=', '1'), 'title' => __('Switch2 - Enable the above switch and this one for patterns to show', 'digitalnoir-option'), 'subtitle' => __('Also called a "fold" parent.', 'digitalnoir-option'), 'desc' => __('Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'digitalnoir-option'), 'default' => false))));
// -> START Select Fields
Redux::setSection($opt_name, array('title' => __('Select Fields', 'digitalnoir-option'), 'id' => 'select', 'icon' => 'el el-list-alt'));
Redux::setSection($opt_name, array('title' => __('Select', 'digitalnoir-option'), 'id' => 'select-select', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/select/" target="_blank">http://docs.reduxframework.com/core/fields/select/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-select', 'type' => 'select', 'title' => __('Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => '2'), array('id' => 'opt-select-stylesheet', 'type' => 'select', 'title' => __('Theme Stylesheet', 'digitalnoir-option'), 'subtitle' => __('Select your themes alternative color scheme.', 'digitalnoir-option'), 'options' => array('default.css' => 'default.css', 'color1.css' => 'color1.css'), 'default' => 'default.css'), array('id' => 'opt-select-optgroup', 'type' => 'select', 'title' => __('Select Option with optgroup', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'options' => array('Group 1' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'Group 2' => array('4' => 'Opt 4', '5' => 'Opt 5', '6' => 'Opt 6'), '7' => 'Opt 7', '8' => 'Opt 8', '9' => 'Opt 9'), 'default' => '2'), array('id' => 'opt-multi-select', 'type' => 'select', 'multi' => true, 'title' => __('Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => array('2', '3')), array('id' => 'opt-info', 'type' => 'info', 'desc' => __('You can easily add a variety of data from WordPress.', 'digitalnoir-option')), array('id' => 'opt-select-categories', 'type' => 'select', 'data' => 'categories', 'title' => __('Categories Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-categories-multi', 'type' => 'select', 'data' => 'categories', 'multi' => true, 'title' => __('Categories Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-pages', 'type' => 'select', 'data' => 'pages', 'title' => __('Pages Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-pages', 'type' => 'select', 'data' => 'pages', 'multi' => true, 'title' => __('Pages Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-tags', 'type' => 'select', 'data' => 'tags', 'title' => __('Tags Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-tags', 'type' => 'select', 'data' => 'tags', 'multi' => true, 'title' => __('Tags Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-menus', 'type' => 'select', 'data' => 'menus', 'title' => __('Menus Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-menus', 'type' => 'select', 'data' => 'menu', 'multi' => true, 'title' => __('Menus Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-post-type', 'type' => 'select', 'data' => 'post_type', 'title' => __('Post Type Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-post-type', 'type' => 'select', 'data' => 'post_type', 'multi' => true, 'title' => __('Post Type Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-sortable', 'type' => 'select', 'data' => 'post_type', 'multi' => true, 'sortable' => true, 'title' => __('Post Type Multi Select Option + Sortable', 'digitalnoir-option'), 'subtitle' => __('This field also has sortable enabled!', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-posts', 'type' => 'select', 'data' => 'post', 'title' => __('Posts Select Option2', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-multi-select-posts', 'type' => 'select', 'data' => 'post', 'multi' => true, 'title' => __('Posts Multi Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-roles', 'type' => 'select', 'data' => 'roles', 'title' => __('User Role Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-capabilities', 'type' => 'select', 'data' => 'capabilities', 'multi' => true, 'title' => __('Capabilities Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-select-elusive', 'type' => 'select', 'data' => 'elusive-icons', 'title' => __('Elusive Icons Select Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('Here\'s a list of all the elusive icons by name and icon.', 'digitalnoir-option')))));
Redux::setSection($opt_name, array('title' => __('Image Select', 'digitalnoir-option'), 'id' => 'select-image_select', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/image-select/" target="_blank">http://docs.reduxframework.com/core/fields/image-select/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-image-select-layout', 'type' => 'image_select', 'title' => __('Images Option for Layout', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This uses some of the built in images, you can use them for layout options.', 'digitalnoir-option'), 'options' => array('1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url . 'assets/img/1col.png'), '2' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png'), '3' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'), '4' => array('alt' => '3 Column Middle', 'img' => ReduxFramework::$_url . 'assets/img/3cm.png'), '5' => array('alt' => '3 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/3cl.png'), '6' => array('alt' => '3 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/3cr.png')), 'default' => '2'), array('id' => 'opt-image-select', 'type' => 'image_select', 'title' => __('Images Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'options' => array('1' => array('title' => 'Opt 1', 'img' => 'images/align-none.png'), '2' => array('title' => 'Opt 2', 'img' => 'images/align-left.png'), '3' => array('title' => 'Opt 3', 'img' => 'images/align-center.png'), '4' => array('title' => 'Opt 4', 'img' => 'images/align-right.png')), 'default' => '2'), array('id' => 'opt-presets', 'type' => 'image_select', 'presets' => true, 'full_width' => true, 'title' => __('Preset', 'digitalnoir-option'), 'subtitle' => __('This allows you to set a json string or array to override multiple preferences in your theme.', 'digitalnoir-option'), 'default' => 0, 'desc' => __('This allows you to set a json string or array to override multiple preferences in your theme.', 'digitalnoir-option'), 'options' => array('1' => array('alt' => 'Preset 1', 'img' => ReduxFramework::$_url . '../sample/presets/preset1.png', 'presets' => array('switch-on' => 1, 'switch-off' => 1, 'switch-parent' => 1)), '2' => array('alt' => 'Preset 2', 'img' => ReduxFramework::$_url . '../sample/presets/preset2.png', 'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}'))))));
Redux::setSection($opt_name, array('title' => __('Select Image', 'digitalnoir-option'), 'id' => 'select-select_image', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/select-image/" target="_blank">http://docs.reduxframework.com/core/fields/select-image/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-select_image', 'type' => 'select_image', 'presets' => true, 'title' => __('Select Image', 'digitalnoir-option'), 'default' => 0, 'options' => array('1' => array('alt' => 'Preset 1', 'img' => ReduxFramework::$_url . '../sample/presets/preset1.png'), '2' => array('alt' => 'Preset 2', 'img' => ReduxFramework::$_url . '../sample/presets/preset2.png'))))));
// -> START Slider / Spinner
Redux::setSection($opt_name, array('title' => __('Slider / Spinner', 'digitalnoir-option'), 'id' => 'slider_spinner', 'desc' => __('', 'digitalnoir-option'), 'icon' => 'el el-adjust-alt'));
Redux::setSection($opt_name, array('title' => __('Slider', 'digitalnoir-option'), 'id' => 'slider_spinner-slider', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/slider/" target="_blank">http://docs.reduxframework.com/core/fields/slider/</a>', 'fields' => array(array('id' => 'opt-slider-label', 'type' => 'slider', 'title' => __('Slider Example 1', 'digitalnoir-option'), 'subtitle' => __('This slider displays the value as a label.', 'digitalnoir-option'), 'desc' => __('Slider description. Min: 1, max: 500, step: 1, default value: 250', 'digitalnoir-option'), 'default' => 250, 'min' => 1, 'step' => 1, 'max' => 500, 'display_value' => 'label'), array('id' => 'opt-slider-text', 'type' => 'slider', 'title' => __('Slider Example 2 with Steps (5)', 'digitalnoir-option'), 'subtitle' => __('This example displays the value in a text box', 'digitalnoir-option'), 'desc' => __('Slider description. Min: 0, max: 300, step: 5, default value: 75', 'digitalnoir-option'), 'default' => 75, 'min' => 0, 'step' => 5, 'max' => 300, 'display_value' => 'text'), array('id' => 'opt-slider-select', 'type' => 'slider', 'title' => __('Slider Example 3 with two sliders', 'digitalnoir-option'), 'subtitle' => __('This example displays the values in select boxes', 'digitalnoir-option'), 'desc' => __('Slider description. Min: 0, max: 500, step: 5, slider 1 default value: 100, slider 2 default value: 300', 'digitalnoir-option'), 'default' => array(1 => 100, 2 => 300), 'min' => 0, 'step' => 5, 'max' => '500', 'display_value' => 'select', 'handles' => 2), array('id' => 'opt-slider-float', 'type' => 'slider', 'title' => __('Slider Example 4 with float values', 'digitalnoir-option'), 'subtitle' => __('This example displays float values', 'digitalnoir-option'), 'desc' => __('Slider description. Min: 0, max: 1, step: .1, default value: .5', 'digitalnoir-option'), 'default' => 0.5, 'min' => 0, 'step' => 0.1, 'max' => 1, 'resolution' => 0.1, 'display_value' => 'text')), 'subsection' => true));
Redux::setSection($opt_name, array('title' => __('Spinner', 'digitalnoir-option'), 'id' => 'slider_spinner-spinner', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/spinner/" target="_blank">http://docs.reduxframework.com/core/fields/spinner/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-spinner', 'type' => 'spinner', 'title' => __('JQuery UI Spinner Example 1', 'digitalnoir-option'), 'desc' => __('JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'digitalnoir-option'), 'default' => '40', 'min' => '20', 'step' => '20', 'max' => '100'))));
// -> START Typography
Redux::setSection($opt_name, array('title' => __('Typography', 'digitalnoir-option'), 'id' => 'typography', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/typography/" target="_blank">http://docs.reduxframework.com/core/fields/typography/</a>', 'icon' => 'el el-font', 'fields' => array(array('id' => 'opt-typography-body', 'type' => 'typography', 'title' => __('Body Font', 'digitalnoir-option'), 'subtitle' => __('Specify the body font properties.', 'digitalnoir-option'), 'google' => true, 'default' => array('color' => '#dd9933', 'font-size' => '30px', 'font-family' => 'Arial,Helvetica,sans-serif', 'font-weight' => 'Normal')), array('id' => 'opt-typography', 'type' => 'typography', 'title' => __('Typography h2.site-description', 'digitalnoir-option'), 'font-backup' => true, 'all_styles' => true, 'output' => array('h2.site-description, .entry-title'), 'compiler' => array('h2.site-description-compiler'), 'units' => 'px', 'subtitle' => __('Typography option with each property can be called individually.', 'digitalnoir-option'), 'default' => array('color' => '#333', 'font-style' => '700', 'font-family' => 'Abel', 'google' => true, 'font-size' => '33px', 'line-height' => '40px')))));
// -> START Additional Types
Redux::setSection($opt_name, array('title' => __('Additional Types', 'digitalnoir-option'), 'id' => 'additional', 'desc' => __('', 'digitalnoir-option'), 'icon' => 'el el-magic'));
Redux::setSection($opt_name, array('title' => __('Date', 'digitalnoir-option'), 'id' => 'additional-date', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/date/" target="_blank">http://docs.reduxframework.com/core/fields/date/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-datepicker', 'type' => 'date', 'title' => __('Date Option', 'digitalnoir-option'), 'subtitle' => __('No validation can be done on this field type', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')))));
Redux::setSection($opt_name, array('title' => __('Sorter', 'digitalnoir-option'), 'id' => 'additional-sorter', 'desc' => __('For full documentation on this field, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/fields/sorter/" target="_blank">http://docs.reduxframework.com/core/fields/sorter/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-homepage-layout', 'type' => 'sorter', 'title' => 'Layout Manager Advanced', 'subtitle' => 'You can add multiple drop areas or columns.', 'compiler' => 'true', 'options' => array('enabled' => array('highlights' => 'Highlights', 'slider' => 'Slider', 'staticpage' => 'Static Page', 'services' => 'Services'), 'disabled' => array(), 'backup' => array()), 'limits' => array('disabled' => 1, 'backup' => 2)), array('id' => 'opt-homepage-layout-2', 'type' => 'sorter', 'title' => 'Homepage Layout Manager', 'desc' => 'Organize how you want the layout to appear on the homepage', 'compiler' => 'true', 'options' => array('disabled' => array('highlights' => 'Highlights', 'slider' => 'Slider'), 'enabled' => array('staticpage' => 'Static Page', 'services' => 'Services'))))));
Redux::setSection($opt_name, array('title' => __('Advanced Features', 'digitalnoir-option'), 'icon' => 'el el-thumbs-up'));
// -> START Validation
Redux::setSection($opt_name, array('title' => __('Field Validation', 'digitalnoir-option'), 'id' => 'validation', 'desc' => __('For full documentation on validation, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/the-basics/validation/" target="_blank">http://docs.reduxframework.com/core/the-basics/validation/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-text-email', 'type' => 'text', 'title' => __('Text Option - Email Validated', 'digitalnoir-option'), 'subtitle' => __('This is a little space under the Field Title in the Options table, additional info is good in here.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'email', 'msg' => 'custom error message', 'default' => '*****@*****.**'), array('id' => 'opt-text-post-type', 'type' => 'text', 'title' => __('Text Option with Data Attributes', 'digitalnoir-option'), 'subtitle' => __('You can also pass an options array if you want. Set the default to whatever you like.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'data' => 'post_type'), array('id' => 'opt-multi-text', 'type' => 'multi_text', 'title' => __('Multi Text Option - Color Validated', 'digitalnoir-option'), 'validate' => 'color', 'subtitle' => __('If you enter an invalid color it will be removed. Try using the text "blue" as a color.  ;)', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option')), array('id' => 'opt-text-url', 'type' => 'text', 'title' => __('Text Option - URL Validated', 'digitalnoir-option'), 'subtitle' => __('This must be a URL.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'url', 'default' => 'http://reduxframework.com'), array('id' => 'opt-text-numeric', 'type' => 'text', 'title' => __('Text Option - Numeric Validated', 'digitalnoir-option'), 'subtitle' => __('This must be numeric.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'numeric', 'default' => '0'), array('id' => 'opt-text-comma-numeric', 'type' => 'text', 'title' => __('Text Option - Comma Numeric Validated', 'digitalnoir-option'), 'subtitle' => __('This must be a comma separated string of numerical values.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'comma_numeric', 'default' => '0'), array('id' => 'opt-text-no-special-chars', 'type' => 'text', 'title' => __('Text Option - No Special Chars Validated', 'digitalnoir-option'), 'subtitle' => __('This must be a alpha numeric only.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'no_special_chars', 'default' => '0'), array('id' => 'opt-text-str_replace', 'type' => 'text', 'title' => __('Text Option - Str Replace Validated', 'digitalnoir-option'), 'subtitle' => __('You decide.', 'digitalnoir-option'), 'desc' => __('This field\'s default value was changed by a filter hook!', 'digitalnoir-option'), 'validate' => 'str_replace', 'str' => array('search' => ' ', 'replacement' => 'thisisaspace'), 'default' => 'This is the default.'), array('id' => 'opt-text-preg_replace', 'type' => 'text', 'title' => __('Text Option - Preg Replace Validated', 'digitalnoir-option'), 'subtitle' => __('You decide.', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'preg_replace', 'preg' => array('pattern' => '/[^a-zA-Z_ -]/s', 'replacement' => 'no numbers'), 'default' => '0'), array('id' => 'opt-textarea-no-html', 'type' => 'textarea', 'title' => __('Textarea Option - No HTML Validated', 'digitalnoir-option'), 'subtitle' => __('All HTML will be stripped', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'no_html', 'default' => 'No HTML is allowed in here.'), array('id' => 'opt-textarea-html', 'type' => 'textarea', 'title' => __('Textarea Option - HTML Validated', 'digitalnoir-option'), 'subtitle' => __('HTML Allowed (wp_kses)', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'html', 'default' => 'HTML is allowed in here.'), array('id' => 'opt-textarea-some-html', 'type' => 'textarea', 'title' => __('Textarea Option - HTML Validated Custom', 'digitalnoir-option'), 'subtitle' => __('Custom HTML Allowed (wp_kses)', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'html_custom', 'default' => '<p>Some HTML is allowed in here.</p>', 'allowed_html' => array('a' => array('href' => array(), 'title' => array()), 'br' => array(), 'em' => array(), 'strong' => array())), array('id' => 'opt-textarea-js', 'type' => 'textarea', 'title' => __('Textarea Option - JS Validated', 'digitalnoir-option'), 'subtitle' => __('JS will be escaped', 'digitalnoir-option'), 'desc' => __('This is the description field, again good for additional info.', 'digitalnoir-option'), 'validate' => 'js'))));
// -> START Required
Redux::setSection($opt_name, array('title' => __('Field Required / Linking', 'digitalnoir-option'), 'id' => 'required', 'desc' => __('For full documentation on validation, visit: ', 'digitalnoir-option') . '<a href="http://docs.reduxframework.com/core/the-basics/required/" target="_blank">http://docs.reduxframework.com/core/the-basics/required/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-required-basic', 'type' => 'switch', 'title' => 'Basic Required Example', 'subtitle' => 'Click <code>On</code> to see the text field appear.', 'default' => false), array('id' => 'opt-required-basic-text', 'type' => 'text', 'title' => 'Basic Text Field', 'subtitle' => 'This text field is only show when the above switch is set to <code>On</code>, using the <code>required</code> argument.', 'required' => array('opt-required-basic', '=', true)), array('id' => 'opt-required-divide-1', 'type' => 'divide'), array('id' => 'opt-required-nested', 'type' => 'switch', 'title' => 'Nested Required Example', 'subtitle' => 'Click <code>On</code> to see another set of options appear.', 'default' => false), array('id' => 'opt-required-nested-buttonset', 'type' => 'button_set', 'title' => 'Multiple Nested Required Examples', 'subtitle' => 'Click any buton to show different fields based on their <code>required</code> statements.', 'options' => array('button-text' => 'Show Text Field', 'button-textarea' => 'Show Textarea Field', 'button-editor' => 'Show WP Editor', 'button-ace' => 'Show ACE Editor'), 'required' => array('opt-required-nested', '=', true), 'default' => 'button-text'), array('id' => 'opt-required-nested-text', 'type' => 'text', 'title' => 'Nested Text Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-text')), array('id' => 'opt-required-nested-textarea', 'type' => 'textarea', 'title' => 'Nested Textarea Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-textarea')), array('id' => 'opt-required-nested-editor', 'type' => 'editor', 'title' => 'Nested Editor Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-editor')), array('id' => 'opt-required-nested-ace', 'type' => 'ace_editor', 'title' => 'Nested ACE Editor Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-ace')), array('id' => 'opt-required-divide-2', 'type' => 'divide'), array('id' => 'opt-required-select', 'type' => 'select', 'title' => 'Select Required Example', 'subtitle' => 'Select a different option to display its value.  Required may be used to display multiple & reusable fields', 'options' => array('no-sidebar' => 'No Sidebars', 'left-sidebar' => 'Left Sidebar', 'right-sidebar' => 'Right Sidebar', 'both-sidebars' => 'Both Sidebars'), 'default' => 'no-sidebar', 'select2' => array('allowClear' => false)), array('id' => 'opt-required-select-left-sidebar', 'type' => 'select', 'title' => 'Select Left Sidebar', 'data' => 'sidebars', 'default' => '', 'required' => array('opt-required-select', '=', array('left-sidebar', 'both-sidebars'))), array('id' => 'opt-required-select-right-sidebar', 'type' => 'select', 'title' => 'Select Right Sidebar', 'data' => 'sidebars', 'default' => '', 'required' => array('opt-required-select', '=', array('right-sidebar', 'both-sidebars'))))));
Redux::setSection($opt_name, array('title' => __('WPML Integration', 'digitalnoir-option'), 'desc' => __('These fields can be fully translated by WPML (WordPress Multi-Language). This serves as an example for you to implement. For extra details look at our <a href="http://docs.reduxframework.com/core/advanced/wpml-integration/" target="_blank">WPML Implementation</a> documentation.', 'digitalnoir-option'), 'subsection' => true, 'fields' => array(array('id' => 'wpml-text', 'type' => 'textarea', 'title' => __('WPML Text', 'digitalnoir-option'), 'desc' => __('This string can be translated via WPML.', 'digitalnoir-option')), array('id' => 'wpml-multicheck', 'type' => 'checkbox', 'title' => __('WPML Multi Checkbox', 'digitalnoir-option'), 'desc' => __('You can literally translate the values via key.', 'digitalnoir-option'), 'options' => array('1' => 'Option 1', '2' => 'Option 2', '3' => 'Option 3')))));
Redux::setSection($opt_name, array('icon' => 'el el-list-alt', 'title' => __('Customizer Only', 'digitalnoir-option'), 'desc' => __('<p class="description">This Section should be visible only in Customizer</p>', 'digitalnoir-option'), 'customizer_only' => true, 'fields' => array(array('id' => 'opt-customizer-only', 'type' => 'select', 'title' => __('Customizer Only Option', 'digitalnoir-option'), 'subtitle' => __('The subtitle is NOT visible in customizer', 'digitalnoir-option'), 'desc' => __('The field desc is NOT visible in customizer.', 'digitalnoir-option'), 'customizer_only' => true, 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => '2'))));
/*
 * <--- END SECTIONS
 */
Пример #10
0
// -> START Additional Types
Redux::setSection($opt_name, array('title' => __('Additional Types', 'redux-framework-demo'), 'id' => 'additional', 'desc' => __('', 'redux-framework-demo'), 'icon' => 'el el-magic'));
Redux::setSection($opt_name, array('title' => __('Date', 'redux-framework-demo'), 'id' => 'additional-date', 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/fields/date/" target="_blank">http://docs.reduxframework.com/core/fields/date/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-datepicker', 'type' => 'date', 'title' => __('Date Option', 'redux-framework-demo'), 'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo')))));
Redux::setSection($opt_name, array('title' => __('Sorter', 'redux-framework-demo'), 'id' => 'additional-sorter', 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/fields/sorter/" target="_blank">http://docs.reduxframework.com/core/fields/sorter/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-homepage-layout', 'type' => 'sorter', 'title' => 'Layout Manager Advanced', 'subtitle' => 'You can add multiple drop areas or columns.', 'compiler' => 'true', 'options' => array('enabled' => array('highlights' => 'Highlights', 'slider' => 'Slider', 'staticpage' => 'Static Page', 'services' => 'Services'), 'disabled' => array(), 'backup' => array()), 'limits' => array('disabled' => 1, 'backup' => 2)), array('id' => 'opt-homepage-layout-2', 'type' => 'sorter', 'title' => 'Homepage Layout Manager', 'desc' => 'Organize how you want the layout to appear on the homepage', 'compiler' => 'true', 'options' => array('disabled' => array('highlights' => 'Highlights', 'slider' => 'Slider'), 'enabled' => array('staticpage' => 'Static Page', 'services' => 'Services'))))));
Redux::setSection($opt_name, array('title' => __('Raw', 'redux-framework-demo'), 'id' => 'additional-raw', 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/fields/raw/" target="_blank">http://docs.reduxframework.com/core/fields/raw/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-raw_info_4', 'type' => 'raw', 'title' => __('Standard Raw Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Description', 'redux-framework-demo'), 'content' => $sampleHTML), array('id' => 'opt-raw_info_5', 'type' => 'raw', 'full_width' => false, 'title' => __('Raw Field <code>full_width</code> False', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Description', 'redux-framework-demo'), 'content' => $sampleHTML))));
Redux::setSection($opt_name, array('title' => __('Advanced Features', 'redux-framework-demo'), 'icon' => 'el el-thumbs-up'));
Redux::setSection($opt_name, array('title' => __('Callback', 'redux-framework-demo'), 'id' => 'additional-callback', 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/fields/callback/" target="_blank">http://docs.reduxframework.com/core/fields/callback/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-custom-callback', 'type' => 'callback', 'title' => __('Custom Field Callback', 'redux-framework-demo'), 'subtitle' => __('This is a completely unique field type', 'redux-framework-demo'), 'desc' => __('This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'redux-framework-demo'), 'callback' => 'redux_my_custom_field'))));
// -> START Validation
Redux::setSection($opt_name, array('title' => __('Field Validation', 'redux-framework-demo'), 'id' => 'validation', 'desc' => __('For full documentation on validation, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/the-basics/validation/" target="_blank">http://docs.reduxframework.com/core/the-basics/validation/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-text-email', 'type' => 'text', 'title' => __('Text Option - Email Validated', 'redux-framework-demo'), 'subtitle' => __('This is a little space under the Field Title in the Options table, additional info is good in here.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'email', 'msg' => 'custom error message', 'default' => '*****@*****.**'), array('id' => 'opt-text-post-type', 'type' => 'text', 'title' => __('Text Option with Data Attributes', 'redux-framework-demo'), 'subtitle' => __('You can also pass an options array if you want. Set the default to whatever you like.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'data' => 'post_type'), array('id' => 'opt-multi-text', 'type' => 'multi_text', 'title' => __('Multi Text Option - Color Validated', 'redux-framework-demo'), 'validate' => 'color', 'subtitle' => __('If you enter an invalid color it will be removed. Try using the text "blue" as a color.  ;)', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo')), array('id' => 'opt-text-url', 'type' => 'text', 'title' => __('Text Option - URL Validated', 'redux-framework-demo'), 'subtitle' => __('This must be a URL.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://reduxframework.com'), array('id' => 'opt-text-numeric', 'type' => 'text', 'title' => __('Text Option - Numeric Validated', 'redux-framework-demo'), 'subtitle' => __('This must be numeric.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'numeric', 'default' => '0'), array('id' => 'opt-text-comma-numeric', 'type' => 'text', 'title' => __('Text Option - Comma Numeric Validated', 'redux-framework-demo'), 'subtitle' => __('This must be a comma separated string of numerical values.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'comma_numeric', 'default' => '0'), array('id' => 'opt-text-no-special-chars', 'type' => 'text', 'title' => __('Text Option - No Special Chars Validated', 'redux-framework-demo'), 'subtitle' => __('This must be a alpha numeric only.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'no_special_chars', 'default' => '0'), array('id' => 'opt-text-str_replace', 'type' => 'text', 'title' => __('Text Option - Str Replace Validated', 'redux-framework-demo'), 'subtitle' => __('You decide.', 'redux-framework-demo'), 'desc' => __('This field\'s default value was changed by a filter hook!', 'redux-framework-demo'), 'validate' => 'str_replace', 'str' => array('search' => ' ', 'replacement' => 'thisisaspace'), 'default' => 'This is the default.'), array('id' => 'opt-text-preg_replace', 'type' => 'text', 'title' => __('Text Option - Preg Replace Validated', 'redux-framework-demo'), 'subtitle' => __('You decide.', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'preg_replace', 'preg' => array('pattern' => '/[^a-zA-Z_ -]/s', 'replacement' => 'no numbers'), 'default' => '0'), array('id' => 'opt-text-custom_validate', 'type' => 'text', 'title' => __('Text Option - Custom Callback Validated', 'redux-framework-demo'), 'subtitle' => __('You decide.', 'redux-framework-demo'), 'desc' => __('Enter <code>1</code> and click <strong>Save Changes</strong> for an error message, or enter <code>2</code> and click <strong>Save Changes</strong> for a warning message.', 'redux-framework-demo'), 'validate_callback' => 'redux_validate_callback_function', 'default' => '0'), array('id' => 'opt-textarea-no-html', 'type' => 'textarea', 'title' => __('Textarea Option - No HTML Validated', 'redux-framework-demo'), 'subtitle' => __('All HTML will be stripped', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'no_html', 'default' => 'No HTML is allowed in here.'), array('id' => 'opt-textarea-html', 'type' => 'textarea', 'title' => __('Textarea Option - HTML Validated', 'redux-framework-demo'), 'subtitle' => __('HTML Allowed (wp_kses)', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'html', 'default' => 'HTML is allowed in here.'), array('id' => 'opt-textarea-some-html', 'type' => 'textarea', 'title' => __('Textarea Option - HTML Validated Custom', 'redux-framework-demo'), 'subtitle' => __('Custom HTML Allowed (wp_kses)', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'html_custom', 'default' => '<p>Some HTML is allowed in here.</p>', 'allowed_html' => array('a' => array('href' => array(), 'title' => array()), 'br' => array(), 'em' => array(), 'strong' => array())), array('id' => 'opt-textarea-js', 'type' => 'textarea', 'title' => __('Textarea Option - JS Validated', 'redux-framework-demo'), 'subtitle' => __('JS will be escaped', 'redux-framework-demo'), 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'), 'validate' => 'js'))));
// -> START Required
Redux::setSection($opt_name, array('title' => __('Field Required / Linking', 'redux-framework-demo'), 'id' => 'required', 'desc' => __('For full documentation on validation, visit: ', 'redux-framework-demo') . '<a href="http://docs.reduxframework.com/core/the-basics/required/" target="_blank">http://docs.reduxframework.com/core/the-basics/required/</a>', 'subsection' => true, 'fields' => array(array('id' => 'opt-required-basic', 'type' => 'switch', 'title' => 'Basic Required Example', 'subtitle' => 'Click <code>On</code> to see the text field appear.', 'default' => false), array('id' => 'opt-required-basic-text', 'type' => 'text', 'title' => 'Basic Text Field', 'subtitle' => 'This text field is only show when the above switch is set to <code>On</code>, using the <code>required</code> argument.', 'required' => array('opt-required-basic', '=', true)), array('id' => 'opt-required-divide-1', 'type' => 'divide'), array('id' => 'opt-required-nested', 'type' => 'switch', 'title' => 'Nested Required Example', 'subtitle' => 'Click <code>On</code> to see another set of options appear.', 'default' => false), array('id' => 'opt-required-nested-buttonset', 'type' => 'button_set', 'title' => 'Multiple Nested Required Examples', 'subtitle' => 'Click any buton to show different fields based on their <code>required</code> statements.', 'options' => array('button-text' => 'Show Text Field', 'button-textarea' => 'Show Textarea Field', 'button-editor' => 'Show WP Editor', 'button-ace' => 'Show ACE Editor'), 'required' => array('opt-required-nested', '=', true), 'default' => 'button-text'), array('id' => 'opt-required-nested-text', 'type' => 'text', 'title' => 'Nested Text Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-text')), array('id' => 'opt-required-nested-textarea', 'type' => 'textarea', 'title' => 'Nested Textarea Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-textarea')), array('id' => 'opt-required-nested-editor', 'type' => 'editor', 'title' => 'Nested Editor Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-editor')), array('id' => 'opt-required-nested-ace', 'type' => 'ace_editor', 'title' => 'Nested ACE Editor Field', 'required' => array('opt-required-nested-buttonset', '=', 'button-ace')), array('id' => 'opt-required-divide-2', 'type' => 'divide'), array('id' => 'opt-required-select', 'type' => 'select', 'title' => 'Select Required Example', 'subtitle' => 'Select a different option to display its value.  Required may be used to display multiple & reusable fields', 'options' => array('no-sidebar' => 'No Sidebars', 'left-sidebar' => 'Left Sidebar', 'right-sidebar' => 'Right Sidebar', 'both-sidebars' => 'Both Sidebars'), 'default' => 'no-sidebar', 'select2' => array('allowClear' => false)), array('id' => 'opt-required-select-left-sidebar', 'type' => 'select', 'title' => 'Select Left Sidebar', 'data' => 'sidebars', 'default' => '', 'required' => array('opt-required-select', '=', array('left-sidebar', 'both-sidebars'))), array('id' => 'opt-required-select-right-sidebar', 'type' => 'select', 'title' => 'Select Right Sidebar', 'data' => 'sidebars', 'default' => '', 'required' => array('opt-required-select', '=', array('right-sidebar', 'both-sidebars'))))));
Redux::setSection($opt_name, array('title' => __('WPML Integration', 'redux-framework-demo'), 'desc' => __('These fields can be fully translated by WPML (WordPress Multi-Language). This serves as an example for you to implement. For extra details look at our <a href="http://docs.reduxframework.com/core/advanced/wpml-integration/" target="_blank">WPML Implementation</a> documentation.', 'redux-framework-demo'), 'subsection' => true, 'fields' => array(array('id' => 'wpml-text', 'type' => 'textarea', 'title' => __('WPML Text', 'redux-framework-demo'), 'desc' => __('This string can be translated via WPML.', 'redux-framework-demo')), array('id' => 'wpml-multicheck', 'type' => 'checkbox', 'title' => __('WPML Multi Checkbox', 'redux-framework-demo'), 'desc' => __('You can literally translate the values via key.', 'redux-framework-demo'), 'options' => array('1' => 'Option 1', '2' => 'Option 2', '3' => 'Option 3')))));
Redux::setSection($opt_name, array('icon' => 'el el-list-alt', 'title' => __('Customizer Only', 'redux-framework-demo'), 'desc' => __('<p class="description">This Section should be visible only in Customizer</p>', 'redux-framework-demo'), 'customizer_only' => true, 'fields' => array(array('id' => 'opt-customizer-only', 'type' => 'select', 'title' => __('Customizer Only Option', 'redux-framework-demo'), 'subtitle' => __('The subtitle is NOT visible in customizer', 'redux-framework-demo'), 'desc' => __('The field desc is NOT visible in customizer.', 'redux-framework-demo'), 'customizer_only' => true, 'options' => array('1' => 'Opt 1', '2' => 'Opt 2', '3' => 'Opt 3'), 'default' => '2'))));
if (file_exists(dirname(__FILE__) . '/../README.md')) {
    $section = array('icon' => 'el el-list-alt', 'title' => __('Documentation', 'redux-framework-demo'), 'fields' => array(array('id' => '17', 'type' => 'raw', 'markdown' => true, 'content' => file_get_contents(dirname(__FILE__) . '/../README.md'))));
    Redux::setSection($opt_name, $section);
}
/*
 * <--- END SECTIONS
 */
/**
 * This is a test function that will let you see when the compiler hook occurs.
 * It only runs if a field    set with compiler=>true is changed.
 * */
function compiler_action($options, $css, $changed_values)
{
    echo '<h1>The compiler hook has run!</h1>';
    echo "<pre>";
    print_r($changed_values);
    // Values that have changed since the last save
    echo "</pre>";
                }
            }
        }
        public static function getExtensions($key = "", $opt_name = "")
        {
            if (empty($opt_name)) {
                if (empty($key)) {
                    return self::$extension_paths[$key];
                } else {
                    if (isset(self::$extension_paths[$key])) {
                        return self::$extension_paths[$key];
                    }
                }
            } else {
                if (empty(self::$uses_extensions[$opt_name])) {
                    return false;
                }
                $instanceExtensions = array();
                foreach (self::$uses_extensions[$opt_name] as $extension) {
                    $class_file = end(self::$extensions[$extension]);
                    $name = str_replace('.php', '', basename($extension));
                    $extension_class = 'ReduxFramework_Extension_' . $name;
                    $instanceExtensions[$extension] = array('path' => $class_file, 'class' => $extension_class);
                }
                return $instanceExtensions;
            }
            return false;
        }
    }
    Redux::load();
}
Пример #12
0
 public function init()
 {
     Redux::setArgs($this->opt_name, $this->args);
     $sections = $this->addSections();
     Redux::setSections($this->opt_name, $sections);
 }
Пример #13
0
/*
 *
 * ---> START SECTIONS
 *
 */
/*
   As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
// -> Opções gerais
Redux::setSection($opt_name, array('title' => __('Opções gerais', 'redux-framework-demo'), 'id' => 'basic', 'desc' => __('', 'redux-framework-demo'), 'icon' => 'el el-home', 'fields' => array(array('id' => 'fanpage-url', 'type' => 'text', 'title' => __('Endereço da Fanpage', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://facebook.com'), array('id' => 'twitter-url', 'type' => 'text', 'title' => __('Twitter', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://twitter.com'), array('id' => 'instagram-url', 'type' => 'text', 'title' => __('Instagram', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://instagram.com'), array('id' => 'youtube-url', 'type' => 'text', 'title' => __('Youtube', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://youtube.com'), array('id' => 'pinterest-url', 'type' => 'text', 'title' => __('Pinterest', 'redux-framework-demo'), 'validate' => 'url', 'default' => 'http://pinterest.com'), array('id' => 'sergio-email', 'type' => 'text', 'title' => __('Endereço da Fanpage', 'redux-framework-demo'), 'validate' => 'email', 'default' => '*****@*****.**'), array('id' => 'sergio-tels', 'type' => 'multi_text', 'title' => __('Adicione os números telefônicos', 'redux-framework-demo'), 'subtitle' => __('', 'redux-framework-demo'), 'desc' => __('Ex.: TIM +55 9342 9238', 'redux-framework-demo')), array('id' => 'sergio-local', 'type' => 'text', 'title' => __('Dados de localização', 'redux-framework-demo'), 'default' => 'R. Dom Pedro II, 941 - Prata, Campina Grande - PB, 58400-062'))));
// -> Painel
Redux::setSection($opt_name, array('title' => __('Painel', 'redux-framework-demo'), 'id' => 'panel', 'desc' => __('', 'redux-framework-demo'), 'icon' => 'el el-photo', 'fields' => array(array('id' => 'slides-panel', 'type' => 'slides', 'title' => __('Adicionar sliders', 'redux-framework-demo'), 'subtitle' => __('Todas as imagens serão usadas no slider', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'placeholder' => array('title' => __('Título', 'redux-framework-demo'), 'description' => __('Descrição', 'redux-framework-demo'), 'url' => __('Link', 'redux-framework-demo'))))));
// -> Prêmios recebidos
Redux::setSection($opt_name, array('title' => __('Prêmios recebidos', 'redux-framework-demo'), 'id' => 'winners', 'desc' => __('', 'redux-framework-demo'), 'icon' => 'el el-star-empty', 'fields' => array(array('id' => 'slides-winners', 'type' => 'slides', 'title' => __('Adicionar prêmios', 'redux-framework-demo'), 'subtitle' => __('', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'placeholder' => array('title' => __('Título', 'redux-framework-demo'), 'description' => __('Descrição', 'redux-framework-demo'), 'url' => __('Link', 'redux-framework-demo'))))));
// -> Painel
Redux::setSection($opt_name, array('title' => __('Newsletter', 'redux-framework-demo'), 'id' => 'newsletter', 'desc' => __('', 'redux-framework-demo'), 'icon' => 'el el-envelope', 'fields' => array(array('id' => 'newsletter-header', 'type' => 'text', 'title' => __('Cabeçalho', 'redux-framework-demo'), 'default' => 'INSCREVA-SE EM NOSSA LISTA DE CARTINHAS'), array('id' => 'newsletter-desc', 'type' => 'textarea', 'title' => __('Descrição', 'redux-framework-demo'), 'default' => 'Estamos sempre produzindo textos reflexivos e compartilhando nossas ideias sobre como o design pode mudar o mundo. Enviamos a cada duas semanas uma cartinha para os nossos seguidores, cheia de referências e conteúdos interessantes, além de ofertas exclusivas para os nossos produtos.'), array('id' => 'newsletter-btn', 'type' => 'text', 'title' => __('Texto do botão', 'redux-framework-demo'), 'default' => 'Quero receber'))));
/**Redux::setSection( $opt_name, array(
       'title'      => __( 'Text', 'redux-framework-demo' ),
       'desc'       => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="//docs.reduxframework.com/core/fields/text/" target="_blank">//docs.reduxframework.com/core/fields/text/</a>',
       'id'         => 'opt-text-subsection',
       'subsection' => true,
       'fields'     => array(
           array(
               'id'       => 'text-example',
               'type'     => 'text',
               'title'    => __( 'Text Field', 'redux-framework-demo' ),
               'subtitle' => __( 'Subtitle', 'redux-framework-demo' ),
               'desc'     => __( 'Field Description', 'redux-framework-demo' ),
               'default'  => 'Default Text',
           ),
       )
Пример #14
0
/**
Colors
*/
Redux::setSection($vw_opt_name, array('title' => 'Colors', 'desc' => 'These are options for theme colors and background.', 'id' => 'vw-options-colors', 'icon' => 'el el-tint', 'fields' => array(array('id' => 'color_primary', 'type' => 'color', 'title' => 'Primary Color', 'subtitle' => 'Font color for links, buttons, hilight area, etc.', 'transparent' => false, 'default' => '#3facd6'))));
Redux::setSection($vw_opt_name, array('title' => 'Top Bar Colors', 'desc' => '', 'id' => 'vw-options-colors-top-bar', 'subsection' => true, 'fields' => array(array('id' => 'color_topbar_bg', 'type' => 'color', 'title' => 'Background Color', 'mode' => 'background', 'transparent' => false, 'default' => '#333333'), array('id' => 'color_topbar_font', 'type' => 'color', 'title' => 'Font Color', 'transparent' => false, 'default' => '#eeeeee'), array('id' => 'color_topbar_highlight', 'type' => 'color', 'title' => 'Hightlight Color', 'subtitle' => 'Hightlight color for link and button hover, etc.', 'transparent' => false, 'default' => '#3facd6'), array('id' => 'color_topbar_highlight_font', 'type' => 'color', 'title' => 'Hightlight Font Color', 'subtitle' => 'Hightlight font color for link and button hover, etc.', 'transparent' => false, 'default' => '#ffffff'))));
Redux::setSection($vw_opt_name, array('title' => 'Header Colors', 'desc' => '', 'id' => 'vw-options-colors-header', 'subsection' => true, 'fields' => array(array('id' => 'color_header_bg', 'type' => 'color', 'title' => 'Background Color', 'mode' => 'background', 'transparent' => false, 'default' => '#f9f9f9'), array('id' => 'color_header_font', 'type' => 'color', 'title' => 'Font Color', 'transparent' => false, 'default' => '#bbbbbb'))));
Redux::setSection($vw_opt_name, array('title' => 'Main Menu Colors', 'desc' => '', 'id' => 'vw-options-colors-main-menu', 'subsection' => true, 'fields' => array(array('id' => 'color_nav_bg', 'type' => 'color', 'title' => 'Background Color', 'mode' => 'background', 'transparent' => false, 'default' => '#333333'), array('id' => 'color_nav_font', 'type' => 'color', 'title' => 'Font Color', 'transparent' => false, 'default' => '#ffffff'), array('id' => 'color_nav_highlight', 'type' => 'color', 'title' => 'Hightlight Color', 'subtitle' => 'Hightlight color for link and button hover, etc.', 'transparent' => false, 'default' => '#3facd6'), array('id' => 'color_nav_highlight_font', 'type' => 'color', 'title' => 'Hightlight Font Color', 'subtitle' => 'Hightlight font color for link and button hover, etc.', 'transparent' => false, 'default' => '#ffffff'))));
Redux::setSection($vw_opt_name, array('title' => 'Footer Colors', 'desc' => '', 'id' => 'vw-options-colors-footer', 'subsection' => true, 'fields' => array(array('id' => 'color_footer_bg', 'type' => 'color', 'title' => 'Background Color', 'mode' => 'background', 'transparent' => false, 'default' => '#111111'), array('id' => 'color_footer_font', 'type' => 'color', 'title' => 'Font Color', 'transparent' => false, 'default' => '#999999'), array('id' => 'color_footer_heading', 'type' => 'color', 'title' => 'Heading Font Color', 'transparent' => false, 'default' => '#222222'))));
Redux::setSection($vw_opt_name, array('title' => 'Copyright Bar Colors', 'desc' => '', 'id' => 'vw-options-colors-copyright-bar', 'subsection' => true, 'fields' => array(array('id' => 'color_copyright_bg', 'type' => 'color', 'title' => 'Background Color', 'mode' => 'background', 'transparent' => false, 'default' => '#000000'), array('id' => 'color_copyright_font', 'type' => 'color', 'title' => 'Font Color', 'transparent' => false, 'default' => '#dddddd'))));
/**
bbPress
*/
Redux::setSection($vw_opt_name, array('title' => 'bbPress', 'desc' => 'These are options for bbPress. You need to install the <a href="https://wordpress.org/plugins/bbpress/" target="_blank">bbPress plugin</a> before using these options.', 'id' => 'vw-options-bbpress', 'icon' => 'el el-group-alt', 'fields' => array(array('id' => 'bbpress_enable_sidebar', 'type' => 'switch', 'title' => 'Enable Sidebar', 'default' => 0), array('id' => 'bbpress_sidebar', 'type' => 'select', 'title' => 'Default Sidebar for bbPress', 'data' => 'sidebar', 'default' => 'blog-sidebar'))));
/**
Custom CSS
*/
Redux::setSection($vw_opt_name, array('title' => 'Custom CSS/JS', 'desc' => '', 'id' => 'vw-options-custom-css', 'icon' => 'el el-certificate', 'fields' => array(array('id' => 'custom_css', 'type' => 'ace_editor', 'theme' => 'monokai', 'mode' => 'css', 'title' => 'Custom CSS', 'subtitle' => 'Paste your CSS code here.'), array('id' => 'custom_js', 'type' => 'ace_editor', 'theme' => 'monokai', 'mode' => 'javascript', 'title' => 'Custom JS', 'subtitle' => 'Paste your JS code here.'))));
do_action('vw_action_init_theme_options', $vw_opt_name);
/* -----------------------------------------------------------------------------
 * Actions
 * -------------------------------------------------------------------------- */
add_action('redux/options/' . $vw_opt_name . '/saved', 'vw_options_saved');
if (!function_exists('vw_options_saved')) {
    function vw_options_saved()
    {
        if (function_exists('icl_register_string')) {
            $copyright_text = vw_get_option('copyright_text');
            icl_register_string(VW_THEME_NAME . ' Copyright', strtolower(VW_THEME_NAME . '_copyright'), $copyright_text);
        }
    }
}
Пример #15
0
                            'description' => "Upload your own logo, change background color or images, select links color which you love - it's limitless",
                            'url'         => '<a class="da-link" href="#">Learn more</a>',
                            'enabled'     => 1,
                        )
                    )
                ),
*/
Redux::setSections($opt_name, array(array('id' => 'evl-tab-8', 'title' => __('Parallax Slider', 'evolve'), 'icon' => 't4p-icon-appbarmonitor', 'fields' => $fields)));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-9', 'title' => __('Posts Slider', 'evolve'), 'icon' => 't4p-icon-appbarvideogallery', 'fields' => array(array('subtitle' => __('Display Posts Slider on the homepage, all pages or select the slider in the post/page edit mode.', 'evolve'), 'id' => 'evl_posts_slider', 'type' => 'select', 'options' => array('homepage' => __('Homepage only', 'evolve'), 'post' => __('Manually select in a Post/Page edit mode', 'evolve'), 'all' => __('All pages', 'evolve')), 'title' => __('Posts Slider placement', 'evolve'), 'default' => 'post'), array('id' => 'evl_posts_number', 'type' => 'spinner', 'min' => 1, 'max' => 10, 'title' => __('Number of posts to display', 'evolve'), 'default' => '5'), array('subtitle' => __('Choose to display latest posts or posts of a category.', 'evolve'), 'id' => 'evl_posts_slider_content', 'type' => 'select', 'options' => array('recent' => __('Recent posts', 'evolve'), 'category' => __('Posts in category', 'evolve')), 'title' => __('Slideshow content', 'evolve'), 'default' => 'recent'), array('subtitle' => __('Select post categories to pull content for the post slideshow.', 'evolve'), 'id' => 'evl_posts_slider_id', 'type' => 'select', 'multi' => true, 'data' => 'categories', 'required' => array(array('evl_posts_slider_content', '=', 'category')), 'title' => __('Category ID(s)', 'evolve')), array('subtitle' => __('Input the time between transitions (Default: 3500);', 'evolve'), 'id' => 'evl_carousel_speed', 'type' => 'spinner', 'title' => __('Slider Speed', 'evolve'), 'step' => 100, 'default' => '7000'), array('subtitle' => __('Sets the length of Slider Title. Default is 40', 'evolve'), 'id' => 'evl_posts_slider_title_length', 'type' => 'spinner', 'title' => __('Slider Title Length', 'evolve'), 'default' => '40'), array('subtitle' => __('Select the typography you want for the slide title. * non web-safe font.', 'evolve'), 'id' => 'evl_carousel_slide_title_font', 'type' => 'typography', 'line-height' => false, 'text-align' => false, 'title' => __('Slider Title font', 'evolve'), 'default' => array('font-size' => '36px', 'font-family' => 'Roboto', 'color' => '', 'font-style' => '')), array('subtitle' => __('Select the typography you want for the slide description. * non web-safe font.', 'evolve'), 'id' => 'evl_carousel_slide_subtitle_font', 'type' => 'typography', 'line-height' => false, 'text-align' => false, 'title' => __('Slider description font', 'evolve'), 'default' => array('font-size' => '18px', 'font-family' => 'Roboto', 'color' => '', 'font-style' => ''))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-17', 'title' => __('Flexslider', 'evolve'), 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'icon' => 't4p-icon-appbarlayer', 'fields' => array(array('subtitle' => __('Turn on to autoplay the slideshow.', 'evolve'), 'id' => 'evl_slideshow_autoplay', 'type' => 'switch', 'title' => __('Autoplay', 'evolve')), array('subtitle' => __('Controls the speed of slideshows for the [slider] shortcode and sliders within posts. 1000 = 1 second.', 'evolve'), 'id' => 'evl_slideshow_speed', 'type' => 'spinner', 'title' => __('Slideshow speed', 'evolve'), 'default' => '7000'), array('subtitle' => __('Controls the number of slides per group for the flexslider plugin.', 'evolve'), 'id' => 'evl_flexslider_number', 'type' => 'spinner', 'title' => __('Number of FlexSlider Slides', 'evolve'), 'default' => '5'), array('subtitle' => __('Turn on if you want to show pagination circles below a video slide for flexslider. Leave it off to hide them on video slides.', 'evolve'), 'id' => 'evl_pagination_video_slide', 'type' => 'switch', 'title' => __('Pagination circles below video slides', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-19', 'title' => __('Lightbox', 'evolve'), 'icon' => 't4p-icon-appbarwindowmaximize', 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'fields' => array(array('subtitle' => __('Set the speed of the animation.', 'evolve'), 'id' => 'evl_lightbox_animation_speed', 'type' => 'select', 'options' => array('fast' => __('Fast', 'evolve'), 'slow' => __('Slow', 'evolve'), 'normal' => __('Normal', 'evolve')), 'title' => __('Animation Speed', 'evolve'), 'default' => 'fast'), array('subtitle' => __('Show the gallery.', 'evolve'), 'id' => 'evl_lightbox_gallery', 'type' => 'switch', 'title' => __('Show gallery', 'evolve')), array('subtitle' => __('Autoplay the lightbox gallery.', 'evolve'), 'id' => 'evl_lightbox_autoplay', 'type' => 'switch', 'title' => __('Autoplay the Lightbox Gallery', 'evolve')), array('subtitle' => __('If autoplay is enabled, set the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_lightbox_slideshow_speed', 'type' => 'spinner', 'title' => __('Slideshow Speed', 'evolve'), 'default' => '5000'), array('subtitle' => __('Set the opacity of background, <br />0.1 (lowest) to 1 (highest).', 'evolve'), 'id' => 'evl_lightbox_opacity', 'type' => 'slider', 'min' => 0.1, 'max' => 1, 'step' => 0.1, 'resolution' => 0.1, 'title' => __('Background Opacity', 'evolve'), 'default' => '0.8'), array('subtitle' => __('Show the image caption.', 'evolve'), 'id' => 'evl_lightbox_title', 'type' => 'switch', 'title' => __('Show Caption', 'evolve')), array('subtitle' => __('Show the image description. The Alternative text field is used for the description.', 'evolve'), 'id' => 'evl_lightbox_subtitle', 'type' => 'switch', 'title' => __('Show description', 'evolve')), array('subtitle' => __('Show social sharing buttons on lightbox.', 'evolve'), 'id' => 'evl_lightbox_social', 'type' => 'switch', 'title' => __('Social Sharing', 'evolve')), array('subtitle' => __('Show post images that are inside the post content area in the lightbox.', 'evolve'), 'id' => 'evl_lightbox_post_images', 'type' => 'switch', 'title' => __('Show Post Images in Lightbox', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-13', 'title' => __('Contact', 'evolve'), 'icon' => 't4p-icon-appbarlocationcheckin', 'fields' => array(array('subtitle' => __('Select the type of google map to show on the contact page.', 'evolve'), 'id' => 'evl_gmap_type', 'type' => 'select', 'options' => array('roadmap' => __('roadmap', 'evolve'), 'satellite' => __('satellite', 'evolve'), 'hybrid' => __('hybrid (default)', 'evolve'), 'terrain' => __('terrain', 'evolve')), 'title' => __('Google Map Type', 'evolve'), 'default' => 'hybrid'), array('subtitle' => __('(in pixels or percentage, e.g.:100% or 100px)', 'evolve'), 'id' => 'evl_gmap_width', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Width', 'evolve'), 'default' => '100%'), array('subtitle' => __('(in pixels, e.g.: 100px)', 'evolve'), 'id' => 'evl_gmap_height', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Height', 'evolve'), 'default' => '415px'), array('subtitle' => __('Example: 775 New York Ave, Brooklyn, Kings, New York 11203.<br /> For multiple markers, separate the addresses with the | symbol. ex: Address 1|Address 2|Address 3.', 'evolve'), 'id' => 'evl_gmap_address', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Address', 'evolve'), 'default' => 'Via dei Fori Imperiali'), array('subtitle' => __('Insert name of header which will be in the header of sent email.', 'evolve'), 'id' => 'evl_sent_email_header', 'type' => 'text', 'title' => __('Sent Email Header (From)', 'evolve'), 'default' => 'Evolve'), array('subtitle' => __('Enter the email adress the form will be sent to.', 'evolve'), 'id' => 'evl_email_address', 'type' => 'text', 'title' => __('Email Address', 'evolve')), array('subtitle' => __('Higher number will be more zoomed in.', 'evolve'), 'id' => 'evl_map_zoom_level', 'type' => 'slider', 'min' => 0, 'max' => 25, 'title' => __('Map Zoom Level', 'evolve'), 'default' => '18'), array('subtitle' => __('Display the address pin.', 'evolve'), 'id' => 'evl_map_pin', 'type' => 'switch', 'on' => __('Hide', 'evolve'), 'off' => __('Show', 'evolve'), 'title' => __('Hide Address Pin', 'evolve')), array('subtitle' => __('Keep the popup graphic with address info hidden when the google map loads. It will only show when the pin on the map is clicked.', 'evolve'), 'id' => 'evl_map_popup', 'type' => 'switch', 'title' => __('Show Map Popup On Click', 'evolve')), array('subtitle' => __('Disable scrollwheel on google maps.', 'evolve'), 'id' => 'evl_map_scrollwheel', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'type' => 'switch', 'title' => __('Disable Map Scrollwheel', 'evolve')), array('subtitle' => __('Disable scale on google maps.', 'evolve'), 'id' => 'evl_map_scale', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Scale', 'evolve')), array('subtitle' => __('Check the box to disable zoom control icon and pan control icon on google maps.', 'evolve'), 'id' => 'evl_map_zoomcontrol', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Zoom & Pan Control Icons', 'evolve')), array('subtitle' => sprintf(__('Get Google reCAPTCHA keys <a href="%s">here</a>  to enable spam protection on the contact page.', 'evolve'), 'https://www.google.com/recaptcha/admin'), 'id' => 'evl_captcha_plugin', 'style' => 'warning', 'type' => 'info', 'notice' => false), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_public', 'type' => 'text', 'title' => __('Google reCAPTCHA Site Key', 'evolve')), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_private', 'type' => 'text', 'title' => __('Google reCAPTCHA Secret key', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-7', 'title' => __('Extra', 'evolve'), 'icon' => 't4p-icon-appbarsettings', 'fields' => array(array('subtitle' => __('Select the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_testimonials_speed', 'type' => 'spinner', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Testimonials Speed', 'evolve'), 'default' => '4000'), array('subtitle' => __('Check the box to add rel="nofollow" attribute to social sharing box shortcode.', 'evolve'), 'id' => 'evl_nofollow_social_links', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Add rel="nofollow" to social links', 'evolve')), array('subtitle' => __('Check this box if you want to enable breadcrumbs navigation', 'evolve'), 'id' => 'evl_breadcrumbs', 'type' => 'checkbox', 'title' => __('Enable Breadcrumbs Navigation', 'evolve'), 'default' => '1'), array('subtitle' => __('Choose the position of the <strong>Older/Newer Posts</strong> links', 'evolve'), 'id' => 'evl_nav_links', 'type' => 'select', 'options' => array('after' => __('After posts', 'evolve'), 'before' => __('Before posts', 'evolve'), 'both' => __('Both', 'evolve')), 'title' => __('Position of navigation links', 'evolve'), 'default' => 'after'), array('id' => 'evl_pos_button', 'type' => 'select', 'compiler' => true, 'options' => array('disable' => __('Disable', 'evolve'), 'left' => __('Left', 'evolve'), 'right' => __('Right', 'evolve'), 'middle' => __('Middle', 'evolve')), 'title' => __('Position of \'Back to Top\' button', 'evolve'), 'default' => 'right'), array('subtitle' => __('<h3 style=\'margin: 0;\'>Options For Plugins Integrated Within The Theme</h3>', 'evolve'), 'id' => 'evl_plugins_only', 'type' => 'info'), array('subtitle' => __('Check this box if you want to enable FlexSlider support', 'evolve'), 'id' => 'evl_flexslider', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Enable FlexSlider support', 'evolve')), array('subtitle' => __('Check this box if you want to enable Parallax Slider support', 'evolve'), 'id' => 'evl_parallax_slider_support', 'type' => 'checkbox', 'title' => __('Enable Parallax Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Carousel Slider support', 'evolve'), 'id' => 'evl_carousel_slider', 'type' => 'checkbox', 'title' => __('Enable Carousel Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Google Map Scripts', 'evolve'), 'id' => 'evl_status_gmap', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Google Map Scripts', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Animate.css plugin support - (menu hover effect, featured image hover effect, button hover effect, etc.)', 'evolve'), 'id' => 'evl_animatecss', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Animate.css plugin support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check the box to disable Youtube API scripts.', 'evolve'), 'id' => 'evl_status_yt', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Disable Youtube API Scripts', 'evolve')), array('subtitle' => __('Check the box to disable Vimeo API scripts.', 'evolve'), 'id' => 'evl_status_vimeo', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Disable Vimeo API Scripts', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-12', 'title' => __('WooCommerce', 'evolve'), 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'icon' => 't4p-icon-appbarcart', 'fields' => array(array('subtitle' => __('Insert the number of posts to display per page.', 'evolve'), 'id' => 'evl_woo_items', 'type' => 'text', 'title' => __('Number of Products per Page', 'evolve'), 'default' => '12'), array('subtitle' => __('Check the box to disable the ordering boxes displayed on the shop page.', 'evolve'), 'id' => 'evl_woocommerce_evolve_ordering', 'type' => 'checkbox', 'title' => __('Disable Woocommerce Shop Page Ordering Boxes', 'evolve')), array('subtitle' => __('Check the box to use evolve\'s one page checkout template.', 'evolve'), 'id' => 'evl_woocommerce_one_page_checkout', 'type' => 'checkbox', 'title' => __('Use Woocommerce One Page Checkout', 'evolve')), array('subtitle' => __('Check the box to show the order notes on the checkout page.', 'evolve'), 'id' => 'evl_woocommerce_enable_order_notes', 'type' => 'checkbox', 'title' => __('Show Woocommerce Order Notes on Checkout', 'evolve')), array('subtitle' => __('Check the box to show My Account link, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_acc_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce My Account Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the Cart icon, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_cart_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce Cart Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the social icons on product pages, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_social_links', 'type' => 'checkbox', 'title' => __('Show Woocommerce Social Icons', 'evolve')), array('subtitle' => __('Insert your text and it will appear in the first message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_1', 'type' => 'textarea', 'title' => __('Account Area Message 1', 'evolve'), 'default' => 'Call us - <i class="fa fa-phone"></i> 7438 882 764'), array('subtitle' => __('Insert your text and it will appear in the second message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_2', 'type' => 'textarea', 'title' => __('Account Area Message 2', 'evolve'), 'default' => 'Email us - <i class="fa fa-envelope"></i> contact@example.com')))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-11', 'title' => __('Custom CSS', 'evolve'), 'icon' => 't4p-icon-appbarsymbolbraces', 'fields' => array(array('subtitle' => __('Paste your CSS code, do not include any tags or HTML in this field. Any custom CSS entered here will override the theme CSS. In some cases, the !important tag may be needed.', 'evolve'), 'id' => 'evl_css_content', 'type' => 'textarea', 'title' => __('Custom CSS', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'import/export', 'title' => __('Import / Export', 'evolve'), 'heading' => '', 'icon' => 't4p-icon-appbarinbox', 'customizer' => false, 'fields' => array(array('id' => 'redux_import_export', 'type' => 'import_export', 'full_width' => true)))));
add_action("redux/extension/customizer/control/includes", 'evolve_extend_customizer');
function evolve_extend_customizer()
{
    // Extra customizer field types
    if (!class_exists('Redux_Customizer_Control_spinner')) {
        class Redux_Customizer_Control_spinner extends Redux_Customizer_Control
        {
            public $type = "redux-spinner";
        }
    }
    if (!class_exists('Redux_Customizer_Control_slider')) {
        class Redux_Customizer_Control_slider extends Redux_Customizer_Control
        {
            public $type = "redux-slider";
        }
Redux::setArgs($opt_name, $args);
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Main Settings', 'virtue'), 'id' => 'main_settings', 'header' => '', 'desc' => "<div class='redux-info-field'><h3>" . __('Welcome to Virtue Theme Options', 'virtue') . "</h3>\n        <p>" . __('This theme was developed by', 'virtue') . " <a href=\"http://kadencethemes.com/\" target=\"_blank\">Kadence Themes</a></p>\n        <p>" . __('For theme documentation visit', 'virtue') . ": <a href=\"http://docs.kadencethemes.com/virtue/\" target=\"_blank\">docs.kadencethemes.com/virtue/</a>\n        <br />\n        " . __('For support please visit', 'virtue') . ": <a href=\"http://wordpress.org/support/theme/virtue\" target=\"_blank\">wordpress.org/support/theme/virtue</a></p></div>", 'icon_class' => 'icon-large', 'icon' => 'icon-dashboard', 'customizer' => true, 'fields' => array(array('id' => 'boxed_layout', 'type' => 'image_select', 'compiler' => false, 'customizer' => true, 'title' => __('Site Layout Style', 'virtue'), 'subtitle' => __('Select Boxed or Wide Site Layout Style', 'virtue'), 'options' => array('wide' => array('alt' => 'Wide Layout', 'img' => OPTIONS_PATH . 'img/1c.png'), 'boxed' => array('alt' => 'Boxed Layout', 'img' => OPTIONS_PATH . 'img/3cm.png')), 'default' => 'wide'), array('id' => 'footer_layout', 'type' => 'image_select', 'compiler' => false, 'customizer' => true, 'title' => __('Footer Widget Layout', 'virtue'), 'subtitle' => __('Select how many columns for footer widgets', 'virtue'), 'options' => array('fourc' => array('alt' => 'Four Column Layout', 'img' => OPTIONS_PATH . 'img/footer-widgets-4.png'), 'threec' => array('alt' => 'Three Column Layout', 'img' => OPTIONS_PATH . 'img/footer-widgets-3.png'), 'twoc' => array('alt' => 'Two Column Layout', 'img' => OPTIONS_PATH . 'img/footer-widgets-2.png')), 'default' => 'fourc'), array('id' => 'logo_options', 'type' => 'info', 'customizer' => true, 'desc' => __('Logo Options', 'virtue')), array('id' => 'logo_layout', 'type' => 'image_select', 'compiler' => false, 'customizer' => true, 'title' => __('Logo Layout', 'virtue'), 'subtitle' => __('Choose how you want your logo to be laid out', 'virtue'), 'options' => array('logoleft' => array('alt' => 'Logo Left Layout', 'img' => OPTIONS_PATH . 'img/logo_layout_01.png'), 'logohalf' => array('alt' => 'Logo Half Layout', 'img' => OPTIONS_PATH . 'img/logo_layout_03.png'), 'logocenter' => array('alt' => 'Logo Center Layout', 'img' => OPTIONS_PATH . 'img/logo_layout_02.png')), 'default' => 'logoleft'), array('id' => 'x1_virtue_logo_upload', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Logo', 'virtue'), 'subtitle' => __('Upload your Logo. If left blank theme will use site name.', 'virtue')), array('id' => 'x2_virtue_logo_upload', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload Your @2x Logo for Retina Screens', 'virtue'), 'compiler' => 'true', 'subtitle' => __('Should be twice the pixel size of your normal logo.', 'virtue')), array('id' => 'font_logo_style', 'type' => 'typography', 'title' => __('Sitename Logo Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'customizer' => false, 'color' => true, 'preview' => true, 'output' => array('header #logo a.brand', ".logofont"), 'subtitle' => __("Choose size and style your sitename, if you don't use an image logo.", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '32px', 'line-height' => '40px')), array('id' => 'logo_below_text', 'type' => 'textarea', 'customizer' => true, 'title' => __('Site Tagline - Below Logo', 'virtue'), 'subtitle' => __('An optional line of text below your logo', 'virtue'), 'validate' => 'html', 'default' => ''), array('id' => 'font_tagline_style', 'type' => 'typography', 'title' => __('Site Tagline Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'customizer' => false, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('.kad_tagline'), 'subtitle' => __("Choose size and style your site tagline", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "#444444", 'font-style' => '400', 'font-size' => '14px', 'line-height' => '20px')), array('id' => 'logo_padding_top', 'type' => 'slider', 'title' => __('Logo Spacing', 'virtue'), 'desc' => __('Top Spacing', 'virtue'), "default" => "25", "min" => "0", "step" => "1", 'customizer' => true, "max" => "80"), array('id' => 'logo_padding_bottom', 'type' => 'slider', 'title' => __('Logo Spacing', 'virtue'), 'desc' => __('Bottom Spacing', 'virtue'), "default" => "10", "min" => "0", 'customizer' => true, "step" => "1", "max" => "80"), array('id' => 'logo_padding_left', 'type' => 'slider', 'title' => __('Logo Spacing', 'virtue'), 'desc' => __('Left Spacing', 'virtue'), "default" => "0", "min" => "0", 'customizer' => true, "step" => "1", "max" => "80"), array('id' => 'logo_padding_right', 'type' => 'slider', 'title' => __('Logo Spacing', 'virtue'), 'desc' => __('Right Spacing', 'virtue'), "default" => "0", "min" => "0", 'customizer' => true, "step" => "1", "max" => "80"), array('id' => 'menu_margin_top', 'type' => 'slider', 'title' => __('Primary Menu Spacing', 'virtue'), 'desc' => __('Top Spacing', 'virtue'), "default" => "40", "min" => "0", "step" => "1", 'customizer' => true, "max" => "80"), array('id' => 'menu_margin_bottom', 'type' => 'slider', 'title' => __('Primary Menu Spacing', 'virtue'), 'desc' => __('Bottom Spacing', 'virtue'), "default" => "10", "min" => "0", 'customizer' => true, "step" => "1", "max" => "80"), array('id' => 'virtue_banner_upload', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Sitewide Banner', 'virtue'), 'compiler' => 'true', 'subtitle' => __('Upload a banner for bottom of header.', 'virtue')))));
Redux::setSection($opt_name, array('icon' => 'icon-cogs', 'icon_class' => 'icon-large', 'id' => 'topbar_settings', 'title' => __('Topbar Settings', 'virtue'), 'fields' => array(array('id' => 'topbar', 'type' => 'switch', 'customizer' => true, 'title' => __('Use Topbar?', 'virtue'), 'subtitle' => __('Choose to show or hide topbar', 'virtue'), "default" => 1), array('id' => 'topbar_icons', 'type' => 'switch', 'customizer' => false, 'title' => __('Use Topbar Icon Menu?', 'virtue'), 'subtitle' => __('Choose to show or hide topbar icon Menu', 'virtue'), "default" => 0), array('id' => 'topbar_icon_menu', 'type' => 'kad_icons', 'customizer' => false, 'title' => __('Topbar Icon Menu', 'virtue'), 'subtitle' => __('Choose your icons for the topbar icon menu.', 'virtue')), array('id' => 'show_cartcount', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Cart total in topbar?', 'virtue'), 'subtitle' => __('This only works if using woocommerce', 'virtue'), "default" => 1), array('id' => 'topbar_search', 'type' => 'switch', 'customizer' => true, 'title' => __('Display Search in Topbar?', 'virtue'), 'subtitle' => __('Choose to show or hide search in topbar', 'virtue'), "default" => 1), array('id' => 'topbar_widget', 'type' => 'switch', 'customizer' => true, 'title' => __('Enable widget area in right of Topbar?', 'virtue'), 'subtitle' => __('Note this will hide remove search (you can re-enable it by adding it to the widget area)', 'virtue'), "default" => 0), array('id' => 'topbar_layout', 'type' => 'switch', 'customizer' => true, 'title' => __('Topbar Layout Switch', 'virtue'), 'subtitle' => __('This moves the left items to the right and right items to the left.', 'virtue'), "default" => 0))));
Redux::setSection($opt_name, array('icon' => 'icon-picture', 'id' => 'home_slider_settings', 'icon_class' => 'icon-large', 'title' => __('Home Slider Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Home Page Slider Options', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'info_home_slider_settings_notice', 'type' => 'info', 'customizer' => true, 'desc' => __('*NOTE: Make sure Virtue/Pinnacle Toolkit plugin is activated* <br>Go to Apperance > Theme Options > Home Slider for all Home slider settings', 'virtue')), array('id' => 'choose_slider', 'type' => 'select', 'title' => __('Choose a Home Image Slider', 'virtue'), 'subtitle' => __("If you don't want an image slider on your home page choose none.", 'virtue'), 'options' => array('none' => 'None', 'flex' => 'Flex Slider', 'fullwidth' => 'Fullwidth Slider', 'thumbs' => 'Thumb Slider', 'carousel' => 'Carousel Slider', 'latest' => 'Latest Posts', 'video' => 'Video'), 'default' => '', 'width' => 'width:60%', 'customizer' => false), array('id' => 'home_slider', 'type' => 'kad_slides', 'customizer' => false, 'title' => __('Slider Images', 'virtue'), 'subtitle' => __('Use large images for best results.', 'virtue')), array('id' => 'slider_size', 'type' => 'slider', 'title' => __('Slider Max Height', 'virtue'), 'desc' => __('Note: does not work if images are smaller than max.', 'virtue'), "default" => "400", "min" => "100", "step" => "5", 'customizer' => false, "max" => "600"), array('id' => 'slider_size_width', 'type' => 'slider', 'title' => __('Slider Max Width', 'virtue'), 'desc' => __('Note: does not work if images are smaller than max.', 'virtue'), "default" => "1170", "min" => "600", "step" => "5", 'customizer' => false, "max" => "1170"), array('id' => 'slider_autoplay', 'type' => 'switch', 'title' => __('Auto Play?', 'virtue'), 'subtitle' => __('This determines if a slider automatically scrolls', 'virtue'), "default" => 1, 'customizer' => false), array('id' => 'slider_pausetime', 'type' => 'slider', 'title' => __('Slider Pause Time', 'virtue'), 'desc' => __('How long to pause on each slide, in milliseconds.', 'virtue'), "default" => "7000", "min" => "3000", "step" => "1000", 'customizer' => false, "max" => "12000"), array('id' => 'trans_type', 'type' => 'select', 'title' => __('Transition Type', 'virtue'), 'subtitle' => __("Choose a transition type", 'virtue'), 'options' => array('fade' => 'Fade', 'slide' => 'Slide'), 'customizer' => false, 'default' => 'fade'), array('id' => 'slider_transtime', 'type' => 'slider', 'title' => __('Slider Transition Time', 'virtue'), 'desc' => __('How long for slide transitions, in milliseconds.', 'virtue'), "default" => "600", "min" => "200", 'customizer' => false, "step" => "100", "max" => "1200"), array('id' => 'slider_captions', 'type' => 'switch', 'title' => __('Show Captions?', 'virtue'), 'subtitle' => __('Choose to show or hide captions', 'virtue'), "default" => 0, 'customizer' => false), array('id' => 'video_embed', 'type' => 'textarea', 'customizer' => false, 'title' => __('Video Embed Code', 'virtue'), 'subtitle' => __('If your using a video on the home page place video embed code here.', 'virtue'), 'default' => ''))));
Redux::setSection($opt_name, array('icon' => 'icon-tablet', 'icon_class' => 'icon-large', 'id' => 'home_mobile_slider_settings', 'title' => __('Home Mobile Slider', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Create a more lightweight home slider for your mobile visitors.', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'mobile_switch', 'type' => 'switch', 'customizer' => false, 'title' => __('Would you like to use this feature?', 'virtue'), 'subtitle' => __('Choose if you would like to show a different slider on your home page for your mobile visitors.', 'virtue'), "default" => 0), array('id' => 'choose_mobile_slider', 'type' => 'select', 'customizer' => false, 'title' => __('Choose a Slider for Mobile', 'virtue'), 'subtitle' => __("Choose which slider you would like to show for mobile viewers.", 'virtue'), 'options' => array('none' => 'None', 'flex' => 'Flex Slider', 'video' => 'Video'), 'default' => 'none', 'width' => 'width:60%', 'required' => array('mobile_switch', '=', '1')), array('id' => 'home_mobile_slider', 'type' => 'kad_slides', 'customizer' => false, 'title' => __('Slider Images', 'virtue'), 'subtitle' => __('Use large images for best results.', 'virtue'), 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_size', 'type' => 'slider', 'customizer' => false, 'title' => __('Slider Max Height', 'virtue'), 'desc' => __('Note: does not work if images are smaller than max.', 'virtue'), "default" => "300", "min" => "100", "step" => "5", "max" => "800", 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_size_width', 'type' => 'slider', 'customizer' => false, 'title' => __('Slider Max Width', 'virtue'), 'desc' => __('Note: does not work if images are smaller than max.', 'virtue'), "default" => "480", "min" => "200", "step" => "5", "max" => "800", 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_autoplay', 'type' => 'switch', 'customizer' => false, 'title' => __('Auto Play?', 'virtue'), 'subtitle' => __('This determines if a slider automatically scrolls', 'virtue'), "default" => 1, 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_pausetime', 'type' => 'slider', 'customizer' => false, 'title' => __('Slider Pause Time', 'virtue'), 'desc' => __('How long to pause on each slide, in milliseconds.', 'virtue'), "default" => "7000", "min" => "3000", "step" => "1000", "max" => "12000", 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_trans_type', 'type' => 'select', 'customizer' => false, 'title' => __('Transition Type', 'virtue'), 'subtitle' => __("Choose a transition type", 'virtue'), 'options' => array('fade' => 'Fade', 'slide' => 'Slide'), 'default' => 'fade', 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_transtime', 'type' => 'slider', 'customizer' => false, 'title' => __('Slider Transition Time', 'virtue'), 'desc' => __('How long for slide transitions, in milliseconds.', 'virtue'), "default" => "600", "min" => "200", "step" => "100", "max" => "1200", 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_slider_captions', 'type' => 'switch', 'customizer' => false, 'title' => __('Show Captions?', 'virtue'), 'subtitle' => __('Choose to show or hide captions', 'virtue'), "default" => 0, 'required' => array('mobile_switch', '=', '1')), array('id' => 'mobile_video_embed', 'type' => 'textarea', 'customizer' => false, 'title' => __('Video Embed Code', 'virtue'), 'subtitle' => __('If your using a video on the home page place video embed code here.', 'virtue'), 'default' => '', 'required' => array('mobile_switch', '=', '1')))));
Redux::setSection($opt_name, array('icon' => 'icon-home', 'icon_class' => 'icon-large', 'id' => 'home_layout', 'title' => __('Home Layout', 'virtue'), 'desc' => "", 'fields' => array(array('id' => 'home_sidebar_layout', 'type' => 'image_select', 'compiler' => false, 'customizer' => true, 'title' => __('Display a sidebar on the Home Page?', 'virtue'), 'subtitle' => __('This determines if there is a sidebar on the home page.', 'virtue'), 'options' => array('full' => array('alt' => 'Full Layout', 'img' => OPTIONS_PATH . 'img/1col.png'), 'sidebar' => array('alt' => 'Sidebar Layout', 'img' => OPTIONS_PATH . 'img/2cr.png')), 'default' => 'full'), array('id' => 'home_sidebar', 'type' => 'select', 'customizer' => true, 'title' => __('Choose a Sidebar for your Home Page', 'virtue'), 'data' => 'sidebars', 'default' => 'sidebar-primary', 'width' => 'width:60%'), array("id" => "homepage_layout", "type" => "sorter", 'customizer' => false, "title" => __('Homepage Layout Manager', 'virtue'), "subtitle" => __('Organize how you want the layout to appear on the homepage', 'virtue'), 'options' => array("disabled" => array("block_five" => __("Latest Blog Posts", 'virtue'), "block_six" => __("Portfolio Carousel", 'virtue'), "block_seven" => __("Icon Menu", 'virtue')), "enabled" => array("block_one" => __("Page Title", 'virtue'), "block_four" => __("Page Content", 'virtue')))), array('id' => 'info_blog_settings', 'type' => 'info', 'customizer' => false, 'desc' => __('Home Blog Settings', 'virtue')), array('id' => 'blog_title', 'type' => 'text', 'customizer' => false, 'title' => __('Home Blog Title', 'virtue'), 'subtitle' => __('ex: Latest from the blog', 'virtue')), array('id' => 'home_post_count', 'type' => 'slider', 'customizer' => false, 'title' => __('Choose How many posts on Homepage', 'virtue'), "default" => "4", "min" => "2", "step" => "2", "max" => "8"), array('id' => 'home_post_type', 'type' => 'select', 'customizer' => false, 'data' => 'categories', 'title' => __('Limit posts to a Category', 'virtue'), 'subtitle' => __('Leave blank to select all', 'virtue'), 'width' => 'width:60%'), array('id' => 'info_portfolio_settings', 'type' => 'info', 'customizer' => false, 'desc' => __('Home Portfolio Carousel Settings', 'virtue')), array('id' => 'portfolio_title', 'type' => 'text', 'customizer' => false, 'title' => __('Home Portfolio Carousel title', 'virtue'), 'subtitle' => __('ex: Portfolio Carousel title', 'virtue')), array('id' => 'portfolio_type', 'type' => 'select', 'customizer' => false, 'data' => 'terms', 'args' => array('taxonomies' => 'portfolio-type', 'args' => array()), 'title' => __('Portfolio Carousel Category Type', 'virtue'), 'subtitle' => __('Leave blank to select all types', 'virtue'), 'width' => 'width:60%'), array('id' => 'home_portfolio_carousel_count', 'type' => 'slider', 'customizer' => false, 'title' => __('Choose how many portfolio items are in carousel', 'virtue'), "default" => "6", "min" => "4", "step" => "1", "max" => "12"), array('id' => 'home_portfolio_order', 'type' => 'select', 'customizer' => false, 'title' => __('Portfolio Carousel Order by', 'virtue'), 'subtitle' => __("Choose how the portfolio items should be ordered in the carousel.", 'virtue'), 'options' => array('menu_order' => 'Menu Order', 'title' => 'Title', 'date' => 'Date', 'rand' => 'Random'), 'default' => 'menu_order', 'width' => 'width:60%'), array('id' => 'portfolio_show_type', 'type' => 'switch', 'customizer' => false, 'title' => __('Display Portfolio Types under Title', 'virtue'), "default" => 0), array('id' => 'info_iconmenu_settings', 'type' => 'info', 'customizer' => false, 'desc' => __('Home Icon Menu', 'virtue')), array('id' => 'icon_menu', 'type' => 'kad_icons', 'customizer' => false, 'title' => __('Icon Menu', 'virtue'), 'subtitle' => __('Choose your icons for the icon menu.', 'virtue')), array('id' => 'home_icon_menu_column', 'type' => 'slider', 'customizer' => false, 'title' => __('Choose how many columns in each row', 'virtue'), "default" => "3", "min" => "2", "step" => "1", "max" => "6"), array('id' => 'info_page_content', 'type' => 'info', 'customizer' => false, 'desc' => __('Page Content Options', 'virtue')), array('id' => 'home_post_summery', 'type' => 'select', 'customizer' => true, 'title' => __('Latest Post Display', 'virtue'), 'subtitle' => __("If Latest Post page is font page. Choose to show full post or post excerpt.", 'virtue'), 'options' => array('summery' => 'Post Excerpt', 'full' => 'Full'), 'default' => 'summery', 'width' => 'width:60%'), array('id' => 'info_home_layout_settings_notice', 'type' => 'info', 'customizer' => true, 'desc' => __('*NOTE: Make sure Virtue/Pinnacle Toolkit plugin is activated* <br>Go to Apperance > Theme Options > Home Layout for all home layout settings', 'virtue')))));
Redux::setSection($opt_name, array('icon' => 'icon-shopping-cart', 'id' => 'shop_settings', 'icon_class' => 'icon-large', 'title' => __('Shop Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Shop Archive Page Settings (Woocommerce plugin required)', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'shop_layout', 'type' => 'image_select', 'compiler' => false, 'customizer' => true, 'title' => __('Display the sidebar on shop archives?', 'virtue'), 'subtitle' => __('This determines if there is a sidebar on the shop and category pages.', 'virtue'), 'options' => array('full' => array('alt' => 'Full Layout', 'img' => OPTIONS_PATH . 'img/1col.png'), 'sidebar' => array('alt' => 'Sidebar Layout', 'img' => OPTIONS_PATH . 'img/2cr.png')), 'default' => 'full'), array('id' => 'shop_sidebar', 'type' => 'select', 'title' => __('Choose a Sidebar for your shop page', 'virtue'), 'data' => 'sidebars', 'customizer' => true, 'default' => 'sidebar-primary', 'width' => 'width:60%'), array('id' => 'products_per_page', 'type' => 'slider', 'customizer' => true, 'title' => __('How many products per page', 'virtue'), "default" => "12", "min" => "2", "step" => "1", "max" => "40"), array('id' => 'shop_rating', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Ratings in Shop and Category Pages', 'virtue'), 'subtitle' => __('This determines if the rating is displayed in the product archive pages', 'virtue'), "default" => 1), array('id' => 'product_quantity_input', 'type' => 'switch', 'customizer' => true, 'title' => __('Quantity Box plus and minus', 'virtue'), 'subtitle' => __('Turn this off if you would like to use browser added plus and minus for number boxes', 'virtue'), "default" => 1), array('id' => 'info_cat_product_size', 'type' => 'info', 'customizer' => true, 'desc' => __('Shop Category Image Size', 'virtue')), array('id' => 'product_cat_img_ratio', 'type' => 'select', 'title' => __('Category Image Aspect Ratio', 'virtue'), 'subtitle' => __('This sets how you want your category images to be cropped.', 'virtue'), 'options' => array('square' => __('Square 1:1', 'virtue'), 'portrait' => __('Portrait 3:4', 'virtue'), 'landscape' => __('Landscape 4:3', 'virtue'), 'widelandscape' => __('Wide Landscape 4:2', 'virtue'), 'off' => __('Turn Off', 'virtue')), 'default' => 'widelandscape', 'customizer' => true, 'width' => 'width:60%'), array('id' => 'info_shop_product_title', 'type' => 'info', 'customizer' => true, 'desc' => __('Shop Product Title Settings', 'virtue')), array('id' => 'font_shop_title', 'type' => 'typography', 'title' => __('Shop & archive Product title Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'customizer' => false, 'color' => true, 'preview' => true, 'output' => array('.product_item .product_details h5'), 'subtitle' => __("Choose Size and Style for product titles on category and archive pages.", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '700', 'font-size' => '16px', 'line-height' => '20px')), array('id' => 'shop_title_uppercase', 'type' => 'switch', 'customizer' => true, 'title' => __('Set Product Title to Uppercase?', 'virtue'), 'subtitle' => __('This makes your product titles uppercase on Category pages', 'virtue'), "default" => 0), array('id' => 'shop_title_min_height', 'type' => 'slider', 'title' => __('Product title Min Height', 'virtue'), 'desc' => __('If your titles are long increase this to help align your products height.', 'virtue'), "default" => "40", "min" => "20", "step" => "5", 'customizer' => true, "max" => "120"), array('id' => 'info_shop_img_size', 'type' => 'info', 'customizer' => true, 'desc' => __('Product Image Sizes', 'virtue')), array('id' => 'product_img_resize', 'type' => 'switch', 'customizer' => true, 'title' => __('Enable Product Image Crop on Catalog pages', 'virtue'), 'subtitle' => __('If turned off image dimensions are set by woocommerce settings - recommended width: 270px for Catalog Images', 'virtue'), "default" => 1), array('id' => 'product_simg_resize', 'type' => 'switch', 'customizer' => true, 'title' => __('Enable Product Image Crop on product Page', 'virtue'), 'subtitle' => __('If turned off image dimensions are set by woocommerce settings - recommended width: 468px for Single Product Image', 'virtue'), "default" => 1), array('id' => 'info_product_settings', 'type' => 'info', 'customizer' => true, 'desc' => __('Product Page Settings', 'virtue')), array('id' => 'product_tabs', 'type' => 'switch', 'title' => __('Display product tabs?', 'virtue'), 'subtitle' => __('This determines if product tabs are displayed', 'virtue'), "default" => 1, 'customizer' => true, 'customizer' => true), array('id' => 'related_products', 'type' => 'switch', 'customizer' => true, 'title' => __('Display related products?', 'virtue'), 'subtitle' => __('This determines related products are displayed', 'virtue'), "default" => 1))));
Redux::setSection($opt_name, array('icon' => 'icon-pencil', 'id' => 'basic_styling', 'icon_class' => 'icon-large', 'title' => __('Basic Styling', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Basic Stylng', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'skin_stylesheet', 'type' => 'select', 'title' => __('Theme Skin Stylesheet', 'virtue'), 'subtitle' => __("Note* changes made in options panel will override this stylesheet. Example: Colors set in typography.", 'virtue'), 'options' => $alt_stylesheets, 'default' => 'default.css', 'width' => 'width:60%', 'customizer' => true), array('id' => 'primary_color', 'type' => 'color', 'title' => __('Primary Color', 'virtue'), 'subtitle' => __('Choose the default Highlight color for your site.', 'virtue'), 'default' => '', 'transparent' => false, 'validate' => 'color', 'customizer' => true), array('id' => 'primary20_color', 'type' => 'color', 'title' => __('20% lighter than Primary Color', 'virtue'), 'subtitle' => __('This is used for hover effects', 'virtue'), 'default' => '', 'transparent' => false, 'validate' => 'color', 'customizer' => true), array('id' => 'gray_font_color', 'type' => 'color', 'title' => __('Sitewide Gray Fonts', 'virtue'), 'default' => '', 'transparent' => false, 'validate' => 'color', 'customizer' => true), array('id' => 'footerfont_color', 'type' => 'color', 'title' => __('Footer Font Color', 'virtue'), 'default' => '', 'transparent' => false, 'validate' => 'color', 'customizer' => true))));
Redux::setSection($opt_name, array('icon' => 'icon-edit', 'icon_class' => 'icon-large', 'id' => 'advanced_styling', 'title' => __('Advanced Styling', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Main Content Background', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'content_bg_color', 'type' => 'color', 'title' => __('Content Background Color', 'virtue'), 'default' => '', 'validate' => 'color', 'customizer' => true), array('id' => 'bg_content_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'content_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'content_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'content_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_topbar_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Topbar Background', 'virtue')), array('id' => 'topbar_bg_color', 'type' => 'color', 'customizer' => true, 'title' => __('Topbar Background Color', 'virtue'), 'default' => '', 'validate' => 'color'), array('id' => 'bg_topbar_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'topbar_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'topbar_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'topbar_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_header_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Header Background', 'virtue')), array('id' => 'header_bg_color', 'type' => 'color', 'title' => __('Header Background Color', 'virtue'), 'default' => '', 'validate' => 'color', 'customizer' => true), array('id' => 'bg_header_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'header_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'header_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'header_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_menu_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Secondary Menu Background', 'virtue')), array('id' => 'menu_bg_color', 'type' => 'color', 'title' => __('Secondary menu Background Color', 'virtue'), 'default' => '', 'validate' => 'color', 'customizer' => true), array('id' => 'bg_menu_bg_img', 'type' => 'media', 'customizer' => true, 'url' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'menu_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'menu_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'menu_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_mobile_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Mobile Menu Background', 'virtue')), array('id' => 'mobile_bg_color', 'type' => 'color', 'title' => __('Mobile Background Color', 'virtue'), 'default' => '', 'customizer' => true, 'validate' => 'color'), array('id' => 'bg_mobile_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'mobile_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'mobile_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'mobile_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_footer_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Footer Background', 'virtue')), array('id' => 'footer_bg_color', 'type' => 'color', 'title' => __('Footer Background Color', 'virtue'), 'default' => '', 'customizer' => true, 'validate' => 'color'), array('id' => 'bg_footer_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'footer_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'footer_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'footer_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'info_body_background', 'type' => 'info', 'customizer' => true, 'desc' => __('Body Background', 'virtue')), array('id' => 'boxed_bg_color', 'type' => 'color', 'title' => __('Body Background Color', 'virtue'), 'default' => '', 'customizer' => true, 'validate' => 'color'), array('id' => 'bg_boxed_bg_img', 'type' => 'media', 'url' => true, 'customizer' => true, 'title' => __('Upload background image or texture', 'virtue')), array('id' => 'boxed_bg_repeat', 'type' => 'select', 'customizer' => true, 'title' => __('Image repeat options', 'virtue'), 'options' => array('no-repeat' => 'no-repeat', 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y'), 'width' => 'width:60%'), array('id' => 'boxed_bg_placementx', 'type' => 'select', 'customizer' => true, 'title' => __('X image placement options', 'virtue'), 'options' => array('left' => 'left', 'center' => 'center', 'right' => 'right'), 'width' => 'width:60%'), array('id' => 'boxed_bg_placementy', 'type' => 'select', 'customizer' => true, 'title' => __('Y image placement options', 'virtue'), 'options' => array('top' => 'top', 'center' => 'center', 'bottom' => 'bottom'), 'width' => 'width:60%'), array('id' => 'boxed_bg_fixed', 'type' => 'select', 'customizer' => true, 'title' => __('Fixed or Scroll', 'virtue'), 'options' => array('fixed' => 'Fixed', 'scroll' => 'Scroll'), 'width' => 'width:60%'))));
Redux::setSection($opt_name, array('icon' => 'icon-text-width', 'id' => 'typography', 'icon_class' => 'icon-large', 'title' => __('Typography', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Header Font Options', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'info_typography_settings_notice', 'type' => 'info', 'customizer' => true, 'desc' => __('*NOTE: Make sure Virtue/Pinnacle Toolkit plugin is activated* <br>Go to Apperance > Theme Options > Typography settings for all Typography settings', 'virtue')), array('id' => 'font_h1', 'type' => 'typography', 'title' => __('H1 Headings', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'customizer' => false, 'color' => true, 'preview' => true, 'output' => array('h1'), 'subtitle' => __("Choose Size and Style for h1 (This Styles Your Page Titles)", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '38px', 'line-height' => '40px')), array('id' => 'font_h2', 'type' => 'typography', 'title' => __('H2 Headings', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'customizer' => false, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('h2'), 'subtitle' => __("Choose Size and Style for h2", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => 'normal', 'font-size' => '32px', 'line-height' => '40px')), array('id' => 'font_h3', 'type' => 'typography', 'title' => __('H3 Headings', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'customizer' => false, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('h3'), 'subtitle' => __("Choose Size and Style for h3", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '28px', 'line-height' => '40px')), array('id' => 'font_h4', 'type' => 'typography', 'title' => __('H4 Headings', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'customizer' => false, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('h4'), 'subtitle' => __("Choose Size and Style for h4", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '24px', 'line-height' => '40px')), array('id' => 'font_h5', 'type' => 'typography', 'title' => __('H5 Headings', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'customizer' => false, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('h5'), 'subtitle' => __("Choose Size and Style for h5", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '700', 'font-size' => '18px', 'line-height' => '24px')), array('id' => 'info_body_font', 'type' => 'info', 'customizer' => false, 'desc' => __('Body Font Options', 'virtue')), array('id' => 'font_p', 'type' => 'typography', 'title' => __('Body Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'customizer' => false, 'line-height' => true, 'text-align' => false, 'all_styles' => true, 'color' => true, 'preview' => true, 'output' => array('body'), 'subtitle' => __("Choose Size and Style for paragraphs", 'virtue'), 'default' => array('font-family' => 'Verdana, Geneva, sans-serif', 'color' => "", 'font-style' => '400', 'font-size' => '14px', 'line-height' => '20px')))));
Redux::setSection($opt_name, array('icon' => 'icon-reorder', 'icon_class' => 'icon-large', 'id' => 'menu_settings', 'title' => __('Menu Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Primary Menu Options', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'info_menu_settings_notice', 'type' => 'info', 'customizer' => true, 'desc' => __('*NOTE: Make sure Virtue/Pinnacle Toolkit plugin is activated* <br>Go to Apperance > Theme Options > Menu settings for all menu settings', 'virtue')), array('id' => 'font_primary_menu', 'type' => 'typography', 'customizer' => false, 'title' => __('Primary Menu Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('#nav-main ul.sf-menu a'), 'subtitle' => __("Choose Size and Style for primary menu", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '12px', 'line-height' => '18px')), array('id' => 'info_menu_secondary_font', 'type' => 'info', 'customizer' => false, 'desc' => __('Secondary Menu Options', 'virtue')), array('id' => 'font_secondary_menu', 'type' => 'typography', 'customizer' => false, 'title' => __('Secondary Menu Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('#nav-second ul.sf-menu a'), 'subtitle' => __("Choose Size and Style for secondary menu", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '18px', 'line-height' => '22px')), array('id' => 'info_menu_mobile_font', 'type' => 'info', 'customizer' => false, 'desc' => __('Mobile Menu Options', 'virtue')), array('id' => 'mobile_submenu_collapse', 'type' => 'switch', 'customizer' => false, 'title' => __('Submenu items collapse until opened', 'virtue'), "default" => 0), array('id' => 'font_mobile_menu', 'customizer' => false, 'type' => 'typography', 'title' => __('Mobile Menu Font', 'virtue'), 'font-family' => true, 'google' => true, 'font-backup' => false, 'font-style' => true, 'subsets' => true, 'font-size' => true, 'line-height' => true, 'text-align' => false, 'color' => true, 'preview' => true, 'output' => array('.kad-nav-inner .kad-mnav, .kad-mobile-nav .kad-nav-inner li a', '.nav-trigger-case'), 'subtitle' => __("Choose Size and Style for Mobile Menu", 'virtue'), 'default' => array('font-family' => 'Lato', 'color' => "", 'font-style' => '400', 'font-size' => '16px', 'line-height' => '20px')))));
Redux::setSection($opt_name, array('icon' => 'icon-list-alt', 'icon_class' => 'icon-large', 'id' => 'pagepost_settings', 'title' => __('Page/Post Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Page and Post Comment Settings', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'close_comments', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Comments Closed Text?', 'virtue'), 'subtitle' => __('Choose to show or hide comments closed alert below posts.', 'virtue'), "default" => 0), array('id' => 'page_comments', 'type' => 'switch', 'customizer' => true, 'title' => __('Allow Comments on Pages', 'virtue'), 'subtitle' => __('Turn on to allow comments on pages', 'virtue'), "default" => 0), array('id' => 'portfolio_comments', 'type' => 'switch', 'customizer' => true, 'title' => __('Allow Comments on Portfolio Posts', 'virtue'), 'subtitle' => __('Turn on to allow comments on Portfolio posts', 'virtue'), "default" => 0), array('id' => 'info_portfolio_post_defaults', 'type' => 'info', 'customizer' => true, 'desc' => __('Portfolio Post', 'virtue')), array('id' => 'portfolio_link', 'type' => 'select', 'data' => 'pages', 'customizer' => true, 'width' => 'width:60%', 'title' => __('All Projects Portfolio Page', 'virtue'), 'subtitle' => __('This sets the link in every single portfolio page. *note: You still have to set the page template to portfolio.', 'virtue')), array('id' => 'info_portfolio_typepage_defaults', 'type' => 'info', 'customizer' => true, 'desc' => __('Portfolio Type Page Defaults', 'virtue')), array('id' => 'portfolio_type_columns', 'type' => 'select', 'customizer' => true, 'title' => __('Portfolio Type - Post Columns', 'virtue'), 'subtitle' => __("Choose how many columns for portfolio type pages", 'virtue'), 'options' => array('3' => 'Three Columns', '4' => 'Four Column', '5' => 'Five Column'), 'default' => '3', 'width' => 'width:60%'), array('id' => 'portfolio_type_under_title', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Types under Title', 'virtue'), 'subtitle' => __('Choose to show or hide portfolio type under title.', 'virtue'), "default" => 1), array('id' => 'info_blog_defaults', 'type' => 'info', 'customizer' => true, 'desc' => __('Blog Post Defaults', 'virtue')), array('id' => 'post_summery_default', 'type' => 'select', 'customizer' => true, 'title' => __('Blog Post Summary Default', 'virtue'), 'options' => array('text' => 'Text', 'img_portrait' => 'Portrait Image', 'img_landscape' => 'Landscape Image', 'slider_portrait' => 'Portrait Image Slider', 'slider_landscape' => 'Landscape Image Slider'), 'width' => 'width:60%', 'default' => 'img_portrait'), array('id' => 'post_summery_default_image', 'type' => 'media', 'customizer' => true, 'url' => true, 'title' => __('Default post summary feature Image', 'virtue'), 'subtitle' => __('Replace theme default feature image for posts without a featured image', 'virtue')), array('id' => 'post_head_default', 'type' => 'select', 'customizer' => true, 'title' => __('Blog Post Head Content Default', 'virtue'), 'options' => array('none' => __('None', 'virtue'), 'flex' => __('Image Slider', 'virtue'), 'image' => __('Image', 'virtue'), 'video' => __('Video', 'virtue')), 'width' => 'width:60%', 'default' => 'none'), array('id' => 'show_postlinks', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Previous and Next posts links?', 'virtue'), 'subtitle' => __('Choose to show or hide previous and next post links in the footer of a single post.', 'virtue'), "default" => 0), array('id' => 'hide_author', 'type' => 'switch', 'customizer' => true, 'title' => __('Show Author Icon with posts?', 'virtue'), 'subtitle' => __('Choose to show or hide author icon under post title.', 'virtue'), "default" => 1), array('id' => 'post_author_default', 'type' => 'select', 'customizer' => true, 'title' => __('Blog Post Author Box Default', 'virtue'), 'options' => array('no' => __('No, Do not Show', 'virtue'), 'yes' => __('Yes, Show', 'virtue')), 'width' => 'width:60%', 'default' => 'no'), array('id' => 'post_carousel_default', 'type' => 'select', 'customizer' => true, 'title' => __('Blog Post Bottom Carousel Default', 'virtue'), 'options' => array('no' => __('No, Do not Show', 'virtue'), 'recent' => __('Yes - Display Recent Posts', 'virtue'), 'similar' => __('Yes - Display Similar Posts', 'virtue')), 'width' => 'width:60%', 'default' => 'no'), array('id' => 'info_blog_category', 'type' => 'info', 'customizer' => true, 'desc' => __('Blog Category/Archive Defaults', 'virtue')), array('id' => 'blog_archive_full', 'type' => 'select', 'customizer' => true, 'title' => __('Blog Archive', 'virtue'), 'subtitle' => __("Choose to show full post or post excerpt.", 'virtue'), 'options' => array('summery' => 'Post Excerpt', 'full' => 'Full'), 'default' => 'summery', 'width' => 'width:60%'))));
Redux::setSection($opt_name, array('icon' => 'icon-wrench', 'icon_class' => 'icon-large', 'id' => 'misc_settings', 'title' => __('Misc Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Misc Settings', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'hide_image_border', 'type' => 'switch', 'customizer' => true, 'title' => __('Hide Image Border', 'virtue'), 'subtitle' => __('Choose to show or hide image border for images added in pages or posts', 'virtue'), "default" => 0), array('id' => 'virtue_custom_favicon', 'type' => 'media', 'customizer' => true, 'preview' => true, 'title' => __('Custom Favicon, *Note depreciated. Use WordPress site icon in customizer.', 'virtue'), 'subtitle' => __('Upload a 16px x 16px png/gif/ico image that will represent your website favicon.', 'virtue')), array('id' => 'contact_email', 'type' => 'text', 'customizer' => true, 'title' => __('Contact Form Email', 'virtue'), 'subtitle' => __('Sets the email for the contact page email form.', 'virtue'), 'default' => '*****@*****.**'), array('id' => 'footer_text', 'customizer' => true, 'type' => 'textarea', 'title' => __('Footer Copyright Text', 'virtue'), 'subtitle' => __('Write your own copyright text here. You can use the following shortcodes in your footer text: [copyright] [site-name] [the-year]', 'virtue'), 'default' => '[copyright] [the-year] [site-name] [theme-credit]'), array('id' => 'info_sidebars', 'type' => 'info', 'customizer' => true, 'desc' => __('Create Sidebars', 'virtue')), array('id' => 'cust_sidebars', 'type' => 'multi_text', 'customizer' => true, 'title' => __('Create Custom Sidebars', 'virtue'), 'subtitle' => __('Type new sidebar name into textbox', 'virtue'), 'default' => __('Extra Sidebar', 'virtue')), array('id' => 'info_wpgallerys', 'type' => 'info', 'customizer' => true, 'desc' => __('Wordpress Galleries', 'virtue')), array('id' => 'virtue_gallery', 'type' => 'switch', 'customizer' => true, 'title' => __('Enable Virtue Galleries to override Wordpress', 'virtue'), 'subtitle' => __('Disable this if using a plugin to customize galleries, for example jetpack tiled gallery.', 'virtue'), "default" => 1), array('id' => 'info_lightbox', 'type' => 'info', 'customizer' => true, 'desc' => __('Theme Lightbox', 'virtue')), array('id' => 'kadence_lightbox', 'type' => 'switch', 'on' => __('Lightbox Off', 'virtue'), 'off' => __('Lightbox On', 'virtue'), 'customizer' => true, 'title' => __('Turn Off Theme Lightbox?', 'virtue'), "default" => 0))));
Redux::setSection($opt_name, array('icon' => 'icon-code', 'icon_class' => 'icon-large', 'id' => 'advanced_settings', 'title' => __('Advanced Settings', 'virtue'), 'desc' => "<div class='redux-info-field'><h3>" . __('Custom CSS Box', 'virtue') . "</h3></div>", 'fields' => array(array('id' => 'custom_css', 'type' => 'textarea', 'customizer' => true, 'title' => __('Custom CSS', 'virtue'), 'subtitle' => __('Quickly add some CSS to your theme by adding it to this block.', 'virtue')))));
Redux::setSection($opt_name, array('id' => 'inportexport_settings', 'title' => __('Import / Export', 'virtue'), 'desc' => __('Import and Export your Theme Options from text or URL.', 'virtue'), 'icon' => 'icon-large icon-hdd', 'fields' => array(array('id' => 'opt-import-export', 'type' => 'import_export', 'title' => '', 'customizer' => false, 'subtitle' => '', 'full_width' => true))));
/*
 * <--- END SECTIONS
 */
function virtue_override_panel()
{
    wp_dequeue_style('redux-admin-css');
    wp_register_style('virtue-redux-custom-css', get_template_directory_uri() . '/themeoptions/options/css/style.css', false, 258);
    wp_enqueue_style('virtue-redux-custom-css');
    wp_dequeue_style('select2-css');
    wp_dequeue_script('select2-js');
    wp_dequeue_style('redux-elusive-icon');
    wp_dequeue_style('redux-elusive-icon-ie7');
}
// This example assumes your opt_name is set to redux_demo, replace with your opt_name value
add_action('redux-enqueue-virtue', 'virtue_override_panel');
Пример #17
0
// Add content after the form.
$args['footer_text'] = __('', 'redux-framework-demo');
Redux::setArgs($opt_name, $args);
/*
 * ---> END ARGUMENTS
 */
/*
 * ---> START HELP TABS
 */
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')));
Redux::setHelpTab($opt_name, $tabs);
// Set the help sidebar
$content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'redux-framework-demo');
Redux::setHelpSidebar($opt_name, $content);
// -> START Typography
Redux::setSection($opt_name, array('title' => __('General', 'redux-framework-demo'), 'id' => 'typography', 'icon' => 'el el-wrench', 'fields' => array(array('id' => 'text-example', 'type' => 'text', 'title' => __('Text Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Field Description', 'redux-framework-demo'), 'default' => 'Default Text'))));
/*
 * <--- END SECTIONS
 */
/**
 * This is a test function that will let you see when the compiler hook occurs.
 * It only runs if a field    set with compiler=>true is changed.
 * */
function compiler_action($options, $css, $changed_values)
{
    echo '<h1>The compiler hook has run!</h1>';
    echo "<pre>";
    print_r($changed_values);
    // Values that have changed since the last save
    echo "</pre>";
    //print_r($options); //Option values
Пример #18
0
<?php

/*
 * Header Styles Options
 */
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Header', 'inspiry'), 'id' => 'header-styles', 'desc' => __('This sub section contains header styles options.', 'inspiry'), 'subsection' => true, 'fields' => array(array('id' => 'inspiry_menu_button_bg', 'type' => 'link_color', 'title' => __('Menu Button Background Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#50b848', 'hover' => '#000000'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_menu_button_txt', 'type' => 'link_color', 'title' => __('Menu Button Text Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#ffffff', 'hover' => '#ffffff'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_menu_button_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .site-main-nav'), 'title' => __('Main Menu Background Color', 'inspiry'), 'desc' => 'default: #50b848', 'default' => '#50b848', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_text', 'type' => 'color', 'output' => array('.header-variation-one .main-menu > li > a'), 'title' => __('Main Menu Text Color', 'inspiry'), 'desc' => 'default: #20671b', 'default' => '#20671b', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_text_hover', 'type' => 'color', 'output' => array('.header-variation-one .main-menu li:hover > a'), 'title' => __('Main Menu Text Color on Hover', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_bg_hover', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .main-menu > li:hover > a', '.header-variation-one .sub-menu'), 'title' => __('Main Menu Hover and Dropdown Background Color', 'inspiry'), 'desc' => 'default: #46a13f', 'default' => '#46a13f', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_dropdown_text', 'type' => 'color', 'output' => array('.header-variation-one .sub-menu a'), 'title' => __('Main Menu Dropdown Text Color', 'inspiry'), 'desc' => 'default: #92df8c', 'default' => '#92df8c', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_dropdown_text_hover', 'type' => 'color', 'output' => array('.header-variation-one .main-menu .sub-menu li:hover > a'), 'title' => __('Main Menu Dropdown Text Color on Hover', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_dropdown_sep', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .sub-menu a:after'), 'title' => __('Main Menu Dropdown Separator Color', 'inspiry'), 'desc' => 'default: #48B040', 'default' => '#48B040', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_close', 'type' => 'link_color', 'title' => __('Main Menu Close Button Background Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#33762e', 'hover' => '#000000'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_close_icon', 'type' => 'link_color', 'title' => __('Main Menu Close Button Icon Color', 'inspiry'), 'active' => false, 'output' => array('.button-menu-close'), 'default' => array('regular' => '#ffffff', 'hover' => '#ffffff'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_main_menu_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_logo_background', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .site-logo'), 'title' => __('Logo Background Color', 'inspiry'), 'desc' => 'default: #000000', 'default' => '#000000', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_logo_text_color', 'type' => 'link_color', 'title' => __('Logo Text Color', 'inspiry'), 'active' => true, 'output' => array('.header-variation-one .site-logo a'), 'default' => array('regular' => '#ffffff', 'hover' => '#0dbae8', 'active' => '#0dbae8'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_tagline_text_color', 'type' => 'color', 'output' => array('.header-variation-one .site-logo'), 'title' => __('Header Tagline Text Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_logo_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_background', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .header-top'), 'title' => __('Header Top Bar Background Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_user_nav_link', 'type' => 'link_color', 'title' => __('User Navigation Link Color', 'inspiry'), 'active' => true, 'output' => array('.user-nav a'), 'default' => array('regular' => '#7c848b', 'hover' => '#4a525d', 'active' => '#4a525d'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_simple_header_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_phone_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-one .contact-number'), 'title' => __('Phone Background Color', 'inspiry'), 'desc' => 'default: #0dbae8', 'default' => '#0dbae8', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_phone_text', 'type' => 'color', 'output' => array('.header-variation-one .contact-number a', '.header-variation-one .contact-number span'), 'title' => __('Phone Text Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_phone_icon', 'type' => 'color', 'title' => __('Phone Icon Color', 'inspiry'), 'desc' => 'default: #0080BC', 'default' => '#0080BC', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_phone_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_fields_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-advance-search input[type="text"]', '.header-advance-search .select2-container--default .select2-selection--single'), 'title' => __('Search Fields Background Color', 'inspiry'), 'desc' => 'default: #dfe7ee', 'default' => '#dfe7ee', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_fields_hover_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.advance-search input[type="text"]:hover', '.advance-search input[type="text"]:focus', '.advance-search .select2-container--default .select2-selection--single:hover', '.advance-search .select2-container--default.select2-container--open.select2-container--below .select2-selection--single', '.advance-search .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple', '.select2-container--default .select2-results__option[aria-selected=true]', '.select2-results li', '.select2-dropdown'), 'title' => __('Search Fields Background Color on Hover', 'inspiry'), 'desc' => 'default: #f9f9fa', 'default' => '#f9f9fa', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_fields_dropdown_hover_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.select2-container--default .select2-results__option--highlighted[aria-selected]'), 'title' => __('Search Fields Dropdown Background Color on Hover', 'inspiry'), 'desc' => 'default: #f9f9fa', 'default' => '#f9f9fa', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_toggle_btn', 'type' => 'link_color', 'title' => __('Search Fields Expand & Collapse Toggle Button Background Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#f4903f', 'hover' => '#0dbae8'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_toggle_btn_icon', 'type' => 'link_color', 'title' => __('Search Fields Expand & Collapse Toggle Button Icon Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#C15302', 'hover' => '#ffffff'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_btn_bg', 'type' => 'link_color', 'title' => __('Search Button Background Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#191c20', 'hover' => '#0dbae8'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_header_search_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_2nd_header_background', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-two'), 'title' => __('Header Background Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_logo_text_color', 'type' => 'link_color', 'title' => __('Text Logo Color', 'inspiry'), 'active' => true, 'output' => array('.header-variation-two .site-logo a'), 'default' => array('regular' => '#191c20', 'hover' => '#0dbae8', 'active' => '#0dbae8'), 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_tag_line_color', 'type' => 'color', 'output' => array('.header-variation-two .tag-line'), 'title' => __('Tagline Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_logo_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_border_color', 'type' => 'color', 'mode' => 'border-color', 'output' => array('.header-variation-two .header-top'), 'title' => __('Border Color', 'inspiry'), 'desc' => 'default: #e2e2e2', 'default' => '#e2e2e2', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_social_icons_color', 'type' => 'color', 'output' => array('.header-variation-two .header-social-nav > a'), 'title' => __('Social Icons Color', 'inspiry'), 'desc' => 'default: #b1b1b1', 'default' => '#b1b1b1', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_submit_btn_bg', 'type' => 'link_color', 'title' => __('Submit Button Background Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#ff8000', 'hover' => '#0dbae8'), 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_submit_btn_text', 'type' => 'link_color', 'title' => __('Submit Button Text Color', 'inspiry'), 'active' => false, 'default' => array('regular' => '#ffffff', 'hover' => '#ffffff'), 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_user_nav', 'type' => 'link_color', 'title' => __('User Navigation Colors', 'inspiry'), 'output' => array('.user-nav a'), 'default' => array('regular' => '#7c848b', 'hover' => '#4a525d', 'active' => '#4a525d'), 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_phone_text', 'type' => 'color', 'output' => array('.header-variation-two .contact-number a', '.header-variation-two .contact-number span'), 'title' => __('Phone Text Color', 'inspiry'), 'desc' => 'default: #0080bc', 'default' => '#0080bc', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_phone_icon', 'type' => 'color', 'title' => __('Phone Icon Color', 'inspiry'), 'desc' => 'default: #0080BC', 'default' => '#0080BC', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_top_divider', 'type' => 'divide', 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_menu_text', 'type' => 'color', 'output' => array('.header-variation-two .main-menu > li > a'), 'title' => __('Main Menu Text Color', 'inspiry'), 'desc' => 'default: #191c20', 'default' => '#191c20', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_menu_text_hover', 'type' => 'color', 'output' => array('.header-variation-two .main-menu li:hover > a'), 'title' => __('Main Menu Text Color on Hover', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_menu_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-two .main-menu li:hover > a', '.header-variation-two .sub-menu'), 'title' => __('Main Menu Hover and Dropdown Background Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_dropdown_text', 'type' => 'color', 'output' => array('.header-variation-two .sub-menu a'), 'title' => __('Main Menu Dropdown Text Color', 'inspiry'), 'desc' => 'default: #9ba4b3', 'default' => '#9ba4b3', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_dropdown_text_hover', 'type' => 'color', 'output' => array('.header-variation-two .main-menu .sub-menu li:hover > a'), 'title' => __('Main Menu Dropdown Text Color on Hover', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)), array('id' => 'inspiry_2nd_header_dropdown_sep', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.header-variation-two .sub-menu a:after'), 'title' => __('Main Menu Dropdown Separator Color', 'inspiry'), 'desc' => 'default: #5a626e', 'default' => '#5a626e', 'validate' => 'color', 'transparent' => false, 'required' => array('inspiry_header_variation', '=', 2)))));
Пример #19
0
<?php

// All extensions placed within the extensions directory will be auto-loaded for your Redux instance.
Redux::setExtensions('redux_builder_panvagenas', dirname(__FILE__) . '/extensions/');
// Any custom extension configs should be placed within the configs folder.
if (file_exists(dirname(__FILE__) . '/configs/')) {
    $files = glob(dirname(__FILE__) . '/configs/*.php');
    if (!empty($files)) {
        foreach ($files as $file) {
            include $file;
        }
    }
}
*/
Redux::setSection($opt_name, array('title' => __('Sidebars', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-website', 'submenu' => true, 'fields' => array(array('id' => 'blog_layout', 'type' => 'button_set', 'options' => array('grid' => __('Grid view', 'stm_domain'), 'list' => __('List view', 'stm_domain')), 'default' => 'grid', 'title' => __('Blog Layout', 'stm_domain')), array('id' => 'blog_sidebar', 'type' => 'select', 'data' => 'posts', 'args' => array('post_type' => array('sidebar'), 'posts_per_page' => -1), 'title' => __('Blog Sidebar', 'stm_domain'), 'default' => '655'), array('id' => 'blog_sidebar_position', 'type' => 'button_set', 'title' => __('Blog Sidebar - Position', 'stm_domain'), 'options' => array('left' => __('Left', 'stm_domain'), 'none' => __('No Sidebar', 'stm_domain'), 'right' => __('Right', 'stm_domain')), 'default' => 'right'))));
Redux::setSection($opt_name, array('title' => __('Teachers', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-user', 'subsection' => true, 'fields' => array(array('id' => 'teachers_sidebar', 'type' => 'select', 'data' => 'posts', 'args' => array('post_type' => array('sidebar'), 'posts_per_page' => -1), 'title' => __('Teachers Sidebar', 'stm_domain')), array('id' => 'teachers_sidebar_position', 'type' => 'button_set', 'title' => __('Teachers Sidebar - Position', 'stm_domain'), 'options' => array('left' => __('Left', 'stm_domain'), 'none' => __('No Sidebar', 'stm_domain'), 'right' => __('Right', 'stm_domain')), 'default' => 'none'))));
Redux::setSection($opt_name, array('title' => __('Events', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-calendar', 'subsection' => true, 'fields' => array(array('id' => 'events_sidebar', 'type' => 'select', 'data' => 'posts', 'args' => array('post_type' => array('sidebar'), 'posts_per_page' => -1), 'title' => __('Events Sidebar', 'stm_domain')), array('id' => 'events_sidebar_position', 'type' => 'button_set', 'title' => __('Events Sidebar - Position', 'stm_domain'), 'options' => array('left' => __('Left', 'stm_domain'), 'none' => __('No Sidebar', 'stm_domain'), 'right' => __('Right', 'stm_domain')), 'default' => 'none'))));
Redux::setSection($opt_name, array('title' => __('Gallery', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-picture', 'subsection' => true, 'fields' => array(array('id' => 'gallery_sidebar', 'type' => 'select', 'data' => 'posts', 'args' => array('post_type' => array('sidebar'), 'posts_per_page' => -1), 'title' => __('Gallery Sidebar', 'stm_domain')), array('id' => 'gallery_sidebar_position', 'type' => 'button_set', 'title' => __('Gallery Sidebar - Position', 'stm_domain'), 'options' => array('left' => __('Left', 'stm_domain'), 'none' => __('No Sidebar', 'stm_domain'), 'right' => __('Right', 'stm_domain')), 'default' => 'none'))));
Redux::setSection($opt_name, array('title' => __('Shop', 'stm_domain'), 'desc' => '', 'icon' => 'el el-shopping-cart', 'subsection' => true, 'fields' => array(array('id' => 'shop_sidebar', 'type' => 'select', 'data' => 'posts', 'args' => array('post_type' => array('sidebar'), 'posts_per_page' => -1), 'title' => __('Sidebar', 'stm_domain'), 'default' => '740'), array('id' => 'shop_sidebar_position', 'type' => 'button_set', 'title' => __('Sidebar - Position', 'stm_domain'), 'options' => array('left' => __('Left', 'stm_domain'), 'right' => __('Right', 'stm_domain')), 'default' => 'right'))));
Redux::setSection($opt_name, array('title' => __('Events', 'stm_domain'), 'desc' => '', 'icon' => 'el el-calendar', 'submenu' => true, 'fields' => array(array('id' => 'paypal_email', 'type' => 'text', 'title' => __('Paypal Email', 'stm_domain')), array('id' => 'currency', 'type' => 'text', 'title' => __('Currency', 'stm_domain'), 'default' => __('USD', 'stm_domain'), 'description' => __('Ex. USD', 'stm_domain')), array('id' => 'paypal_mode', 'type' => 'select', 'title' => __('Paypal Mode', 'stm_domain'), 'options' => array('sand' => 'SandBox', 'live' => 'Live'), 'default' => 'sand'), array('id' => 'admin_subject', 'type' => 'text', 'title' => __('Admin Subject', 'stm_domain'), 'default' => __('New Participant for [event]', 'stm_domain')), array('id' => 'admin_message', 'type' => 'textarea', 'title' => __('Admin Message', 'stm_domain'), 'default' => __('A new member wants to join your [event]<br>Participant Info:<br>Name: [name]<br>Email: [email]<br>Phone: [phone]<br>Message: [message]', 'stm_domain'), 'description' => __('Shortcodes Available - [name], [email], [phone], [message].', 'stm_domain')), array('id' => 'user_subject', 'type' => 'text', 'title' => __('User Subject', 'stm_domain'), 'default' => __('Confirmation of your pariticipation in the [event]', 'stm_domain')), array('id' => 'user_message', 'type' => 'textarea', 'title' => __('User Message', 'stm_domain'), 'default' => __('Dear [name].<br/> This email is sent to you to confirm your participation in the event.<br/>We will contact you soon with further details.<br>With any question, feel free to phone +999999999999 or write to <a href="mailto:timur@stylemix.net">timur@stylemix.net</a>.<br>Regards,<br>MasterStudy Team.'), 'description' => __('Shortcodes Available - [name], [email], [phone], [message].', 'stm_domain')))));
Redux::setSection($opt_name, array('title' => __('Typography', 'stm_domain'), 'icon' => 'el-icon-font', 'submenu' => true, 'fields' => array(array('id' => 'font_body', 'type' => 'typography', 'title' => __('Body', 'stm_domain'), 'compiler' => true, 'google' => true, 'font-backup' => false, 'font-weight' => false, 'all_styles' => true, 'font-style' => false, 'subsets' => true, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => true, 'preview' => true, 'output' => array('body, .normal_font'), 'units' => 'px', 'subtitle' => __('Select custom font for your main body text.', 'stm_domain'), 'default' => array('color' => "#555555", 'font-family' => 'Open Sans', 'font-size' => '14px')), array('id' => 'menu_heading', 'type' => 'typography', 'title' => __('Menu', 'stm_domain'), 'compiler' => true, 'google' => true, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-style' => false, 'subsets' => true, 'font-size' => false, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => true, 'preview' => true, 'output' => array('.header-menu'), 'units' => 'px', 'subtitle' => __('Select custom font for menu', 'stm_domain'), 'default' => array('color' => "#fff", 'font-family' => 'Montserrat', 'font-weight' => '900')), array('id' => 'font_heading', 'type' => 'typography', 'title' => __('Heading', 'stm_domain'), 'compiler' => true, 'google' => true, 'font-backup' => false, 'all_styles' => true, 'font-weight' => false, 'font-style' => false, 'subsets' => true, 'font-size' => false, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => true, 'preview' => true, 'output' => array('h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.heading_font,.widget_categories ul li a,.sidebar-area .widget ul li a,.select2-selection__rendered,blockquote,.select2-chosen,.vc_tta-tabs.vc_tta-tabs-position-top .vc_tta-tabs-container .vc_tta-tabs-list li.vc_tta-tab a,.vc_tta-tabs.vc_tta-tabs-position-left .vc_tta-tabs-container .vc_tta-tabs-list li.vc_tta-tab a'), 'units' => 'px', 'subtitle' => __('Select custom font for headings', 'stm_domain'), 'default' => array('color' => "#333333", 'font-family' => 'Montserrat')), array('id' => 'h1_params', 'type' => 'typography', 'title' => __('H1', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h1,.h1'), 'units' => 'px', 'default' => array('font-size' => '50px', 'font-weight' => '700')), array('id' => 'h2_params', 'type' => 'typography', 'title' => __('H2', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h2,.h2'), 'units' => 'px', 'default' => array('font-size' => '32px', 'font-weight' => '700')), array('id' => 'h3_params', 'type' => 'typography', 'title' => __('H3', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h3,.h3'), 'units' => 'px', 'default' => array('font-size' => '18px', 'font-weight' => '700')), array('id' => 'h4_params', 'type' => 'typography', 'title' => __('H4', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h4,.h4,blockquote'), 'units' => 'px', 'default' => array('font-size' => '16px', 'font-weight' => '400')), array('id' => 'h5_params', 'type' => 'typography', 'title' => __('H5', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h5,.h5,.select2-selection__rendered'), 'units' => 'px', 'default' => array('font-size' => '14px', 'font-weight' => '700')), array('id' => 'h6_params', 'type' => 'typography', 'title' => __('H6', 'stm_domain'), 'compiler' => true, 'google' => false, 'font-backup' => false, 'all_styles' => true, 'font-weight' => true, 'font-family' => false, 'text-align' => false, 'font-style' => false, 'subsets' => false, 'font-size' => true, 'line-height' => false, 'word-spacing' => false, 'letter-spacing' => false, 'color' => false, 'preview' => true, 'output' => array('h6,.h6,.widget_pages ul li a, .widget_nav_menu ul li a, .footer_menu li a,.widget_categories ul li a,.sidebar-area .widget ul li a'), 'units' => 'px', 'default' => array('font-size' => '12px', 'font-weight' => '400')))));
Redux::setSection($opt_name, array('title' => __('Footer', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-photo', 'submenu' => true, 'fields' => array(array('id' => 'footer_top', 'type' => 'switch', 'title' => __('Enable footer widgets area.', 'stm_domain'), 'default' => true), array('id' => 'footer_top_color', 'type' => 'color', 'title' => __('Footer Background Color', 'stm_domain'), 'output' => array('background-color' => '#footer_top'), 'default' => '#414b4f'), array('id' => 'footer_first_columns', 'type' => 'button_set', 'title' => __('Footer Columns', 'stm_domain'), 'desc' => __('Select the number of columns to display in the footer.', 'stm_domain'), 'type' => 'button_set', 'default' => '4', 'required' => array('footer_top', '=', true), 'options' => array('1' => __('1 Column', 'stm_domain'), '2' => __('2 Columns', 'stm_domain'), '3' => __('3 Columns', 'stm_domain'), '4' => __('4 Columns', 'stm_domain'))))));
Redux::setSection($opt_name, array('title' => __('Footer Bottom', 'stm_domain'), 'desc' => '', 'icon' => 'el-icon-photo', 'subsection' => true, 'fields' => array(array('id' => 'footer_bottom', 'type' => 'switch', 'title' => __('Enable footer bottom widgets area.', 'stm_domain'), 'default' => false), array('id' => 'footer_bottom_color', 'type' => 'color', 'title' => __('Footer Bottom Background Color', 'stm_domain'), 'output' => array('background-color' => '#footer_bottom'), 'default' => '#414b4f'), array('id' => 'footer_bottom_columns', 'type' => 'button_set', 'title' => __('Footer Bottom Columns', 'stm_domain'), 'desc' => __('Select the number of columns to display in the footer bottom.', 'stm_domain'), 'type' => 'button_set', 'default' => '4', 'required' => array('footer_bottom', '=', true), 'options' => array('1' => __('1 Column', 'stm_domain'), '2' => __('2 Columns', 'stm_domain'), '3' => __('3 Columns', 'stm_domain'), '4' => __('4 Columns', 'stm_domain'))))));
Redux::setSection($opt_name, array('title' => __('Copyright', 'stm_domain'), 'desc' => __('Copyright block at the bottom of footer', 'stm_domain'), 'id' => 'footer_copyright', 'subsection' => true, 'fields' => array(array('id' => 'footer_copyright', 'type' => 'switch', 'title' => __('Enable footer copyright section.', 'stm_domain'), 'default' => true), array('id' => 'footer_logo_enabled', 'type' => 'switch', 'required' => array(array('footer_copyright', '=', true)), 'title' => __('Enable footer logo.', 'stm_domain'), 'default' => true), array('id' => 'footer_logo', 'url' => false, 'type' => 'media', 'title' => __('Footer Logo', 'stm_domain'), 'required' => array(array('footer_copyright', '=', true), array('footer_logo_enabled', '=', true)), 'default' => array('url' => get_template_directory_uri() . '/assets/img/tmp/footer-logo2x.png'), 'subtitle' => __('Upload your logo file here. Size - 50*56 (Retina 2x). Note, bigger images will be cropped to default size', 'stm_domain')), array('id' => 'footer_copyright_color', 'type' => 'color', 'title' => __('Footer Bottom Background Color', 'stm_domain'), 'required' => array(array('footer_copyright', '=', true)), 'output' => array('background-color' => '#footer_copyright'), 'default' => '#414b4f'), array('id' => 'footer_copyright_text', 'type' => 'textarea', 'title' => __('Footer Copyright', 'stm_domain'), 'subtitle' => __('Enter the copyright text.', 'stm_domain'), 'required' => array(array('footer_copyright', '=', true)), 'default' => __('Copyright &copy; 2015 MasterStudy Theme by <a target="_blank" href="http://www.stylemixthemes.com/">Stylemix Themes</a>', 'stm_domain')), array('id' => 'copyright_use_social', 'type' => 'sortable', 'mode' => 'checkbox', 'title' => __('Select Social Media Icons to display in copyright section', 'stm_domain'), 'subtitle' => __('The urls for your social media icons will be taken from Social Media settings tab.', 'stm_domain'), 'options' => array('facebook' => 'Facebook', 'twitter' => 'Twitter', 'instagram' => 'Instagram', 'behance' => 'Behance', 'dribbble' => 'Dribbble', 'flickr' => 'Flickr', 'git' => 'Git', 'linkedin' => 'Linkedin', 'pinterest' => 'Pinterest', 'yahoo' => 'Yahoo', 'delicious' => 'Delicious', 'dropbox' => 'Dropbox', 'reddit' => 'Reddit', 'soundcloud' => 'Soundcloud', 'google' => 'Google', 'google-plus' => 'Google +', 'skype' => 'Skype', 'youtube' => 'Youtube', 'youtube-play' => 'Youtube Play', 'tumblr' => 'Tumblr', 'whatsapp' => 'Whatsapp'), 'default' => array('facebook' => '0', 'twitter' => '0', 'instagram' => '0', 'behance' => '0', 'dribbble' => '0', 'flickr' => '0', 'git' => '0', 'linkedin' => '0', 'pinterest' => '0', 'yahoo' => '0', 'delicious' => '0', 'dropbox' => '0', 'reddit' => '0', 'soundcloud' => '0', 'google' => '0', 'google-plus' => '0', 'skype' => '0', 'youtube' => '0', 'youtube-play' => '0', 'tumblr' => '0', 'whatsapp' => '0')))));
Redux::setSection($opt_name, array('title' => __('Social Media', 'stm_domain'), 'icon' => 'el-icon-address-book', 'desc' => __('Enter social media urls here and then you can enable them for footer or header. Please add full URLs including "http://".', 'stm_domain'), 'submenu' => true, 'fields' => array(array('id' => 'facebook', 'type' => 'text', 'title' => __('Facebook', 'stm_domain'), 'subtitle' => '', 'default' => 'https://www.facebook.com/', 'desc' => __('Enter your Facebook URL.', 'stm_domain')), array('id' => 'twitter', 'type' => 'text', 'title' => __('Twitter', 'stm_domain'), 'subtitle' => '', 'default' => 'https://www.twitter.com/', 'desc' => __('Enter your Twitter URL.', 'stm_domain')), array('id' => 'instagram', 'type' => 'text', 'title' => __('Instagram', 'stm_domain'), 'subtitle' => '', 'default' => 'https://www.instagram.com/', 'desc' => __('Enter your Instagram URL.', 'stm_domain')), array('id' => 'behance', 'type' => 'text', 'title' => __('Behance', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Behance URL.', 'stm_domain')), array('id' => 'dribbble', 'type' => 'text', 'title' => __('Dribbble', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Dribbble URL.', 'stm_domain')), array('id' => 'flickr', 'type' => 'text', 'title' => __('Flickr', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Flickr URL.', 'stm_domain')), array('id' => 'git', 'type' => 'text', 'title' => __('Git', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Git URL.', 'stm_domain')), array('id' => 'linkedin', 'type' => 'text', 'title' => __('Linkedin', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Linkedin URL.', 'stm_domain')), array('id' => 'pinterest', 'type' => 'text', 'title' => __('Pinterest', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Pinterest URL.', 'stm_domain')), array('id' => 'yahoo', 'type' => 'text', 'title' => __('Yahoo', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Yahoo URL.', 'stm_domain')), array('id' => 'delicious', 'type' => 'text', 'title' => __('Delicious', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Delicious URL.', 'stm_domain')), array('id' => 'dropbox', 'type' => 'text', 'title' => __('Dropbox', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Dropbox URL.', 'stm_domain')), array('id' => 'reddit', 'type' => 'text', 'title' => __('Reddit', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Reddit URL.', 'stm_domain')), array('id' => 'soundcloud', 'type' => 'text', 'title' => __('Soundcloud', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Soundcloud URL.', 'stm_domain')), array('id' => 'google', 'type' => 'text', 'title' => __('Google', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Google URL.', 'stm_domain')), array('id' => 'google-plus', 'type' => 'text', 'title' => __('Google +', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Google + URL.', 'stm_domain')), array('id' => 'skype', 'type' => 'text', 'title' => __('Skype', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Skype URL.', 'stm_domain')), array('id' => 'youtube', 'type' => 'text', 'title' => __('Youtube', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Youtube URL.', 'stm_domain')), array('id' => 'youtube-play', 'type' => 'text', 'title' => __('Youtube Play', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Youtube Play(only icon differ) URL.', 'stm_domain')), array('id' => 'tumblr', 'type' => 'text', 'title' => __('Tumblr', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Tumblr URL.', 'stm_domain')), array('id' => 'whatsapp', 'type' => 'text', 'title' => __('Whatsapp', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter your Whatsapp URL.', 'stm_domain')))));
Redux::setSection($opt_name, array('title' => __('Social Widget', 'stm_domain'), 'desc' => __('Choose socials for widget, and their order', 'stm_domain'), 'id' => 'social_widget_opt', 'subsection' => true, 'fields' => array(array('id' => 'stm_social_widget_sort', 'type' => 'sortable', 'mode' => 'checkbox', 'title' => __('Select Social Widget Icons to display', 'stm_domain'), 'subtitle' => __('The urls for your social media icons will be taken from Social Media settings tab.', 'stm_domain'), 'options' => array('facebook' => 'Facebook', 'twitter' => 'Twitter', 'instagram' => 'Instagram', 'behance' => 'Behance', 'dribbble' => 'Dribbble', 'flickr' => 'Flickr', 'git' => 'Git', 'linkedin' => 'Linkedin', 'pinterest' => 'Pinterest', 'yahoo' => 'Yahoo', 'delicious' => 'Delicious', 'dropbox' => 'Dropbox', 'reddit' => 'Reddit', 'soundcloud' => 'Soundcloud', 'google' => 'Google', 'google-plus' => 'Google +', 'skype' => 'Skype', 'youtube' => 'Youtube', 'youtube-play' => 'Youtube Play', 'tumblr' => 'Tumblr', 'whatsapp' => 'Whatsapp')))));
Redux::setSection($opt_name, array('title' => __('MailChimp', 'stm_domain'), 'icon' => 'el-icon-paper-clip', 'submenu' => true, 'fields' => array(array('id' => 'mailchimp_api_key', 'type' => 'text', 'title' => __('Mailchimp API key', 'stm_domain'), 'subtitle' => __('Paste your MailChimp API key', 'stm_domain'), 'default' => ""), array('id' => 'mailchimp_list_id', 'type' => 'text', 'title' => __('Mailchimp list id', 'stm_domain'), 'subtitle' => __('Paste your MailChimp List id', 'stm_domain'), 'default' => ""))));
Redux::setSection($opt_name, array('title' => __('Custom CSS', 'stm_domain'), 'icon' => 'el-icon-css', 'submenu' => true, 'fields' => array(array('id' => 'site_css', 'type' => 'ace_editor', 'title' => __('CSS Code', 'stm_domain'), 'subtitle' => __('Paste your custom CSS code here.', 'stm_domain'), 'mode' => 'css', 'default' => ""))));
Redux::setSection($opt_name, array('icon' => 'el-refresh', 'icon_class' => 'el-icon-large', 'title' => __('One Click Update', 'stm_domain'), 'desc' => __('You already receive notifications from Themeforest about our Theme Updates! Here we added an option of Updating your theme with just one button click and forget about complications! But Should you have any issues while using this option update (it might be connected with permissions issues) then you still can use the regular manual update option.', 'stm_domain'), 'submenu' => true, 'fields' => array(array('id' => 'envato_username', 'type' => 'text', 'title' => __('ThemeForest Username', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter here your ThemeForest (or Envato) username here (i.e. Stylemixthemes).', 'stm_domain')), array('id' => 'envato_api', 'type' => 'text', 'title' => __('ThemeForest Secret API Key', 'stm_domain'), 'subtitle' => '', 'desc' => __('Enter the secret API key you have on ThemeForest here. You can create a new one under the Settings > API Keys section of your profile.', 'stm_domain')))));
/*
 * <--- END SECTIONS
 */
if (!function_exists('stm_option')) {
    function stm_option($id, $fallback = false, $key = false)
    {
        global $stm_option;
        if ($fallback == false) {
            $fallback = '';
        }
        $output = isset($stm_option[$id]) && $stm_option[$id] !== '' ? $stm_option[$id] : $fallback;
        if (!empty($stm_option[$id]) && $key) {
            $output = $stm_option[$id][$key];
        }
        return $output;
Пример #21
0
<?php

if (class_exists('Redux')) {
    $opt_name = 'pinnacle';
    Redux::setExtensions($opt_name, dirname(__FILE__) . '/extensions/');
}
Пример #22
0
//            'title'   => __( 'Theme Information 1', 'ssss' ),
//            'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'ssss' )
//        ),
//        array(
//            'id'      => 'redux-help-tab-2',
//            'title'   => __( 'Theme Information 2', 'ssss' ),
//            'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'ssss' )
//        )
//    );
//    Redux::setHelpTab( $opt_name, $tabs );
// Set the help sidebar
//    $content = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'ssss' );
//    Redux::setHelpSidebar( $opt_name, $content );
/*
 * <--- END HELP TABS
 */
/*
 *
 * ---> START SECTIONS
 *
 */
/*

    As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Settings', 'ssss'), 'id' => 'settings', 'desc' => __('Basic fields as subsections.', 'ssss'), 'icon' => 'el el-home'));
Redux::setSection($opt_name, array('title' => __('Twitter', 'ssss'), 'id' => 'social-media', 'desc' => __('Set social media profile urls', 'ssss'), 'icon' => 'el el-home', 'subsection' => true, 'fields' => array(array('id' => 'tweet_via', 'type' => 'text', 'title' => __('Tweet Via', 'ssss')), array('id' => 'tweet_reccomend', 'type' => 'text', 'title' => __('Tweet Reccomend', 'ssss')))));
/*
 * <--- END SECTIONS
 */
<?php

Redux::setSection($opt_name, array('title' => __('Sidebar', 'shopstyler-plugin'), 'id' => 'sidebar', 'desc' => __('Sidebar', 'shopstyler-plugin'), 'customizer_width' => '400px', 'icon' => 'el el-indent-left', 'required' => array('woo_layout', '!=', 'nosidebar')));
Redux::setSection($opt_name, array('title' => __('ShopStyler Sidebar', 'shopstyler-plugin'), 'id' => 'sidebar-settings', 'desc' => __('Add components to sidebar', 'shopstyler-plugin') . ' <a href="//shopstyler.moodgiver.com" target="_blank">Documentation</a>', 'icon' => 'el el-picture', 'subsection' => true, 'fields' => array(array('id' => 'woo_categories', 'type' => 'switch', 'title' => __('Enable Shop Categories menu', 'shopstyler-plugin'), 'desc' => __('Enable/Disable Categories menu', 'shopstyler-plugin'), 'default' => false), array('id' => 'woo_promote', 'type' => 'text', 'title' => __('Add products preview', 'shopstyler-plugin'), 'desc' => __('Input product id to preview in the sidebar', 'shopstyler-plugin'), 'default' => ''), array('id' => 'woo_promote_title', 'type' => 'text', 'title' => __('Products preview title', 'shopstyler-plugin'), 'desc' => __('Add a title for products preview in the sidebar', 'shopstyler-plugin'), 'default' => ''))));
Пример #24
0
<?php

/*
 * Footer Styles Options
 */
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Footer', 'inspiry'), 'id' => 'footer-styles', 'desc' => __('This sub section contains footer styles options.', 'inspiry'), 'subsection' => true, 'fields' => array(array('id' => 'inspiry_footer_variation', 'type' => 'button_set', 'title' => __('Overall Footer Style', 'inspiry'), 'options' => array('one' => __('Light', 'inspiry'), 'two' => __('Dark', 'inspiry')), 'default' => 'one'), array('id' => 'inspiry_footer_divider', 'type' => 'divide'), array('id' => 'inspiry_light_footer_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.site-footer'), 'title' => __('Footer Background Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_heading', 'type' => 'color', 'output' => array('.site-footer h1', '.site-footer h2', '.site-footer h3', '.site-footer h4', '.site-footer h5', '.site-footer h6', '.site-footer .h1', '.site-footer .h2', '.site-footer .h3', '.site-footer .h4', '.site-footer .h5', '.site-footer .h6'), 'title' => __('Footer Headings Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_text', 'type' => 'color', 'output' => array('.site-footer'), 'title' => __('Footer Text Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_link', 'type' => 'link_color', 'title' => __('Footer Link Color', 'inspiry'), 'active' => true, 'output' => array('.site-footer a'), 'default' => array('regular' => '#9aa2aa', 'hover' => '#0dbae8', 'active' => '#0dbae8'), 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_dark_footer_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.site-footer-two'), 'title' => __('Footer Background Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_heading', 'type' => 'color', 'output' => array('.site-footer-two h1', '.site-footer-two h2', '.site-footer-two h3', '.site-footer-two h4', '.site-footer-two h5', '.site-footer-two h6', '.site-footer-two .h1', '.site-footer-two .h2', '.site-footer-two .h3', '.site-footer-two .h4', '.site-footer-two .h5', '.site-footer-two .h6'), 'title' => __('Footer Headings Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_text', 'type' => 'color', 'output' => array('.site-footer-two'), 'title' => __('Footer Text Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_link', 'type' => 'link_color', 'title' => __('Footer Link Color', 'inspiry'), 'active' => true, 'output' => array('.site-footer-two a'), 'default' => array('regular' => '#9aa2aa', 'hover' => '#ffffff', 'active' => '#ffffff'), 'required' => array('inspiry_footer_variation', '=', 'two')))));
Пример #25
0
// array(
// 'subtitle' => __('Turn on if you want to show pagination circles below a video slide for flexslider. Leave it off to hide them on video slides.', 'evolve'),
// 'id' => 'evl_pagination_video_slide',
// 'type' => 'switch',
// 'title' => __('Pagination circles below video slides', 'evolve'),
// ),
// ),
// )
// );
Redux::setSection($opt_name, array('id' => 'evl-lightbox-main-tab', 'title' => 'Lightbox', 'icon' => 't4p-icon-appbarwindowmaximize', 'fields' => array(array('subtitle' => __('Set the speed of the animation.', 'evolve'), 'id' => 'evl_lightbox_animation_speed', 'type' => 'select', 'options' => array('fast' => __('Fast', 'evolve'), 'slow' => __('Slow', 'evolve'), 'normal' => __('Normal', 'evolve')), 'title' => __('Animation Speed', 'evolve'), 'default' => 'fast'), array('subtitle' => __('Show the gallery.', 'evolve'), 'id' => 'evl_lightbox_gallery', 'type' => 'switch', 'title' => __('Show gallery', 'evolve')), array('subtitle' => __('Autoplay the lightbox gallery.', 'evolve'), 'id' => 'evl_lightbox_autoplay', 'type' => 'switch', 'title' => __('Autoplay the Lightbox Gallery', 'evolve')), array('subtitle' => __('If autoplay is enabled, set the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_lightbox_slideshow_speed', 'type' => 'spinner', 'title' => __('Slideshow Speed', 'evolve'), 'default' => '5000'), array('subtitle' => __('Set the opacity of background, <br />0.1 (lowest) to 1 (highest).', 'evolve'), 'id' => 'evl_lightbox_opacity', 'type' => 'slider', 'min' => 0.1, 'max' => 1, 'step' => 0.1, 'resolution' => 0.1, 'title' => __('Background Opacity', 'evolve'), 'default' => '0.8'), array('subtitle' => __('Show the image caption.', 'evolve'), 'id' => 'evl_lightbox_title', 'type' => 'switch', 'title' => __('Show Caption', 'evolve')), array('subtitle' => __('Show the image description. The Alternative text field is used for the description.', 'evolve'), 'id' => 'evl_lightbox_subtitle', 'type' => 'switch', 'title' => __('Show description', 'evolve')), array('subtitle' => __('Show social sharing buttons on lightbox.', 'evolve'), 'id' => 'evl_lightbox_social', 'type' => 'switch', 'title' => __('Social Sharing', 'evolve')), array('subtitle' => __('Show post images that are inside the post content area in the lightbox.', 'evolve'), 'id' => 'evl_lightbox_post_images', 'type' => 'switch', 'title' => __('Show Post Images in Lightbox', 'evolve')))));
Redux::setSection($opt_name, array('id' => 'evl-contact-main-tab', 'title' => 'Contact', 'icon' => 't4p-icon-appbarlocationcheckin', 'fields' => array(array('subtitle' => __('Select the type of google map to show on the contact page.', 'evolve'), 'id' => 'evl_gmap_type', 'type' => 'select', 'options' => array('roadmap' => __('roadmap', 'evolve'), 'satellite' => __('satellite', 'evolve'), 'hybrid' => __('hybrid (default)', 'evolve'), 'terrain' => __('terrain', 'evolve')), 'title' => __('Google Map Type', 'evolve'), 'default' => 'hybrid'), array('subtitle' => __('(in pixels or percentage, e.g.:100% or 100px)', 'evolve'), 'id' => 'evl_gmap_width', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Width', 'evolve'), 'default' => '100%'), array('subtitle' => __('(in pixels, e.g.: 100px)', 'evolve'), 'id' => 'evl_gmap_height', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Height', 'evolve'), 'default' => '415px'), array('subtitle' => __('Example: 775 New York Ave, Brooklyn, Kings, New York 11203.<br /> For multiple markers, separate the addresses with the | symbol. ex: Address 1|Address 2|Address 3.', 'evolve'), 'id' => 'evl_gmap_address', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Address', 'evolve'), 'default' => 'Via dei Fori Imperiali'), array('subtitle' => __('Insert name of header which will be in the header of sent email.', 'evolve'), 'id' => 'evl_sent_email_header', 'type' => 'text', 'title' => __('Sent Email Header (From)', 'evolve'), 'default' => 'Evolve'), array('subtitle' => __('Enter the email adress the form will be sent to.', 'evolve'), 'id' => 'evl_email_address', 'type' => 'text', 'title' => __('Email Address', 'evolve')), array('subtitle' => __('Higher number will be more zoomed in.', 'evolve'), 'id' => 'evl_map_zoom_level', 'type' => 'slider', 'min' => 0, 'max' => 25, 'title' => __('Map Zoom Level', 'evolve'), 'default' => '18'), array('subtitle' => __('Display the address pin.', 'evolve'), 'id' => 'evl_map_pin', 'type' => 'switch', 'on' => __('Hide', 'evolve'), 'off' => __('Show', 'evolve'), 'title' => __('Hide Address Pin', 'evolve')), array('subtitle' => __('Keep the popup graphic with address info hidden when the google map loads. It will only show when the pin on the map is clicked.', 'evolve'), 'id' => 'evl_map_popup', 'type' => 'switch', 'title' => __('Show Map Popup On Click', 'evolve')), array('subtitle' => __('Disable scrollwheel on google maps.', 'evolve'), 'id' => 'evl_map_scrollwheel', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'type' => 'switch', 'title' => __('Disable Map Scrollwheel', 'evolve')), array('subtitle' => __('Disable scale on google maps.', 'evolve'), 'id' => 'evl_map_scale', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Scale', 'evolve')), array('subtitle' => __('Check the box to disable zoom control icon and pan control icon on google maps.', 'evolve'), 'id' => 'evl_map_zoomcontrol', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Zoom & Pan Control Icons', 'evolve')), array('subtitle' => sprintf(__('Get Google reCAPTCHA keys <a href="%s">here</a>  to enable spam protection on the contact page.', 'evolve'), 'https://www.google.com/recaptcha/admin'), 'id' => 'evl_captcha_plugin', 'style' => 'warning', 'type' => 'info', 'notice' => false), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_public', 'type' => 'text', 'title' => __('Google reCAPTCHA Site Key', 'evolve')), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_private', 'type' => 'text', 'title' => __('Google reCAPTCHA Secret key', 'evolve')))));
Redux::setSection($opt_name, array('id' => 'evl-extra-main-tab', 'title' => 'Extra', 'icon' => 't4p-icon-appbarsettings', 'fields' => array(array('subtitle' => __('Select the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_testimonials_speed', 'type' => 'spinner', 'title' => __('Testimonials Speed', 'evolve'), 'step' => 100, 'default' => '4000'), array('subtitle' => __('Check the box to add rel="nofollow" attribute to social sharing box shortcode.', 'evolve'), 'id' => 'evl_nofollow_social_links', 'type' => 'checkbox', 'title' => __('Add rel="nofollow" to social links', 'evolve')), array('subtitle' => __('Check this box if you want to enable breadcrumbs navigation', 'evolve'), 'id' => 'evl_breadcrumbs', 'type' => 'checkbox', 'title' => __('Enable Breadcrumbs Navigation', 'evolve'), 'default' => '1'), array('subtitle' => __('Choose the position of the <strong>Older/Newer Posts</strong> links', 'evolve'), 'id' => 'evl_nav_links', 'type' => 'select', 'options' => array('after' => __('After posts', 'evolve'), 'before' => __('Before posts', 'evolve'), 'both' => __('Both', 'evolve')), 'title' => __('Position of navigation links', 'evolve'), 'default' => 'after'), array('id' => 'evl_pos_button', 'type' => 'select', 'compiler' => true, 'options' => array('disable' => __('Disable', 'evolve'), 'left' => __('Left', 'evolve'), 'right' => __('Right', 'evolve'), 'middle' => __('Middle', 'evolve')), 'title' => __('Position of \'Back to Top\' button', 'evolve'), 'default' => 'right'), array('subtitle' => __('<h3 style=\'margin: 0;\'>BBPress</h3>', 'evolve'), 'id' => 'evl_bbpress', 'type' => 'info'), array('subtitle' => __('Check the box if you want to use one global sidebar on all forum pages.', 'evolve'), 'id' => 'evl_bbpress_global_sidebar', 'compiler' => true, 'type' => 'checkbox', 'title' => __('BBPress Use Global Sidebar', 'evolve'), 'default' => '0'), array('subtitle' => __('Select the sidebar that will display on forum pages globally.', 'evolve'), 'id' => 'evl_ppbress_sidebar', 'type' => 'select', 'options' => $sidebar_options, 'title' => __('BBPress Global Sidebar', 'evolve'), 'default' => 'None'))));
Redux::setSection($opt_name, array('id' => 'evl-advanced-main-tab', 'title' => 'Advanced', 'icon' => 't4p-icon-appbarlistcheck', 'fields' => array(array('subtitle' => __('Check this box if you want to enable FlexSlider support', 'evolve'), 'id' => 'evl_flexslider', 'type' => 'checkbox', 'title' => __('Enable FlexSlider support', 'evolve')), array('subtitle' => __('Check this box if you want to enable Parallax Slider support', 'evolve'), 'id' => 'evl_parallax_slider_support', 'type' => 'checkbox', 'title' => __('Enable Parallax Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Carousel Slider support', 'evolve'), 'id' => 'evl_carousel_slider', 'type' => 'checkbox', 'title' => __('Enable Carousel Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Google Map Scripts', 'evolve'), 'id' => 'evl_status_gmap', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Google Map Scripts', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Animate.css plugin support - (menu hover effect, featured image hover effect, button hover effect, etc.)', 'evolve'), 'id' => 'evl_animatecss', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Animate.css plugin support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check the box to disable Youtube API scripts.', 'evolve'), 'id' => 'evl_status_yt', 'type' => 'checkbox', 'title' => __('Disable Youtube API Scripts', 'evolve')), array('subtitle' => __('Check the box to disable Vimeo API scripts.', 'evolve'), 'id' => 'evl_status_vimeo', 'type' => 'checkbox', 'title' => __('Disable Vimeo API Scripts', 'evolve')), array('subtitle' => __('Check the box to disable font awesome', 'evolve'), 'id' => 'evl_fontawesome', 'type' => 'checkbox', 'title' => __('Disable FontAwesome', 'evolve'), 'default' => '0'))));
Redux::setSection($opt_name, array('id' => 'evl-woocommerce-main-tab', 'title' => 'WooCommerce', 'icon' => 't4p-icon-appbarcart', 'fields' => array(array('subtitle' => __('Insert the number of posts to display per page.', 'evolve'), 'id' => 'evl_woo_items', 'type' => 'text', 'title' => __('Number of Products per Page', 'evolve'), 'default' => '12'), array('subtitle' => __('Check the box to disable the ordering boxes displayed on the shop page.', 'evolve'), 'id' => 'evl_woocommerce_evolve_ordering', 'type' => 'checkbox', 'title' => __('Disable Woocommerce Shop Page Ordering Boxes', 'evolve')), array('subtitle' => __('Check the box to use evolve\'s one page checkout template.', 'evolve'), 'id' => 'evl_woocommerce_one_page_checkout', 'type' => 'checkbox', 'title' => __('Use Woocommerce One Page Checkout', 'evolve')), array('subtitle' => __('Check the box to show the order notes on the checkout page.', 'evolve'), 'id' => 'evl_woocommerce_enable_order_notes', 'type' => 'checkbox', 'title' => __('Show Woocommerce Order Notes on Checkout', 'evolve')), array('subtitle' => __('Check the box to show My Account link, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_acc_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce My Account Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the Cart icon, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_cart_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce Cart Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the social icons on product pages, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_social_links', 'type' => 'checkbox', 'title' => __('Show Woocommerce Social Icons', 'evolve')), array('subtitle' => __('Insert your text and it will appear in the first message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_1', 'type' => 'textarea', 'title' => __('Account Area Message 1', 'evolve'), 'default' => 'Call us - <i class="t4p-icon-phone"></i> 7438 882 764'), array('subtitle' => __('Insert your text and it will appear in the second message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_2', 'type' => 'textarea', 'title' => __('Account Area Message 2', 'evolve'), 'default' => 'Email us - <i class="t4p-icon-envelope-o"></i> contact@example.com'))));
Redux::setSection($opt_name, array('id' => 'evl-custom-css-main-tab', 'title' => 'Custom CSS', 'icon' => 't4p-icon-appbarsymbolbraces', 'fields' => array(array('subtitle' => __('Paste your CSS code, do not include any tags or HTML in this field. Any custom CSS entered here will override the theme CSS. In some cases, the !important tag may be needed.', 'evolve'), 'id' => 'evl_css_content', 'type' => 'textarea', 'title' => __('Custom CSS', 'evolve')))));
Redux::setSection($opt_name, array('id' => 'evl-import-export-main-tab', 'title' => 'Import / Export', 'icon' => 't4p-icon-appbarinbox', 'customizer' => false, 'fields' => array(array('id' => 'redux_import_export', 'type' => 'import_export', 'full_width' => true))));
add_action("redux/extension/customizer/control/includes", 'evolve_extend_customizer');
function evolve_extend_customizer()
{
    // Extra customizer field types
    if (!class_exists('Redux_Customizer_Control_spinner')) {
        class Redux_Customizer_Control_spinner extends Redux_Customizer_Control
        {
            public $type = "redux-spinner";
        }
    }
    if (!class_exists('Redux_Customizer_Control_slider')) {
        class Redux_Customizer_Control_slider extends Redux_Customizer_Control
        {
            public $type = "redux-slider";
        }
Пример #26
0
<?php

// All extensions placed within the extensions directory will be auto-loaded for your Redux instance.
Redux::setExtensions('redux_builder_burocrate', dirname(__FILE__) . '/extensions/');
// Any custom extension configs should be placed within the configs folder.
if (file_exists(dirname(__FILE__) . '/configs/')) {
    $files = glob(dirname(__FILE__) . '/configs/*.php');
    if (!empty($files)) {
        foreach ($files as $file) {
            include $file;
        }
    }
}
Пример #27
0
 public static function compileSystemStatus($json_output = false, $remote_checks = false)
 {
     global $wpdb;
     $sysinfo = array();
     $sysinfo['home_url'] = home_url();
     $sysinfo['site_url'] = site_url();
     $sysinfo['redux_ver'] = esc_html(ReduxFramework::$_version);
     $sysinfo['redux_data_dir'] = ReduxFramework::$_upload_dir;
     $f = 'fo' . 'pen';
     // Only is a file-write check
     $sysinfo['redux_data_writeable'] = self::makeBoolStr(@$f(ReduxFramework::$_upload_dir . 'test-log.log', 'a'));
     $sysinfo['wp_content_url'] = WP_CONTENT_URL;
     $sysinfo['wp_ver'] = get_bloginfo('version');
     $sysinfo['wp_multisite'] = is_multisite();
     $sysinfo['permalink_structure'] = get_option('permalink_structure') ? get_option('permalink_structure') : 'Default';
     $sysinfo['front_page_display'] = get_option('show_on_front');
     if ($sysinfo['front_page_display'] == 'page') {
         $front_page_id = get_option('page_on_front');
         $blog_page_id = get_option('page_for_posts');
         $sysinfo['front_page'] = $front_page_id != 0 ? get_the_title($front_page_id) . ' (#' . $front_page_id . ')' : 'Unset';
         $sysinfo['posts_page'] = $blog_page_id != 0 ? get_the_title($blog_page_id) . ' (#' . $blog_page_id . ')' : 'Unset';
     }
     $sysinfo['wp_mem_limit']['raw'] = self::let_to_num(WP_MEMORY_LIMIT);
     $sysinfo['wp_mem_limit']['size'] = size_format($sysinfo['wp_mem_limit']['raw']);
     $sysinfo['db_table_prefix'] = 'Length: ' . strlen($wpdb->prefix) . ' - Status: ' . (strlen($wpdb->prefix) > 16 ? 'ERROR: Too long' : 'Acceptable');
     $sysinfo['wp_debug'] = 'false';
     if (defined('WP_DEBUG') && WP_DEBUG) {
         $sysinfo['wp_debug'] = 'true';
     }
     $sysinfo['wp_lang'] = get_locale();
     if (!class_exists('Browser')) {
         require_once ReduxFramework::$_dir . 'inc/browser.php';
     }
     $browser = new Browser();
     $sysinfo['browser'] = array('agent' => $browser->getUserAgent(), 'browser' => $browser->getBrowser(), 'version' => $browser->getVersion(), 'platform' => $browser->getPlatform());
     $sysinfo['server_info'] = esc_html($_SERVER['SERVER_SOFTWARE']);
     $sysinfo['localhost'] = self::makeBoolStr(self::isLocalHost());
     $sysinfo['php_ver'] = function_exists('phpversion') ? esc_html(phpversion()) : 'phpversion() function does not exist.';
     $sysinfo['abspath'] = ABSPATH;
     if (function_exists('ini_get')) {
         $sysinfo['php_mem_limit'] = size_format(self::let_to_num(ini_get('memory_limit')));
         $sysinfo['php_post_max_size'] = size_format(self::let_to_num(ini_get('post_max_size')));
         $sysinfo['php_time_limit'] = ini_get('max_execution_time');
         $sysinfo['php_max_input_var'] = ini_get('max_input_vars');
         $sysinfo['php_display_errors'] = self::makeBoolStr(ini_get('display_errors'));
     }
     $sysinfo['suhosin_installed'] = extension_loaded('suhosin');
     $sysinfo['mysql_ver'] = $wpdb->db_version();
     $sysinfo['max_upload_size'] = size_format(wp_max_upload_size());
     $sysinfo['def_tz_is_utc'] = 'true';
     if (date_default_timezone_get() !== 'UTC') {
         $sysinfo['def_tz_is_utc'] = 'false';
     }
     $sysinfo['fsockopen_curl'] = 'false';
     if (function_exists('fsockopen') || function_exists('curl_init')) {
         $sysinfo['fsockopen_curl'] = 'true';
     }
     //$sysinfo['soap_client'] = 'false';
     //if ( class_exists( 'SoapClient' ) ) {
     //    $sysinfo['soap_client'] = 'true';
     //}
     //
     //$sysinfo['dom_document'] = 'false';
     //if ( class_exists( 'DOMDocument' ) ) {
     //    $sysinfo['dom_document'] = 'true';
     //}
     //$sysinfo['gzip'] = 'false';
     //if ( is_callable( 'gzopen' ) ) {
     //    $sysinfo['gzip'] = 'true';
     //}
     if ($remote_checks == true) {
         $response = wp_remote_post('https://www.paypal.com/cgi-bin/webscr', array('sslverify' => false, 'timeout' => 60, 'user-agent' => 'ReduxFramework/' . ReduxFramework::$_version, 'body' => array('cmd' => '_notify-validate')));
         if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
             $sysinfo['wp_remote_post'] = 'true';
             $sysinfo['wp_remote_post_error'] = '';
         } else {
             $sysinfo['wp_remote_post'] = 'false';
             $sysinfo['wp_remote_post_error'] = $response->get_error_message();
         }
         $response = wp_remote_get('http://reduxframework.com/wp-admin/admin-ajax.php?action=get_redux_extensions');
         if (!is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
             $sysinfo['wp_remote_get'] = 'true';
             $sysinfo['wp_remote_get_error'] = '';
         } else {
             $sysinfo['wp_remote_get'] = 'false';
             $sysinfo['wp_remote_get_error'] = $response->get_error_message();
         }
     }
     $active_plugins = (array) get_option('active_plugins', array());
     if (is_multisite()) {
         $active_plugins = array_merge($active_plugins, get_site_option('active_sitewide_plugins', array()));
     }
     $sysinfo['plugins'] = array();
     foreach ($active_plugins as $plugin) {
         $plugin_data = @get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin);
         $plugin_name = esc_html($plugin_data['Name']);
         $sysinfo['plugins'][$plugin_name] = $plugin_data;
     }
     $redux = ReduxFrameworkInstances::get_all_instances();
     $sysinfo['redux_instances'] = array();
     if (!empty($redux) && is_array($redux)) {
         foreach ($redux as $inst => $data) {
             Redux::init($inst);
             $sysinfo['redux_instances'][$inst]['args'] = $data->args;
             $sysinfo['redux_instances'][$inst]['sections'] = $data->sections;
             foreach ($sysinfo['redux_instances'][$inst]['sections'] as $sKey => $section) {
                 if (isset($section['fields']) && is_array($section['fields'])) {
                     foreach ($section['fields'] as $fKey => $field) {
                         if (isset($field['validate_callback'])) {
                             unset($sysinfo['redux_instances'][$inst]['sections'][$sKey]['fields'][$fKey]['validate_callback']);
                         }
                         if ($field['type'] == "js_button") {
                             if (isset($field['script']) && isset($field['script']['ver'])) {
                                 unset($sysinfo['redux_instances'][$inst]['sections'][$sKey]['fields'][$fKey]['script']['ver']);
                             }
                         }
                     }
                 }
             }
             $sysinfo['redux_instances'][$inst]['extensions'] = Redux::getExtensions($inst);
             if (isset($data->extensions['metaboxes'])) {
                 $data->extensions['metaboxes']->init();
                 $sysinfo['redux_instances'][$inst]['metaboxes'] = $data->extensions['metaboxes']->boxes;
             }
             if (isset($data->args['templates_path']) && $data->args['templates_path'] != '') {
                 $sysinfo['redux_instances'][$inst]['templates'] = self::getReduxTemplates($data->args['templates_path']);
             }
         }
     }
     $active_theme = wp_get_theme();
     $sysinfo['theme']['name'] = $active_theme->Name;
     $sysinfo['theme']['version'] = $active_theme->Version;
     $sysinfo['theme']['author_uri'] = $active_theme->{'Author URI'};
     $sysinfo['theme']['is_child'] = self::makeBoolStr(is_child_theme());
     if (is_child_theme()) {
         $parent_theme = wp_get_theme($active_theme->Template);
         $sysinfo['theme']['parent_name'] = $parent_theme->Name;
         $sysinfo['theme']['parent_version'] = $parent_theme->Version;
         $sysinfo['theme']['parent_author_uri'] = $parent_theme->{'Author URI'};
     }
     //if ( $json_output ) {
     //    $sysinfo = json_encode( $sysinfo );
     //}
     //print_r($sysinfo);
     //exit();
     return $sysinfo;
 }
Пример #28
0
<div class="nicdark_margin10">
    <a href="#" class="nicdark_press right nicdark_btn_icon nicdark_bg_red small white"><i class="icon-youtube-play"></i></a>
</div>

<div class="nicdark_margin10">
    <a href="#" class="nicdark_press right nicdark_btn_icon nicdark_facebook small white"><i class="icon-facebook"></i></a>
</div>'), array('id' => 'copyright_backtotop', 'type' => 'switch', 'required' => array('copyright_display', '=', '1'), 'title' => __('Disable Back To Top', 'redux-framework-demo'), 'subtitle' => __('Disable Back To Top Arrow', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => 1, 'on' => 'Enabled', 'off' => 'Disabled'))));
////////////////////////////////////////////////////END FOOTER SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////COLOR SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('Colors', 'redux-framework-demo'), 'id' => 'nicdark_colors_section', 'icon' => 'el el-pencil', 'fields' => array(array('id' => 'color_greydark', 'type' => 'color_gradient', 'title' => __('GREYDARK Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your greydark color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#434a54', 'to' => '#4a515b')), array('id' => 'color_red', 'type' => 'color_gradient', 'title' => __('RED Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your red color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#f76570', 'to' => '#ef606b')), array('id' => 'color_orange', 'type' => 'color_gradient', 'title' => __('ORANGE Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your orange color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#f3a46b', 'to' => '#e89d67')), array('id' => 'color_yellow', 'type' => 'color_gradient', 'title' => __('YELLOW Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your yellow color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#ffd205', 'to' => '#f4c906')), array('id' => 'color_blue', 'type' => 'color_gradient', 'title' => __('BLUE Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your blue color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#14b9d5', 'to' => '#15b0ca')), array('id' => 'color_green', 'type' => 'color_gradient', 'title' => __('GREEN Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your green color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#1bbc9b', 'to' => '#18b292')), array('id' => 'color_violet', 'type' => 'color_gradient', 'title' => __('VIOLET Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your violet color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#c377e4', 'to' => '#BA71DA')), array('id' => 'color_gradient', 'type' => 'ace_editor', 'title' => __('CSS Gradient', 'redux-framework-demo'), 'subtitle' => __('Paste your gradient CSS code here, generate the code <a target="_blank" href="http://www.colorzilla.com/gradient-editor/">HERE</a> ', 'redux-framework-demo'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => '', 'default' => "background: #f76570; /* Old browsers */\n    background: -moz-linear-gradient(left, #f76570 0%, #f76570 8%, #f3a46b 8%, #f3a46b 16%, #f3a46b 16%, #ffd205 16%, #ffd205 24%, #ffd205 24%, #1bbc9b 24%, #1bbc9b 25%, #1bbc9b 32%, #14b9d5 32%, #14b9d5 40%, #c377e4 40%, #c377e4 48%, #f76570 48%, #f76570 56%, #f3a46b 56%, #f3a46b 64%, #ffd205 64%, #ffd205 72%, #1bbc9b 72%, #1bbc9b 80%, #14b9d5 80%, #14b9d5 80%, #14b9d5 89%, #c377e4 89%, #c377e4 100%); /* FF3.6+ */\n    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f76570), color-stop(8%,#f76570), color-stop(8%,#f3a46b), color-stop(16%,#f3a46b), color-stop(16%,#f3a46b), color-stop(16%,#ffd205), color-stop(24%,#ffd205), color-stop(24%,#ffd205), color-stop(24%,#1bbc9b), color-stop(25%,#1bbc9b), color-stop(32%,#1bbc9b), color-stop(32%,#14b9d5), color-stop(40%,#14b9d5), color-stop(40%,#c377e4), color-stop(48%,#c377e4), color-stop(48%,#f76570), color-stop(56%,#f76570), color-stop(56%,#f3a46b), color-stop(64%,#f3a46b), color-stop(64%,#ffd205), color-stop(72%,#ffd205), color-stop(72%,#1bbc9b), color-stop(80%,#1bbc9b), color-stop(80%,#14b9d5), color-stop(80%,#14b9d5), color-stop(89%,#14b9d5), color-stop(89%,#c377e4), color-stop(100%,#c377e4)); /* Chrome,Safari4+ */\n    background: -webkit-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* Chrome10+,Safari5.1+ */\n    background: -o-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* Opera 11.10+ */\n    background: -ms-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* IE10+ */\n    background: linear-gradient(to right, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* W3C */\n    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f76570', endColorstr='#c377e4',GradientType=1 ); /* IE6-9 */"))));
////////////////////////////////////////////////////END COLOR SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////FONTS SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('Fonts', 'redux-framework-demo'), 'id' => 'nicdark_fonts_section', 'icon' => 'el el-font', 'fields' => array(array('id' => 'first_font', 'type' => 'typography', 'title' => __('Main Font', 'redux-framework-demo'), 'subtitle' => __('Specify the main font.', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Open Sans')), array('id' => 'second_font', 'type' => 'typography', 'title' => __('Second Font', 'redux-framework-demo'), 'subtitle' => __('Specify the second font.', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Open Sans')), array('id' => 'third_font', 'type' => 'typography', 'title' => __('Third Font', 'redux-framework-demo'), 'subtitle' => __('Specify the third font. Only for "signature" class apply to heading tag', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Montez')))));
////////////////////////////////////////////////////END FONTS SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////GENERAL SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('General', 'redux-framework-demo'), 'id' => 'nicdark_general_section', 'icon' => 'el el-cogs', 'fields' => array(array('id' => 'general_boxed', 'type' => 'switch', 'title' => __('Enable Boxed Layout', 'redux-framework-demo'), 'subtitle' => __('Enable Boxed Layout For Your Site!', 'redux-framework-demo'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'general_background', 'type' => 'background', 'transparent' => false, 'required' => array('general_boxed', '=', '1'), 'output' => array('body'), 'title' => __('Background Options', 'redux-framework-demo'), 'subtitle' => __('Body background with image, pattern and color', 'redux-framework-demo')), array('id' => 'general_css', 'type' => 'ace_editor', 'title' => __('Custom CSS', 'redux-framework-demo'), 'subtitle' => __('Paste your CSS code here.', 'redux-framework-demo'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => '', 'default' => ""), array('id' => 'general_js', 'type' => 'textarea', 'title' => __('Google Analytics', 'redux-framework-demo'), 'subtitle' => __('Paste your Google Analytics here. ', 'redux-framework-demo'), 'desc' => 'This will be added into the footer template of your theme.', 'default' => " "))));
////////////////////////////////////////////////////END GENERAL SETTINGS///////////////////////////////////////////////////
//END NICDARK REDUX
/*
 * <--- END SECTIONS
 */
/**
 * This is a test function that will let you see when the compiler hook occurs.
 * It only runs if a field    set with compiler=>true is changed.
 * */
function compiler_action($options, $css, $changed_values)
{
    echo '<h1>The compiler hook has run!</h1>';
    echo "<pre>";
    print_r($changed_values);
    // Values that have changed since the last save
Пример #29
0
 public static function getExtensions($opt_name = "", $key = "")
 {
     if (empty($opt_name)) {
         Redux::getAllExtensions();
         if (empty($key)) {
             return self::$extension_paths;
         } else {
             if (isset(self::$extension_paths[$key])) {
                 return self::$extension_paths[$key];
             }
         }
     } else {
         if (empty(self::$uses_extensions[$opt_name])) {
             Redux::getInstanceExtensions($opt_name);
         }
         if (empty(self::$uses_extensions[$opt_name])) {
             return false;
         }
         $instanceExtensions = array();
         foreach (self::$uses_extensions[$opt_name] as $extension) {
             $class_file = end(self::$extensions[$extension]);
             $name = str_replace('.php', '', basename($extension));
             $extension_class = 'ReduxFramework_Extension_' . $name;
             $instanceExtensions[$extension] = array('path' => $class_file, 'class' => $extension_class, 'version' => Redux_Helpers::get_template_version($class_file));
         }
         return $instanceExtensions;
     }
     return false;
 }
Пример #30
0
Redux::setArgs($opt_name, $args);
/*
 * END ARGUMENTS
 */
/*
 * HELP TABS
 */
$tabs = array(array('id' => 'sun-help-tab-1', 'title' => __('About', 'sun'), 'content' => __('<p>Sun Theme - is clean, fat-free, fast theme for WordPress</p>', 'sun')), array('id' => 'sun-help-tab-2', 'title' => __('Author', 'sun'), 'content' => __('<p>Eugene Kudriashov</p><p></p>', 'sun')));
Redux::setHelpTab($opt_name, $tabs);
/*
 * START SECTIONS
 */
/**** HOME PAGE ****/
Redux::setSection($opt_name, array('title' => __('Homepage', 'sun'), 'icon' => 'el el-home', 'fields' => array(array('id' => 'homepage_layout', 'type' => 'sorter', 'title' => __('Homepage Layout Manager', 'sun'), 'desc' => 'Organize how you want the layout to appear on the homepage', 'options' => array('enabled' => array('herobanner' => 'Hero banner'), 'disabled' => array('intro' => 'Intro', 'advantages' => 'Advantages', 'testimonials' => 'Testimonials', 'calltoaction' => 'Call To Action', 'twocolumns' => 'Two Columns'))), array('title' => __('Hero Banner Background Image', 'sun'), 'subtitle' => __('Use this field to upload your custom image for use in the Hero Banner background', 'sun'), 'id' => 'banner-image', 'default' => '', 'type' => 'media', 'url' => true, 'placeholder' => 'No background image selected'), array('title' => __('Hero Banner Texts', 'sun'), 'subtitle' => __('2 options fields Available: Title, Subtitle', 'sun'), 'id' => 'banner-text', 'desc' => __('First field - TITLE, second field - SUBTITLE', 'sun'), 'type' => 'multi_text', 'add_text' => 'Add Field', 'show_empty' => false), array('title' => __('Intro section title', 'sun'), 'subtitle' => __('Title for the Intro Section', 'sun'), 'id' => 'intro-title', 'type' => 'text', 'placeholder' => 'Your super title'), array('title' => __('Intro section text', 'sun'), 'subtitle' => __('Custom HTML not allowed', 'sun'), 'id' => 'intro-text', 'placeholder' => 'Describe your adv.', 'type' => 'textarea'), array('title' => __('Advantages section optional title and subtitle', 'sun'), 'subtitle' => __('2 options Available: Title, Subtitle', 'sun'), 'id' => 'adv-title', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First TITLE, add second Subtitle', 'sun'), 'type' => 'multi_text'), array('title' => __('1st Column Options', 'sun'), 'subtitle' => __('3 options Available: Title, Icon, Text', 'sun'), 'id' => 'first-column', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First TITLE, add second ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add third TEXT', 'sun'), 'type' => 'multi_text'), array('title' => __('2nd Column Options', 'sun'), 'subtitle' => __('3 options Available: Title, Icon, Text', 'sun'), 'id' => 'second-column', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First TITLE, add second ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add third TEXT', 'sun'), 'type' => 'multi_text'), array('title' => __('3rd Column Options', 'sun'), 'subtitle' => __('3 options Available: Title, Icon, Text', 'sun'), 'id' => 'third-column', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First TITLE, add second ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add third TEXT', 'sun'), 'type' => 'multi_text'), array('title' => __('4th Column Options', 'sun'), 'subtitle' => __('3 options Available: Title, Icon, Text', 'sun'), 'id' => 'fourth-column', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First TITLE, add second ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add third TEXT', 'sun'), 'type' => 'multi_text'), array('title' => __('Testimonials Section Title', 'sun'), 'subtitle' => __('Title for the Testimonials Section', 'sun'), 'id' => 'testimonials-title', 'placeholder' => 'Your super title', 'type' => 'text'), array('id' => 'testimonials-slider', 'type' => 'slides', 'title' => __('Testimonials Slides Options', 'sun'), 'subtitle' => __('Unlimited slides with drag and drop sortings.', 'sun'), 'desc' => __('This field will store all slides and attributes.', 'sun'), 'placeholder' => array('title' => __('Client name', 'sun'), 'description' => __('Testimonial text', 'sun'), 'url' => __('Client URL', 'sun'))), array('title' => __('Call-to-action Section Title and Subtitle', 'sun'), 'subtitle' => __('2 options Available: Title, Subtitle', 'sun'), 'id' => 'cta-title', 'desc' => __('Add First TITLE, add second Subtitle.', 'sun'), 'show_empty' => false, 'add_text' => 'Add Field', 'type' => 'multi_text'), array('title' => __('Call-to-action section text', 'sun'), 'subtitle' => __('Custom HTML not allowed', 'sun'), 'id' => 'cta-text', 'placeholder' => 'CTA text here', 'type' => 'textarea'), array('id' => 'cta-color', 'type' => 'color', 'title' => __('Call-To-Action button color', 'sun'), 'subtitle' => __('Pick a button color(default: #FF4200).', 'sun'), 'default' => '#FF4200', 'validate' => 'color'), array('title' => __('Call-to-action button Title and URL', 'sun'), 'subtitle' => __('2 options Available: Title, URL', 'sun'), 'id' => 'cta-button', 'desc' => __('Add First TITLE, add second URL.', 'sun'), 'show_empty' => false, 'add_text' => 'Add Field', 'type' => 'multi_text'), array('title' => __('Main 2Columns Section Title', 'sun'), 'subtitle' => __('Main Section Title', 'sun'), 'id' => 'maincolumns-title', 'placeholder' => 'Your super title', 'type' => 'text'), array('title' => __('Left Column Title', 'sun'), 'subtitle' => __('Title for the Left column', 'sun'), 'id' => 'leftcolumn-title', 'placeholder' => 'Your super title', 'type' => 'text'), array('title' => __('Left Column text', 'sun'), 'subtitle' => __('Custom HTML not allowed', 'sun'), 'id' => 'leftcolumn-text', 'placeholder' => 'Left Column text here', 'type' => 'textarea'), array('title' => __('Left Column Featured Image', 'sun'), 'subtitle' => __('Use this field to upload your featured image', 'sun'), 'id' => 'leftcolumn-image', 'default' => '', 'type' => 'media', 'url' => true, 'placeholder' => 'No featured image selected rig'), array('title' => __('Right Column Title', 'sun'), 'subtitle' => __('Title for the Right column', 'sun'), 'id' => 'rightcolumn-title', 'placeholder' => 'Your super title', 'type' => 'text'), array('title' => __('Right Column text', 'sun'), 'subtitle' => __('Custom HTML not allowed', 'sun'), 'id' => 'rightcolumn-text', 'placeholder' => 'Right Column text here', 'type' => 'textarea'), array('title' => __('Right Column Featured Image', 'sun'), 'subtitle' => __('Use this field to upload your featured image', 'sun'), 'id' => 'rightcolumn-image', 'default' => '', 'type' => 'media', 'url' => true, 'placeholder' => 'No featured image selected rig'))));
/**** SOCIAL ICONS MENU CONSTRUCTOR ****/
Redux::setSection($opt_name, array('icon' => 'el el-group', 'title' => __('Social Icons Menu', 'sun'), 'desc' => __('maximum number of icons - 6', 'sun'), 'fields' => array(array('title' => __('Social Menu Title', 'sun'), 'id' => 'socials-title', 'placeholder' => 'Be Social', 'type' => 'text'), array('title' => __('1 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'first-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'), array('title' => __('2 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'second-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'), array('title' => __('3 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'third-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'), array('title' => __('4 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'fourth-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'), array('title' => __('5 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'fifth-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'), array('title' => __('6 ICON', 'sun'), 'subtitle' => __('2 options Available: Icon, URL', 'sun'), 'id' => 'sixth-icon', 'show_empty' => false, 'add_text' => 'Add Field', 'desc' => __('Add First ICON Name from <a href="https://fortawesome.github.io/Font-Awesome/icons/" target="_blank">FontAwesome</a>, add second URL.', 'sun'), 'type' => 'multi_text'))));
/*
 * END SECTIONS
 */
// If Redux is running as a plugin, this will remove the demo notice and links
add_action('redux/loaded', 'sun_remove_demo');
/**
 * Custom function for the callback validation referenced above
 * */
if (!function_exists('sun_validate_callback_function')) {
    function sun_validate_callback_function($field, $value, $existing_value)
    {
        $error = false;
        $warning = false;
        //do your validation
        if ($value == 1) {