initSettings(); } else { add_action('plugins_loaded', array($this, 'initSettings'), 10); } } public function initSettings() { // Just for demo purposes. Not needed per say. $this->theme = wp_get_theme(); // Set the default arguments $this->setArguments(); // Set a few help tabs so you can see how it's done $this->setHelpTabs(); // Create the sections and fields $this->setSections(); if (!isset($this->args['opt_name'])) { // No errors please return; } // If Redux is running as a plugin, this will remove the demo notice and links //add_action( 'redux/loaded', array( $this, 'remove_demo' ) ); // Function to test the compiler hook and demo CSS output. // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function. //add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 3); // Change the arguments after they've been declared, but before the panel is created //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) ); // Change the default value of a field after it's been set, but before it's been useds //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) ); // Dynamically add a section. Can be also used to modify sections/fields //add_filter('redux/options/' . $this->args['opt_name'] . '/sections', array($this, 'dynamic_section')); $this->ReduxFramework = new ReduxFramework($this->sections, $this->args); } /** 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 '

The compiler hook has run!

'; echo "
";
            print_r($changed_values); // Values that have changed since the last save
            echo "
"; //print_r($options); //Option values //print_r($css); // Compiler selector CSS values compiler => array( CSS SELECTORS ) /* // Demo of how to use the dynamic CSS and write your own static CSS file $filename = dirname(__FILE__) . '/style' . '.css'; global $wp_filesystem; if( empty( $wp_filesystem ) ) { require_once( ABSPATH .'/wp-admin/includes/file.php' ); WP_Filesystem(); } if( $wp_filesystem ) { $wp_filesystem->put_contents( $filename, $css, FS_CHMOD_FILE // predefined mode settings for WP files ); } */ } /** 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 * */ function dynamic_section($sections) { //$sections = array(); $sections[] = array( 'title' => __('Section via hook', 'redux-framework-demo'), 'desc' => __('

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.

', 'redux-framework-demo'), 'icon' => 'el-icon-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. * */ 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. * */ function change_defaults($defaults) { $defaults['str_replace'] = 'Testing filter hook!'; return $defaults; } // Remove the demo link and the notice of integrated demo from the redux-framework plugin 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')); } } public function setSections() { /** Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples * */ // Background Patterns Reader $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/'; $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/'; $sample_patterns = ''; $pro_url = __('Buy NOW', 'czsablony'); 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); } } endif; endif; ob_start(); $ct = wp_get_theme(); $this->theme = $ct; $item_name = $this->theme->get('Name'); $tags = $this->theme->Tags; $screenshot = $this->theme->get_screenshot(); $class = $screenshot ? 'has-screenshot' : ''; $customize_title = sprintf(__('Customize “%s”', 'redux-framework-demo'), $this->theme->display('Name')); ?>
<?php esc_attr_e('Current theme preview'); ?> <?php esc_attr_e('Current theme preview'); ?>

theme->display('Name'); ?>

theme->display('Description'); ?>

theme->parent()) { printf('

' . __('This child theme requires its parent theme, %2$s.') . '

', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name')); } ?>
get_contents(dirname(__FILE__) . '/info-html.html'); } // ACTUAL DECLARATION OF SECTIONS $this->sections[] = array( 'title' => __('General Settings', 'czsablony'), 'icon' => 'el-icon-home', // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu! 'fields' => array( array( 'id' => 'czs_logo', 'type' => 'media', 'title' => __('Logo Image', 'czsablony'), 'subtitle' => __('Upload your logo using the Upload Button or insert image URL.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, ), array( 'id' => 'czs_spacing', 'type' => 'spacing', 'output' => array('.header-logo'), 'mode' => 'margin', // absolute, padding, margin, defaults to padding //'top' => false, // Disable the top //'right' => false, // Disable the right //'bottom' => false, // Disable the bottom //'left' => false, // Disable the left //'all' => true, // Have one field that applies to all 'units' => 'px', // You can specify a unit value. Possible: px, em, % 'units_extended' => 'true', // Allow users to select any type of unit //'display_units' => 'true', // Set to false to hide the units if the units are specified 'title' => __('Logo/Title spacing', 'czsablony'), 'subtitle' => __('Set spacing of Logo or theme Title.', 'czsablony'), 'default' => array('margin-top' => '20px', 'margin-right' => "0px", 'margin-bottom' => '20px', 'margin-left' => '0px') ), array( 'id' => 'czs_footer_logo', 'type' => 'media', 'title' => __('Footer Logo Image', 'czsablony'), 'subtitle' => __('Upload your logo (Recommended height 40px) using the Upload Button or insert image URL.', 'czsablony'), 'default' => array( 'url'=> ReduxFramework::$_url.'img/blogger-footer.png' ), ), array( 'id' => 'czs_favicon', 'type' => 'media', 'title' => __('Favicon', 'czsablony'), 'subtitle' => __('Upload a 16 x 16 px image that will represent your website\'s favicon. You can refer to this link for more information on how to make it: http://www.favicon.cc/', 'czsablony'), 'default' => array( 'url'=> ReduxFramework::$_url.'img/favicon.png' ), ), array( 'id' => 'czs_header_code', 'type' => 'textarea', 'title' => __('Header Code', 'czsablony'), 'subtitle' => __('Enter the code which you need to place before closing tag. (ex: Google Webmaster Tools verification, Bing Webmaster Center, BuySellAds Script, Alexa verification etc.)', 'czsablony'), 'validate' => '', ), array( 'id' => 'czs_tracking_code', 'type' => 'textarea', 'title' => __('Tracking Code', 'czsablony'), 'subtitle' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'czsablony'), 'validate' => '', ), array( 'id' => 'czs_copyrights', 'type' => 'editor', 'title' => __('Copyrights Text', 'czsablony'), 'subtitle' => __('You can change from footer and use your own custom text.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => 'Theme by My Themes 4 WP.' ), array( 'id' => 'czs_slider', 'type' => 'switch', 'title' => __('Slider', 'czsablony'), 'subtitle' => __('Enable or Disable Slider on Homepage.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, "default" => 1, ), array( 'id' => 'czs_slider_categories', 'type' => 'select', 'data' => 'categories', 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'title' => __('Select Categories for Slider', 'czsablony'), ), array( 'id' => 'czs_home_title', 'type' => 'slider', 'title' => __('Homepage title length', 'czsablony'), 'subtitle' => __('How many letters you want to display. Default value: 40', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, "default" => "40", "min" => "1", "step" => "1", "max" => "200", ), array( 'id' => 'czs_home_meta_info', 'type' => 'checkbox', 'title' => __('HomePage Post Meta Info', 'czsablony'), 'subtitle' => __('Use this button to Show or Hide Post Meta Info on HomePage. (Author name, Date etc.).', 'czsablony'), 'options' => array('a' => __('Author Name','czsablony'), 'b' => __('Categories','czsablony'), 'c' => __('Comments','czsablony'), 'd' => __('Views','czsablony'), 'e' => __('Sharing Buttons','czsablony')), 'default' => array('a' => '1', 'b' => '1', 'c' => '1', 'd' => '1', 'e' => '1') ), array( 'id' => 'czs_pagenavigation', 'type' => 'radio', 'title' => __('Pagination', 'czsablony'), 'subtitle' => __('Set paginated navigation links.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'options' => array( '1' => __('Next / Previous', 'czsablony'), '2' => __('Numbered(1 2 3 4...)', 'czsablony'), '3' => __('Infinite scroll', 'czsablony'), ), 'default' => '1' ), ), ); $this->sections[] = array( 'icon' => 'el-icon-cogs', 'title' => __('Styling Settings', 'czsablony'), 'fields' => array( array( 'id' => 'czs_layout', 'type' => 'image_select', 'compiler' => true, 'title' => __('Main Layout', 'czsablony'), 'subtitle' => __('Select main content and sidebar alignment. ', 'czsablony'), 'options' => array( '1' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url . 'assets/img/2cl.png'), '2' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'), ), 'default' => '2' ), array( 'id' => 'czs_bg_upload', 'type' => 'background', 'title' => __('Body Background', 'czsablony'), 'subtitle' => __('Body background with image, color, etc.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'background-color' => '#ffffff', ) ), array( 'id' => 'czs_custom_css', 'type' => 'textarea', 'title' => __('Custom CSS', 'czsablony'), 'subtitle' => __('Quickly add some CSS to your theme by adding it to this block.', 'czsablony'), 'desc' => __('Only css allowed!', 'czsablony'), 'validate' => 'css', ), array( 'id' => 'czs_responsive', 'type' => 'switch', 'title' => __('Responsiveness', 'czsablony'), 'subtitle' => __('Enable or Disable template responsiveness.', 'czsablony'), "default" => 1, ) ) ); $this->sections[] = array( 'icon' => 'el-icon-website', 'title' => __('Single Page Options', 'czsablony'), 'fields' => array( array( 'id' => 'czs_tags', 'type' => 'switch', 'title' => __('Tags', 'czsablony'), 'subtitle' => __('Enable or Disable Tags.', 'czsablony'), "default" => 1, ), array( 'id' => 'czs_related_posts', 'type' => 'switch', 'title' => __('Related posts', 'czsablony'), 'subtitle' => __('Enable or Disable Related posts.', 'czsablony'), "default" => 1, ), array( 'id' => 'czs_author_box', 'type' => 'switch', 'title' => __('Author Box', 'czsablony'), 'subtitle' => __('Enable or Disable Author Box.', 'czsablony'), "default" => 1, ), array( 'id' => 'czs_social_box', 'type' => 'switch', 'title' => __('Social share', 'czsablony'), 'subtitle' => __('Enable or Disable share buttons.', 'czsablony'), "default" => 1, ), ) ); /** * Note here I used a 'heading' in the sections array construct * This allows you to use a different title on your options page * instead of reusing the 'title' value. This can be done on any * section - kp */ $this->sections[] = array( 'icon' => 'el-icon-bullhorn', 'title' => __('Ad management', 'czsablony'), 'desc' => __('

Ad management is easy with our options panel.

', 'czsablony'), 'fields' => array( array( 'id' => 'czs_posttop_adcode', 'type' => 'textarea', 'title' => __('Ad Below Post Title', 'czsablony'), 'subtitle' => __('Paste your Adsense, BSA or other ad code here to show ads below the title on single posts.', 'czsablony'), ), array( 'id' => 'czs_postend_adcode', 'type' => 'textarea', 'title' => __('Ad Below Post Content', 'czsablony'), 'subtitle' => __('Paste your Adsense, BSA or other ad code here to show ads below the post content on single posts.', 'czsablony'), ), ) ); $this->sections[] = array( 'icon' => 'el-icon-adjust', 'title' => __('Colors', 'czsablony'), 'fields' => array( array( 'id' => 'czs_link-color', 'type' => 'link_color', 'title' => __('Links Color Option', 'czsablony'), 'subtitle' => __('Select the general liknks color.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'regular' => '#0558ff', 'hover' => '#00c9e8', 'active' => '#3526a8', ) ), array( 'id' => 'czs_main_nav_color', 'type' => 'color_gradient', 'title' => __('Navigation Color', 'czsablony'), 'subtitle' => __('Set background color for the navigation.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array('from' => '#2893ff', 'to' => '#284cff') ), array( 'id' => 'czs_post_background', 'type' => 'color', 'title' => __('Post Background Color', 'czsablony'), 'subtitle' => __('Pick a background color for the theme (default: #fff).', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => '#ffffff', 'validate' => 'color', ), array( 'id' => 'czs_border_color', 'type' => 'color', 'title' => __('Border Color', 'czsablony'), 'subtitle' => __('Set a border colors for the theme.', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => '#a3a3a3', 'validate' => 'color', ), array( 'id' => 'czs_site_background', 'type' => 'color', 'title' => __('Boxed site color', 'czsablony'), 'subtitle' => __('Set color for boxed site or select "transparent" for no color', 'czsablony'), 'desc' => __('Only available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => '#e5e5e5', 'validate' => 'color', ), ) ); $this->sections[] = array( 'icon' => 'el-icon-font', 'title' => __('Typography', 'czsablony'), 'fields' => array( array( 'id' => 'czs_body_typography', 'type' => 'typography', 'title' => __('General font', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('body, .meta-desc, .widget li .meta, .recent-comments .info, .read-more a'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the general font used in the theme.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '14px', 'line-height' => '23px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_header_title', 'type' => 'typography', 'title' => __('Header Logo', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('#header h1, #logo a'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the logo font.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#0558ff", 'font-family' => 'Arial', 'font-size' => '33px', 'line-height' => '35px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_desc_title', 'type' => 'typography', 'title' => __('Site description', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('.description'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the description font.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#333", 'font-family' => 'Arial', 'font-size' => '23px', 'line-height' => '25px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_primary_menu', 'type' => 'typography', 'title' => __('Primary Menu', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('.secondary-navigation a'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the menu font.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#ffffff", 'font-family' => 'Arial', 'font-size' => '16px', 'line-height' => '20px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_title_typography', 'type' => 'typography', 'title' => __('Single/Page Title', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('.title, .title a'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for single or page title.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#333333", 'font-family' => 'Arial', 'font-size' => '20px', 'line-height' => '27px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_sidebar_typography', 'type' => 'typography', 'title' => __('Sidebar Title', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('.widget h3, .related-posts h3, #respond h4, .postauthor h5, .postsby'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for Sidebar title.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#333333", 'font-family' => 'Arial', 'font-size' => '18px', 'line-height' => '26px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h1_typography', 'type' => 'typography', 'title' => __('Headings 1 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h1'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h1.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '28px', 'line-height' => '38px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h2_typography', 'type' => 'typography', 'title' => __('Headings 2 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h2'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h2.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '24px', 'line-height' => '34px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h3_typography', 'type' => 'typography', 'title' => __('Headings 3 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h3'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h3.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '22px', 'line-height' => '32px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h4_typography', 'type' => 'typography', 'title' => __('Headings 4 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h4'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h4.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '20px', 'line-height' => '30px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h5_typography', 'type' => 'typography', 'title' => __('Headings 5 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h5'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h5.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '18px', 'line-height' => '28px', 'letter-spacing'=> '0'), ), array( 'id' => 'czs_h6_typography', 'type' => 'typography', 'title' => __('Headings 6 font ', 'czsablony'), //'compiler'=>true, // Use if you want to hook in your own CSS compiler '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 //'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare //'subsets'=>false, // Only appears if google is true and subsets not set to false //'font-size'=>false, //'line-height'=>false, //'word-spacing'=>true, // Defaults to false 'letter-spacing'=>true, //'color'=>false, 'preview'=>false, // Disable the previewer 'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page 'output' => array('h6'), // An array of CSS selectors to apply this font style to dynamically 'units' => 'px', // Defaults to px 'subtitle' => __('Select the type to use for the h6.', 'czsablony'), 'desc' => __('Live preview is available in BeastIN Pro - ' , 'czsablony') .$pro_url, 'default' => array( 'color' => "#5b5b5b", 'font-family' => 'Arial', 'font-size' => '16px', 'line-height' => '26px', 'letter-spacing'=> '0'), ), ) ); } public function setHelpTabs() { // Custom page help tabs, displayed using the help API. Tabs are shown in order of definition. } /** All the possible arguments for Redux. For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments * */ public function setArguments() { $theme = wp_get_theme(); // For use with some settings. Not necessary. $this->args = array( // TYPICAL -> Change these values as you need/desire 'opt_name' => 'czs_options', // 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' => 'submenu', //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' => __('Blog Options', 'czsablony'), 'page_title' => __('Blog Options', 'czsablony'), // 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' => '', // Must be defined to add google fonts to the typography module 'async_typography' => true, // 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 'global_variable' => 'czs_options', // 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 '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' => '_options', // Page slug used to denote the panel '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! 'system_info' => false, // REMOVE // HINTS 'hints' => array( 'icon' => 'icon-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', ), ), ) ); // Panel Intro text -> before the form if (!isset($this->args['global_variable']) || $this->args['global_variable'] !== false) { if (!empty($this->args['global_variable'])) { $v = $this->args['global_variable']; } else { $v = str_replace("-", "_", $this->args['opt_name']); } $this->args['intro_text'] = sprintf(__('', 'czsablony'), $v); } else { $this->args['intro_text'] = __('', 'czsablony'); } // Add content after the form. $this->args['footer_text'] = __('', 'czsablony'); } } global $reduxConfig; $reduxConfig = new Redux_Framework_sample_config(); } /** 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 '
'; print_r($value); } endif; /** 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; $value = 'just testing'; /* do your validation if(something) { $value = $value; } elseif(something else) { $error = true; $value = $existing_value; $field['msg'] = 'your custom error message'; } */ $return['value'] = $value; if ($error == true) { $return['error'] = $field; } return $return; } endif;