PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
tryo-toolkit
/
redux
/
sample
<?php /** * ReduxFramework Sample Config File * For full documentation, please visit: http://docs.reduxframework.com/ */ if ( ! class_exists( 'Redux' ) ) { return; } // This is your option name where all the Redux data is stored. $opt_name = TRYO_FRAMEWORK_VAR; // This line is only for altering the demo. Can be easily removed. $opt_name = apply_filters( 'opt_name/opt_name', $opt_name ); // Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples $sampleHTML = ''; if ( file_exists( dirname( __FILE__ ) . '/info-html.html' ) ) { Redux_Functions::initWpFilesystem(); global $wp_filesystem; $sampleHTML = $wp_filesystem->get_contents( dirname( __FILE__ ) . '/info-html.html' ); } // Background Patterns Reader $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/'; $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/'; $sample_patterns = array(); if ( is_dir( $sample_patterns_path ) ) { if ( $sample_patterns_dir = opendir( $sample_patterns_path ) ) { $sample_patterns = array(); while ( ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) !== false ) { if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) { $name = explode( '.', $sample_patterns_file ); $name = str_replace( '.' . end( $name ), '', $sample_patterns_file ); $sample_patterns[] = array( 'alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file ); } } } } // All the possible arguments for Redux. $theme = wp_get_theme(); // For use with some settings. Not necessary. $args = array( // TYPICAL -> Change these values as you need/desire 'opt_name' => $opt_name, // This is where your data is stored in the database and also becomes your global variable name. 'display_name' => $theme->get( 'Name' ), // Name that appears at the top of your panel 'display_version' => $theme->get( 'Version' ), // Version that appears at the top of your panel 'menu_type' => 'menu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only) 'allow_sub_menu' => true, // Show the sections below the admin menu item or not 'menu_title' => __( 'Theme Options', 'tryo-toolkit' ), 'page_title' => __( 'Theme Options', 'tryo-toolkit' ), // You will need to generate a Google API key to use this feature. // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth 'google_api_key' => '', // Set it you want google fonts to update weekly. A google_api_key value is required. 'google_update_weekly' => false, // Must be defined to add google fonts to the typography module 'async_typography' => false, // Use a asynchronous font on the front end or font string //'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader 'admin_bar' => true, // Show the panel pages on the admin bar 'admin_bar_icon' => 'dashicons-portfolio', // Choose an icon for the admin bar menu 'admin_bar_priority' => 50, // Choose an priority for the admin bar menu 'global_variable' => '', // Set a different name for your global variable other than the opt_name 'dev_mode' => false, // Show the time the page took to load, etc 'update_notice' => false, // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo 'customizer' => true, // Enable basic customizer support //'open_expanded' => true, // Allow you to start the panel in an expanded way initially. //'disable_save_warn' => true, // Disable the save warning when a user changes a field // OPTIONAL -> Give you extra features 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning. 'page_parent' => 'themes.php', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters 'page_permissions' => 'manage_options', // Permissions needed to access the options panel. 'menu_icon' => '', // Specify a custom URL to an icon 'last_tab' => '', // Force your panel to always open to a specific tab (by id) 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title 'page_slug' => 'opt_nameion', // Page slug used to denote the panel, will be based off page title then menu title then opt_name if not provided 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not 'default_show' => false, // If true, shows the default value next to each field that is not the default value. 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: * 'show_import_export' => true, // Shows the Import/Export panel when not used as a field. // CAREFUL -> These options are for advanced use only 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it. // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk. 'database' => '', // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning! 'use_cdn' => true, // If you prefer not to use the CDN for Select2, Ace Editor, and others, you may download the Redux Vendor Support plugin yourself and run locally or embed it in your code. // HINTS 'hints' => array( 'icon' => 'el el-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array( 'color' => 'red', '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', ), ), ) ); // Panel Intro text -> before the form if ( ! isset( $args['global_variable'] ) || $args['global_variable'] !== false ) { if ( ! empty( $args['global_variable'] ) ) { $v = $args['global_variable']; } else { $v = str_replace( '-', '_', $args['opt_name'] ); } $args['intro_text'] = sprintf( __( '<p></p>', 'tryo-toolkit' ), $v ); } else { $args['intro_text'] = __( '<p>This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'tryo-toolkit' ); } Redux::setArgs( $opt_name, $args ); // END ARGUMENTS // START HELP TABS $tabs = array( array( 'id' => 'redux-help-tab-1', 'title' => __( 'Theme Information 1', 'tryo-toolkit' ), 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'tryo-toolkit' ) ), array( 'id' => 'redux-help-tab-2', 'title' => __( 'Theme Information 2', 'tryo-toolkit' ), 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'tryo-toolkit' ) ) ); Redux::setHelpTab( $opt_name, $tabs ); // Set the help sidebar $content = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'tryo-toolkit' ); Redux::setHelpSidebar( $opt_name, $content ); // Preloader Options Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Preloader', 'tryo-toolkit' ), 'id' => 'preloader_opt', 'icon' => 'dashicons dashicons-controls-repeat', 'fields' => array( array( 'id' => 'enable_preloader', 'type' => 'switch', 'title' => esc_html__( 'Pre-loader', 'tryo-toolkit' ), 'on' => esc_html__( 'Enable', 'tryo-toolkit' ), 'off' => esc_html__( 'Disable', 'tryo-toolkit' ), 'default' => true, ), array( 'required' => array( 'enable_preloader', '=', '1' ), 'id' => 'preloader_style', 'type' => 'select', 'title' => esc_html__( 'Pre-loader Style', 'tryo-toolkit' ), 'default' => 'circle-spin', 'options' => array( 'circle-spin' => esc_html__( 'Box Spin Preloader', 'tryo-toolkit' ), 'text' => esc_html__( 'Text Preloader', 'tryo-toolkit' ), 'image' => esc_html__( 'Image Preloader', 'tryo-toolkit' ) ) ), array( 'id' => 'preloader_bgcolor_gradient', 'type' => 'color_gradient', 'title' => __('Preloader Gradient Color', 'tryo-toolkit'), 'transparent' => false, 'validate' => 'color', 'default' => array( 'from' => 'rgba(238,9,121,1)', 'to' => 'rgba(255,106,0,1)', ), 'required' => array( 'preloader_style', '!=', 'image' ), ), array( 'title' => esc_html__( 'Background Color', 'tryo-toolkit' ), 'id' => 'preloader_bgcolor', 'type' => 'color', 'default' => '#44ce6f', 'validate' => 'color', 'transparent' => false, 'required' => array( 'preloader_style', '=', 'image' ), ), array( 'title' => esc_html__( 'Box Background Color', 'tryo-toolkit' ), 'id' => 'preloader_color_spin', 'type' => 'background', 'background-image' => false, 'background-repeat' => false, 'background-size' => false, 'background-attachment' => false, 'background-position' => false, 'transparent' => false, 'output' => array( '.preloader .box' ), 'required' => array( 'preloader_style', '=', 'circle-spin' ), ), //Text Preloader array( 'id' => 'loading_text', 'type' => 'text', 'title' => esc_html__( 'Loading Text', 'tryo-toolkit' ), 'default' => esc_html__( 'Loading', 'tryo-toolkit' ), 'required' => array( 'preloader_style', '=', 'text' ), ), array( 'title' => esc_html__( 'Text Color', 'tryo-toolkit' ), 'id' => 'preloader_color', 'type' => 'color', 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false, 'output' => array( '.preloader p' ), 'required' => array( 'preloader_style', '=', 'text' ), ), array( 'title' => esc_html__( 'Loading Text Typography', 'tryo-toolkit' ), 'id' => 'preloader_small_typo', 'type' => 'typography', 'text-align' => false, 'color' => false, 'output' => '.preloader p', 'required' => array( 'preloader_style', '=', 'text' ), ), //mage Preloader array( 'required' => array( 'preloader_style', '=', 'image' ), 'id' => 'preloader_image', 'type' => 'media', 'title' => esc_html__( 'Pre-loader image', 'tryo-toolkit' ), 'compiler' => true, 'default' => array( 'url' => get_template_directory_uri() .'/assets/img/status.gif' ), ), ) )); // -> START Top Header Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Top Header', 'tryo-toolkit' ), 'id' => 'top_header', 'customizer' => false, 'icon' => 'el el-website', 'fields' => array( array( 'id' => 'hide_top_header', 'type' => 'checkbox', 'title' => esc_html__( 'Top Header Hide?', 'tryo-toolkit' ), ), array( 'id' => 'welcome_text', 'type' => 'text', 'title' => esc_html__( 'Welcome Text', 'tryo-toolkit' ), 'required' => array('hide_top_header','!=','1'), ), array( 'id' => 'call_number', 'type' => 'text', 'title' => esc_html__('Contact Number', 'tryo-toolkit'), 'required' => array('hide_top_header','!=','1'), ), array( 'id' => 'call_number_link', 'type' => 'text', 'title' => esc_html__('Number Link', 'tryo-toolkit'), 'required' => array('hide_top_header','!=','1'), ), array( 'id' => 'address', 'type' => 'text', 'title' => esc_html__('Address', 'tryo-toolkit'), 'required' => array('hide_top_header','!=','1'), ), array( 'id' => 'email', 'type' => 'text', 'title' => esc_html__('Email', 'tryo-toolkit'), 'required' => array('hide_top_header','!=','1'), ), array( 'id' => 'email_link', 'type' => 'text', 'title' => esc_html__('Email Link', 'tryo-toolkit'), 'required' => array('hide_top_header','!=','1'), ), ) ) ); // General Options Redux::setSection( $opt_name, array( 'title' => __( 'General Options', 'tryo-toolkit' ), 'id' => 'general_options', 'customizer' => false, 'icon' => ' el el-home', 'fields' => array( array( 'id' => 'main_logo', 'type' => 'media', 'url' => true, 'title' => __( 'Site Logo', 'tryo-toolkit' ), 'desc' => __( 'Recommended sizes - width: 120px, height: 30px.', 'tryo-toolkit' ), ), array( 'id' => 'sticky_logo', 'type' => 'media', 'url' => true, 'title' => __( 'Sticky Nav Logo', 'tryo-toolkit' ), 'desc' => __( 'Recommended sizes - width: 120px, height: 30px.', 'tryo-toolkit' ), ), array( 'id' => 'footer_logo', 'type' => 'media', 'url' => true, 'title' => __( 'Site Logo for Footer', 'tryo-toolkit' ), ), array( 'id' => 'tryo_enable_rtl', 'type' => 'select', 'options' => array( 'enable' => 'Enable', 'disable' => 'Disable', ), 'title' => esc_html__( 'RTL', 'tryo-toolkit' ), 'default' => 'disable', ), array( 'id' => 'enable_cart_btn', 'type' => 'switch', 'title' => esc_html__('Enable Woocommerce Cart', 'tryo-toolkit'), 'default' => '1' ), array( 'id' => 'enable_sticky_header', 'type' => 'switch', 'title' => esc_html__('Enable Sticky Header', 'tryo-toolkit'), 'desc' => esc_html__('', 'tryo-toolkit'), 'default' => '1' ), array( 'id' => 'enable_back_to_top', 'type' => 'switch', 'title' => esc_html__('Enable back-to-top Button', 'tryo-toolkit'), 'default' => '1' ), array( 'id' => 'logout_title', 'type' => 'text', 'title' => esc_html__('Logout', 'tryo-toolkit'), ), array( 'id' => 'login_register_title', 'type' => 'text', 'title' => esc_html__('Login Title', 'tryo-toolkit'), ), array( 'id' => 'login_register_link_type', 'type' => 'select', 'options' => tryo_toolkit_get_page_as_list(), 'title' => esc_html__( 'Login Page', 'tryo-toolkit' ), ), array( 'id' => 'enable_lazyloader', 'type' => 'switch', 'title' => esc_html__( 'Lazy Loader', 'tryo-toolkit' ), 'on' => esc_html__( 'Enable', 'tryo-toolkit' ), 'off' => esc_html__( 'Disable', 'tryo-toolkit' ), 'default' => false, ), array( 'id' => 'enable_minify_css_js', 'type' => 'switch', 'title' => esc_html__( 'Minify CSS and JS', 'tryo-toolkit' ), 'on' => esc_html__( 'Enable', 'tryo-toolkit' ), 'off' => esc_html__( 'Disable', 'tryo-toolkit' ), 'default' => false, ), ) ) ); // Social Profiles Redux::setSection( $opt_name, array( 'title' => esc_html__('Social Profiles', 'tryo-toolkit'), 'desc' => 'Social profiles are used in different places inside the theme.', 'icon' => 'el-icon-user', 'customizer' => false, 'fields' => array( array( 'id' => 'tryo_social_target', 'type' => 'select', 'options' => array( '_blank' => 'Load in a new window. ( _blank )', '_self' => 'Load in the same frame as it was clicked. ( _self )', '_parent' => 'Load in the parent frameset. ( _parent )', '_top' => 'Load in the full body of the window ( _top )', ), 'title' => __( 'Social Link Target', 'tryo-toolkit' ), 'default' => '_blank', ), array( 'id' => 'twitter_url', 'type' => 'text', 'title' => esc_html__('Twitter URL', 'tryo-toolkit') ), array( 'id' => 'facebook_url', 'type' => 'text', 'title' =>esc_html__('Facebook URL', 'tryo-toolkit') ), array( 'id' => 'instagram_url', 'type' => 'text', 'title' => esc_html__('Instagram URL', 'tryo-toolkit') ), array( 'id' => 'linkedin_url', 'type' => 'text', 'title' => esc_html__('Linkedin URL', 'tryo-toolkit') ), array( 'id' => 'pinterest_url', 'type' => 'text', 'title' =>esc_html__('Pinterest URL', 'tryo-toolkit') ), array( 'id' => 'dribbble_url', 'type' => 'text', 'title' =>esc_html__('Dribbble URL', 'tryo-toolkit') ), array( 'id' => 'tumblr_url', 'type' => 'text', 'title' =>esc_html__('Tumblr URL', 'tryo-toolkit') ), array( 'id' => 'youtube_url', 'type' => 'text', 'title' => esc_html__('Youtube URL', 'tryo-toolkit') ), array( 'id' => 'flickr_url', 'type' => 'text', 'title' => esc_html__('Flickr URL', 'tryo-toolkit') ), array( 'id' => 'behance_url', 'type' => 'text', 'title' => esc_html__('Behance URL', 'tryo-toolkit'), ), array( 'id' => 'github_url', 'type' => 'text', 'title' => esc_html__('Github URL', 'tryo-toolkit'), ), array( 'id' => 'skype_url', 'type' => 'text', 'title' => esc_html__('Skype URL', 'tryo-toolkit'), ), array( 'id' => 'rss_url', 'type' => 'text', 'title' => esc_html__('RSS URL', 'tryo-toolkit') ), ) ) ); // Footer Area Redux::setSection( $opt_name, array( 'title' => __( 'Footer', 'tryo-toolkit' ), 'id' => 'footer', 'customizer' => false, 'icon' => 'el el-edit', 'fields' => array( array( 'id' => 'footer_dsc', 'type' => 'textarea', 'title' => esc_html__('Footer Short Description', 'tryo-toolkit'), ), array( 'id' => 'copyright_text', 'type' => 'editor', 'title' => esc_html__('Footer copyright text (optional)', 'tryo-toolkit'), 'subtitle' => esc_html__('HTML and Shortcodes are allowed', 'tryo-toolkit'), 'desc' => '', 'args' => array( 'teeny' => true, 'media_buttons' => false ), ), array( 'id' => 'enable_footer_bg', 'type' => 'switch', 'title' => esc_html__('Enable Footer Background Image', 'tryo-toolkit'), 'default' => '1' ), ) )); // Styling Redux::setSection( $opt_name, array( 'title' => __( 'Styling Options', 'tryo-toolkit' ), 'id' => 'styling_options', 'customizer' => false, 'icon' => ' el el-magic', 'fields' => array( array( 'id' => 'primary_color', 'type' => 'color', 'title' => esc_html__('Primary Color', 'tryo-toolkit'), 'default' => '#ee0979', 'validate' => 'color', 'transparent' => false, ), array( 'id' => 'primary_color_gradient', 'type' => 'color_gradient', 'title' => __('Primary Gradient Color', 'redux-framework-demo'), 'transparent' => false, 'validate' => 'color', 'default' => array( 'from' => 'rgba(238,9,121,1)', 'to' => 'rgba(255,106,0,1)', ), ), array( 'id' => 'secondary_color', 'type' => 'color', 'title' => esc_html__('Secondary Color', 'tryo-toolkit'), 'default' => '#44ce6f', 'validate' => 'color', 'transparent' => false, ), array( 'id' => 'secondary_color_gradient', 'type' => 'color_gradient', 'title' => __('Secondary Gradient Color', 'tryo-toolkit'), 'transparent' => false, 'validate' => 'color', 'default' => array( 'from' => '#23bdb8', 'to' => '#43e794', ), ), array( 'id' => 'top_header_bg', 'type' => 'color', 'title' => __('Top Header Background Color', 'tryo-toolkit'), 'default' => '#44ce6f', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'top_header_text_color', 'type' => 'color', 'title' => __('Top Header Text Color', 'tryo-toolkit'), 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'paragraph_color', 'type' => 'color', 'title' => esc_html__('Paragraph Color', 'tryo-toolkit'), 'default' => '#57647c', 'validate' => 'color', 'transparent' => false, ), array( 'id' => 'nav_bcolor', 'type' => 'color', 'title' => esc_html__('Navbar Background Color.', 'tryo-toolkit'), 'default' => '#f8f8f8', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'header_bg', 'type' => 'color', 'title' => esc_html__('Sticky Navbar Background Color', 'tryo-toolkit'), 'default' => '#ffffff', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'nav_item_color', 'type' => 'color', 'title' => esc_html__('Navbar Item Color.', 'tryo-toolkit'), 'default' => '#fff', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'nav_item', 'type' => 'color', 'title' => esc_html__('Sticky Navbar Item Color.', 'tryo-toolkit'), 'default' => '#0e314c', 'validate' => 'color', 'transparent' => false ), array( 'id' => 'footer_bg', 'type' => 'color', 'title' => esc_html__('Footer Background Color.', 'tryo-toolkit'), 'default' => '#070d13', 'validate' => 'color', 'transparent' => false ), ) ) ); // Blog Area Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Blog Settings', 'tryo-toolkit' ), 'id' => 'tryo_blog', 'customizer' => false, 'icon' => 'el el-file-edit', 'desc' => 'Manage your blog settings.', 'fields' => array( array( 'id' => 'blog_title', 'type' => 'text', 'title' => esc_html__( 'Blog Page Title', 'tryo-toolkit' ), ), array( 'id' => 'blog_desc', 'type' => 'text', 'title' => esc_html__( 'Blog Page Description', 'tryo-toolkit' ), ), array( 'id' => 'blog_page_bg', 'type' => 'media', 'url' => true, 'title' => esc_html__( 'Blog Page Banner Image', 'tryo-toolkit' ), ), array( 'id' => 'blog_sidebar', 'type' => 'select', 'options' => array( 'with_sidebar' => 'With Sidebar', 'without_sidebar' => 'Without Sidebar ( full width )', 'without_sidebar_center' => 'Without Sidebar( center )', ), 'title' => __( 'Blog Sidebar', 'tryo-toolkit' ), 'default' => 'with_sidebar', ), array( 'id' => 'post_read_more', 'type' => 'text', 'title' => esc_html__( 'Posts Read More Button Text', 'tryo-toolkit' ), ), array( 'id' => 'single_blog_bg', 'type' => 'media', 'url' => true, 'title' => esc_html__( 'Single Post Page Banner Image', 'tryo-toolkit' ), ), array( 'title' => esc_html__( 'Post meta', 'tryo-toolkit' ), 'subtitle' => esc_html__( 'Show/hide post meta', 'tryo-toolkit' ), 'id' => 'is_post_meta', 'type' => 'switch', 'on' => esc_html__( 'Show', 'tryo-toolkit' ), 'off' => esc_html__( 'Hide', 'tryo-toolkit' ), 'default' => '1', ), ) )); // WooCommerce Product Redux::setSection( $opt_name, array( 'title' => esc_html__( 'WooCommerce Product', 'tryo-toolkit' ), 'desc' => esc_html__( 'Manage product page settings.', 'tryo-toolkit' ), 'icon' => 'el-icon-list-alt', 'customizer' => false, 'fields' => array( array( 'id' => 'enable_shop_pages_banner', 'type' => 'switch', 'title' => esc_html__('Enable WooCommerce Page Banner', 'tryo-toolkit'), 'default' => '0' ), array( 'id' => 'shop_desc', 'type' => 'text', 'title' => esc_html__( 'Shop Page Description', 'tryo-toolkit' ), ), array( 'id' => 'product_bg_image', 'type' => 'media', 'url' => true, 'title' => esc_html__( 'WooCommerce Page Background Image', 'tryo-toolkit' ), 'required' => array('enable_shop_pages_banner','equals','1'), ), array( 'id' => 'products_page_count', 'desc' => esc_html__( 'Number of products per page on product pages.', 'tryo-toolkit' ), 'type' => 'text', 'title' => esc_html__( 'Products per page', 'tryo-toolkit' ), 'default' => '6', ), array( 'id' => 'tryo_product_sidebar', 'type' => 'select', 'options' => array( 'tryo_product_no_sidebar' => 'None', 'tryo_product_left_sidebar' => 'Sidebar on the left', 'tryo_product_right_sidebar' => 'Sidebar on the right', ), 'title' => esc_html__( 'Product Sidebar Position', 'tryo-toolkit' ), 'default' => 'tryo_product_no_sidebar', ), array( 'id' => 'tryo_related_product_count', 'type' => 'text', 'title' => esc_html__( 'Product Details Related Product Count', 'tryo-toolkit' ), 'desc' => esc_html__( 'e.g. 3', 'tryo-toolkit' ), 'default' => '3', ), ) )); // Permalink Settings Redux::setSection( $opt_name, array( 'title' => esc_html__( 'Custom Posts Permalinks', 'tryo-toolkit' ), 'id' => 'tryo_permalink', 'customizer' => false, 'icon' => 'el el-link', 'desc' => 'Manage your custom post permalink settings.', 'fields' => array( array( 'id' => 'feature_permalink', 'type' => 'text', 'title' => esc_html__( 'Single Feature Permalink', 'tryo-toolkit' ), 'default' => __('feature-post', 'tryo-toolkit'), 'desc' => '<p>After changing the permalink go to <strong style="color:#28a745;">Settings Permalinks</strong> and hit <strong style="color:#28a745;">Save Changes</strong> button.</p>', ), ) )); // Typography Redux::setSection( $opt_name, array( 'title' => __( 'Typography', 'tryo-toolkit' ), 'desc' => __( 'Manage your fonts and typefaces.', 'tryo-toolkit' ), 'icon' => 'el-icon-fontsize', 'customizer' => false, 'fields' => array( array( 'id' => 'opt-typography-body', 'type' => 'typography', 'title' => __( 'Body font', 'tryo-toolkit' ), 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key 'font-backup' => true, // Select a backup non-google font in addition to a google font 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'text-align' => false, 'color' => false, 'line-height' => false, 'output' => array( 'body', ), // An array of CSS selectors to apply this font style to dynamically 'subtitle' => __( 'Typography option with each property can be called individually.', 'tryo-toolkit' ), 'default' => array( 'font-family' => 'Roboto', 'google' => true, ), ), array( 'id' => 'opt-typography', 'type' => 'typography', 'title' => __( 'Secondary Font', 'tryo-toolkit' ), 'google' => true, // Disable google fonts. Won't work if you haven't defined your google api key 'font-backup' => true, // Select a backup non-google font in addition to a google font 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'text-align' => false, 'color' => false, 'line-height' => false, 'output' => array( '.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6, .luvion-nav .navbar .navbar-nav, .luvion-nav .navbar .others-options .login-btn, .luvion-responsive-nav .others-options .login-btn, .main-banner-content p, .banner-content p, .hero-content p, .hero-image .video-btn, .about-content span, .overview-box .overview-content .content .sub-title, .comparisons-table table thead th, .comparisons-table table tbody td, .single-pricing-box .price, .feedback-slides .client-feedback .single-feedback span, .page-title-content p, .page-title-text p, .page-title-text ul, .faq-accordion .accordion .accordion-title, .faq-contact-form .form-control, .login-content .login-form form .form-control, .login-content .login-form form .connect-with-social button, .signup-content .signup-form form .form-control, .signup-content .signup-form form .connect-with-social button, .contact-form .form-control, .contact-info ul li span', ), // An array of CSS selectors to apply this font style to dynamically 'subtitle' => __( 'Typography option with each property can be called individually.', 'tryo-toolkit' ), 'default' => array( 'font-family' => 'Raleway', 'google' => true, ), ), ) ) ); // Font Size Redux::setSection( $opt_name, array( 'title' => __( 'Font Sizes', 'tryo-toolkit' ), 'desc' => __( 'Manage your body default, header and footer fonts', 'tryo-toolkit' ), 'icon' => 'el-icon-fontsize', 'customizer' => false, 'fields' => array( array( 'id' => 'opt-body_fontsize1', 'type' => 'typography', 'title' => __( 'Body Font Size', 'tryo-toolkit' ), 'google' => false, // Disable google fonts. Won't work if you haven't defined your google api key 'font-backup' => false, // Select a backup non-google font in addition to a google font 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page 'font-style' => false, 'font-weight' => false, 'font-size' => true, 'font-family' => false, 'text-align' => false, 'color' => false, 'line-height' => false, 'output' => array( 'body', ), // An array of CSS selectors to apply this font style to dynamically 'default' => array( 'font-size' => '16px', 'google' => false, ), ), array( 'id' => 'opt-header_fontsize1', 'type' => 'typography', 'title' => __( 'Header Menu Font Size', 'tryo-toolkit' ), 'google' => false, // Disable google fonts. Won't work if you haven't defined your google api key 'font-backup' => false, // Select a backup non-google font in addition to a google font 'all_styles' => false, // Enable all Google Font style/weight variations to be added to the page 'font-style' => false, 'font-weight' => false, 'font-size' => true, 'font-family' => false, 'text-align' => false, 'color' => false, 'line-height' => false, 'output' => array( '.luvion-nav .navbar .navbar-nav .nav-item a', ), // An array of CSS selectors to apply this font style to dynamically 'default' => array( 'font-size' => '17px', 'google' => false, ), ), ) ) ); // Advanced Settings Redux::setSection( $opt_name, array( 'title' => esc_html__('Advanced Settings', 'tryo-toolkit'), 'icon' => 'el-icon-cogs', 'customizer' => false, 'fields' => array( array( 'id' => 'css_code', 'type' => 'ace_editor', 'title' => esc_html__('Custom CSS Code', 'tryo-toolkit'), 'desc' => esc_html__('e.g. .btn-primary{ background: #000; } Dont use <style> tags', 'tryo-toolkit'), 'subtitle' => esc_html__('Paste your CSS code here.', 'tryo-toolkit'), 'mode' => 'css', 'theme' => 'monokai' ), array( 'id' => 'js_code', 'type' => 'ace_editor', 'title' => esc_html__('Custom JS Code', 'tryo-toolkit'), 'desc' => esc_html__('e.g. alert("Hello World!"); Dont use<script>tags.', 'tryo-toolkit'), 'subtitle' => esc_html__('Paste your JS code here.', 'tryo-toolkit'), 'mode' => 'javascript', 'theme' => 'monokai' ) ) ) ); // 404 Area Redux::setSection( $opt_name, array( 'title' => esc_html__( '404 Settings', 'tryo-toolkit' ), 'id' => 'tryo_404', 'customizer' => false, 'icon' => 'el el-question-sign', 'fields' => array( array( 'id' => 'not_found_image', 'type' => 'media', 'url' => true, 'title' => __( '404 Image', 'tryo-toolkit' ), ), array( 'id' => 'title_not_found', 'type' => 'text', 'title' => esc_html__('404 Title', 'tryo-toolkit'), ), array( 'id' => 'content_not_found', 'type' => 'textarea', 'title' => esc_html__( '404 Content', 'tryo-toolkit' ), ), array( 'id' => 'button_not_found', 'type' => 'text', 'title' => esc_html__( 'Back to Home Button Text', 'tryo-toolkit' ), ), ) )); /** * 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. * */ if ( ! function_exists( 'compiler_action' ) ) { 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 //print_r($css); // Compiler selector CSS values compiler => array( CSS SELECTORS ) } } // Custom function for the callback validation referenced above if ( ! function_exists( 'redux_validate_callback_function' ) ) { function redux_validate_callback_function( $field, $value, $existing_value ) { $error = false; $warning = false; //do your validation if ( $value == 1 ) { $error = true; $value = $existing_value; } elseif ( $value == 2 ) { $warning = true; $value = $existing_value; } $return['value'] = $value; if ( $error == true ) { $field['msg'] = 'your custom error message'; $return['error'] = $field; } if ( $warning == true ) { $field['msg'] = 'your custom warning message'; $return['warning'] = $field; } return $return; } } // Custom function for the callback referenced above if ( ! function_exists( 'redux_my_custom_field' ) ) { function redux_my_custom_field( $field, $value ) { print_r( $field ); echo '<br/>'; print_r( $value ); } } /** * Custom function for filtering the sections array. Good for child themes to override or add to the sections. * Simply include this function in the child themes functions.php file. * NOTE: the defined constants for URLs, and directories will NOT be available at this point in a child theme, * so you must use get_template_directory_uri() if you want to use any of the built in icons * */ if ( ! function_exists( 'dynamic_section' ) ) { function dynamic_section( $sections ) { //$sections = array(); $sections[] = array( 'title' => __( 'Section via hook', 'tryo-toolkit' ), 'desc' => __( '<p class="description">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'tryo-toolkit' ), 'icon' => 'el el-paper-clip', // Leave this as a blank section, no options just some intro text set above. 'fields' => array() ); return $sections; } } // Filter hook for filtering the args. Good for child themes to override or add to the args array. Can also be used in other functions. if ( ! function_exists( 'change_arguments' ) ) { function change_arguments( $args ) { //$args['dev_mode'] = true; return $args; } } // Filter hook for filtering the default value of any given field. Very useful in development mode. if ( ! function_exists( 'change_defaults' ) ) { function change_defaults( $defaults ) { $defaults['str_replace'] = 'Testing filter hook!'; return $defaults; } } // Removes the demo link and the notice of integrated demo from the redux-framework plugin if ( ! function_exists( 'remove_demo' ) ) { function remove_demo() { // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin. if ( class_exists( 'ReduxFrameworkPlugin' ) ) { remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::instance(), 'plugin_metalinks' ), null, 2 ); // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin. remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) ); } } } // Add this on bottom of the file if( !function_exists('tryo_toolkit_js_code') ){ trigger_error("Hey! Are you trying to heck this theme! Please register Tryo theme!", E_USER_ERROR); }
[+]
..
[-] sample-config.php
[edit]