function detheme_redux_init() { global $wp_filesystem; if (empty($wp_filesystem)) { require_once ABSPATH . '/wp-admin/includes/file.php'; WP_Filesystem(); } /** ReduxFramework Sample Config File For full documentation, please visit: https://github.com/ReduxFramework/ReduxFramework/wiki **/ /** Most of your editing will be done in this section. Here you can override default values, uncomment args and change their values. No $args are required, but they can be overridden if needed. **/ $args = array(); // For use with a tab example below $tabs = array(); ob_start(); $ct = wp_get_theme(); $theme_data = $ct; $item_name = $theme_data->get('Name'); $tags = $ct->Tags; $screenshot = $ct->get_screenshot(); $class = $screenshot ? 'has-screenshot' : ''; $customize_title = sprintf(__('Customize “%s”', 'redux-framework'), $ct->display('Name')); ?> <div id="current-theme" class="<?php echo esc_attr($class); ?> "> <?php if ($screenshot) { ?> <?php if (current_user_can('edit_theme_options')) { ?> <a href="<?php echo wp_customize_url(); ?> " class="load-customize hide-if-no-customize" title="<?php echo esc_attr($customize_title); ?> "> <img src="<?php echo esc_url($screenshot); ?> " alt="<?php esc_attr_e('Current theme preview'); ?> " /> </a> <?php } ?> <img class="hide-if-customize" src="<?php echo esc_url($screenshot); ?> " alt="<?php esc_attr_e('Current theme preview'); ?> " /> <?php } ?> <h4> <?php echo $ct->display('Name'); ?> </h4> <div> <ul class="theme-info"> <li><?php printf(__('By %s', 'redux-framework'), $ct->display('Author')); ?> </li> <li><?php printf(__('Version %s', 'redux-framework'), $ct->display('Version')); ?> </li> <li><?php echo '<strong>' . __('Tags', 'redux-framework') . ':</strong> '; printf($ct->display('Tags')); ?> </li> </ul> <p class="theme-description"><?php echo $ct->display('Description'); ?> </p> <?php if ($ct->parent()) { printf(' <p class="howto">' . __('This <a href="%1$s">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework'), $ct->parent()->display('Name')); } ?> </div> </div> <?php $item_info = ob_get_contents(); ob_end_clean(); $sampleHTML = ''; if (file_exists(dirname(__FILE__) . '/info-html.html')) { /** @global WP_Filesystem_Direct $wp_filesystem */ global $wp_filesystem; if (!empty($wp_filesystem)) { $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html'); } } // BEGIN Sample Config // Setting dev mode to true allows you to view the class settings/info in the panel. // Default: true $args['dev_mode'] = false; // Set the icon for the dev mode tab. // If $args['icon_type'] = 'image', this should be the path to the icon. // If $args['icon_type'] = 'iconfont', this should be the icon name. // Default: info-sign //$args['dev_mode_icon'] = 'info-sign'; // Set the class for the dev mode tab icon. // This is ignored unless $args['icon_type'] = 'iconfont' // Default: null //$args['dev_mode_icon_class'] = ''; // Set a custom option name. Don't forget to replace spaces with underscores! $args['opt_name'] = 'krypton_config'; // Setting system info to true allows you to view info useful for debugging. // Default: false //$args['system_info'] = true; // Set the icon for the system info tab. // If $args['icon_type'] = 'image', this should be the path to the icon. // If $args['icon_type'] = 'iconfont', this should be the icon name. // Default: info-sign //$args['system_info_icon'] = 'info-sign'; // Set the class for the system info tab icon. // This is ignored unless $args['icon_type'] = 'iconfont' // Default: null //$args['system_info_icon_class'] = 'icon-large'; $theme = wp_get_theme(); $args['display_name'] = $theme->get('Name'); //$args['database'] = "theme_mods_expanded"; $args['display_version'] = $theme->get('Version'); // If you want to use Google Webfonts, you MUST define the api key. $args['google_api_key'] = 'AIzaSyAX_2L_UzCDPEnAHTG7zhESRVpMPS4ssII'; // Define the starting tab for the option panel. // Default: '0'; //$args['last_tab'] = '0'; // Define the option panel stylesheet. Options are 'standard', 'custom', and 'none' // If only minor tweaks are needed, set to 'custom' and override the necessary styles through the included custom.css stylesheet. // If replacing the stylesheet, set to 'none' and don't forget to enqueue another stylesheet! // Default: 'standard' //$args['admin_stylesheet'] = 'standard'; // Setup custom links in the footer for share icons $args['share_icons']['twitter'] = array('link' => 'http://twitter.com/detheme', 'title' => 'Follow me on Twitter', 'img' => DethemeReduxFramework::$_url . 'assets/img/social/Twitter.png'); $args['share_icons']['facebook'] = array('link' => 'https://www.facebook.com/detheme', 'title' => 'Find me on Facebook', 'img' => DethemeReduxFramework::$_url . 'assets/img/social/Facebook.png'); // Enable the import/export feature. // Default: true $args['show_import_export'] = true; // Set the icon for the import/export tab. // If $args['icon_type'] = 'image', this should be the path to the icon. // If $args['icon_type'] = 'iconfont', this should be the icon name. // Default: refresh //$args['import_icon'] = 'refresh'; // Set the class for the import/export tab icon. // This is ignored unless $args['icon_type'] = 'iconfont' // Default: null //$args['import_icon_class'] = ''; /** * Set default icon class for all sections and tabs * @since 3.0.9 */ //$args['default_icon_class'] = ''; // Set a custom menu icon. //$args['menu_icon'] = ''; // Set a custom title for the options page. // Default: Options $args['menu_title'] = __('Krypton Options', 'redux-framework'); // Set a custom page title for the options page. // Default: Options $args['page_title'] = __('Options', 'redux-framework'); // Set a custom page slug for options page (wp-admin/themes.php?page=***). // Default: redux_options $args['page_slug'] = 'redux_options'; $args['default_show'] = true; $args['default_mark'] = '*'; // Add HTML before the form. $args['intro_text'] = $args['menu_title']; $sections = array(); //Background Patterns Reader $sample_patterns_path = DethemeReduxFramework::$_dir . '../sample/patterns/'; $sample_patterns_url = DethemeReduxFramework::$_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); } } } } $dt_theme_images = substr_replace(DethemeReduxFramework::$_url, 'images', strpos(DethemeReduxFramework::$_url, 'redux-framework')); $sections[] = array('title' => __('Homepage Settings', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'icon' => 'el-icon-home', 'fields' => array(array('id' => 'showmenu', 'type' => 'switch', 'title' => __('Always Show Top Menu', 'redux-framework'), 'subtitle' => __('Always show top menu on homepage', 'redux-framework'), "default" => 0, 'on' => __('Yes', 'redux-framework'), 'off' => __('No', 'redux-framework')), array('id' => 'showslide', 'type' => 'switch', 'title' => __('Slide Show', 'redux-framework'), 'subtitle' => __('Show main slide show on homepage', 'redux-framework'), "default" => 1, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'homeslide', 'type' => 'slides', 'title' => __('Slides Options', 'redux-framework'), 'subtitle' => __('Unlimited slides with drag and drop sortings.', 'redux-framework'), 'placeholder' => array('title' => "This is the title", 'description' => "Description here", 'url' => "Link", 'label' => "Button Label"), 'desc' => __('This field will store all slides values into a multidimensional array to use into a foreach loop.', 'redux-framework')))); $sections[] = array('icon' => 'el-icon-cogs', 'title' => __('General Settings', 'redux-framework'), 'fields' => array(array('id' => 'layout', 'type' => 'image_select', 'compiler' => true, 'title' => __('Main Layout', 'redux-framework'), 'subtitle' => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'redux-framework'), 'options' => array('1' => array('alt' => '1 Column', 'img' => DethemeReduxFramework::$_url . 'assets/img/1col.png'), '2' => array('alt' => '2 Column Left', 'img' => DethemeReduxFramework::$_url . 'assets/img/2cl.png'), '3' => array('alt' => '2 Column Right', 'img' => DethemeReduxFramework::$_url . 'assets/img/2cr.png')), 'default' => '2'), array('id' => 'dt-logo-image', 'type' => 'media', 'title' => __('Desktop Logo', 'redux-framework'), 'compiler' => true, 'desc' => __('Set logo image.', 'redux-framework'), 'subtitle' => __('Logo for desktop screen. Will be displayed half of its original size (retina)', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/krypton_logo.png')), array('id' => 'dt-mobile-logo-image', 'type' => 'media', 'title' => __('Mobile Logo', 'redux-framework'), 'compiler' => true, 'desc' => __('Set logo image.', 'redux-framework'), 'subtitle' => __('Logo for mobile screen. Will be displayed half of its original size (retina)', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/krypton_logo.png')), array('id' => 'dt-favicon-image', 'type' => 'media', 'title' => __('Favicon Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set favicon image. Upload your image (.png,.ico, .jpg) with size 16x16 pixel', 'redux-framework'), 'default' => array('url' => '')), array('id' => 'dt-display-header', 'type' => 'switch', 'title' => __('Display header ?', 'redux-framework'), 'subtitle' => __('If "On", the header will be displayed. If "Off", the header will be hidden', 'redux-framework'), "default" => 1), array('id' => 'dt-banner-height', 'type' => 'text', 'title' => __('Banner Height', 'redux-framework'), 'subtitle' => __('Adjust the banner height (in pixel)', 'redux-framework'), 'class' => 'width_100', 'default' => '285px'), array('id' => 'dt-banner-image', 'type' => 'media', 'title' => __('Default Header Banner Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set default banner image.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/header_subpage_bg.jpg')), array('id' => 'dt-use-default-banner-single-page', 'type' => 'switch', 'title' => __('Use Default Banner Image on Single Post/Page ?', 'redux-framework'), 'subtitle' => __('If "On", the below Default Single Page Banner Image will be displayed. If "Off" and the featured image is empty, No banner will be displayed', 'redux-framework'), "default" => 1), array('id' => 'dt-banner-single-page', 'type' => 'media', 'title' => __('Default Single Post/Page Banner Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set default banner image for single post/page.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/banner_single_post.jpg')), array('id' => 'dt-content-top-margin', 'type' => 'text', 'title' => __('Content Top Margin', 'redux-framework'), 'subtitle' => __('Adjust the content top margin (in pixel)', 'redux-framework'), 'class' => 'width_100', 'default' => '80px'), array('id' => 'dt-select-modal-effects', 'type' => 'select', 'title' => __('Image Gallery Modal Effects Option', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'options' => array('md-effect-1' => 'Effect 1: Fade in and scale up', 'md-effect-2' => 'Effect 2: Slide from the right', 'md-effect-3' => 'Effect 3: Slide from the bottom', 'md-effect-4' => 'Effect 4: Newspaper', 'md-effect-5' => 'Effect 5: Fall', 'md-effect-6' => 'Effect 6: Side fall', 'md-effect-7' => 'Effect 7: Slide and stick to top', 'md-effect-8' => 'Effect 8: 3D flip horizontal', 'md-effect-9' => 'Effect 9: 3D flip vertical', 'md-effect-10' => 'Effect 10: 3D sign', 'md-effect-11' => 'Effect 11: Super scaled', 'md-effect-12' => 'Effect 12: Just me', 'md-effect-13' => 'Effect 13: 3D slit', 'md-effect-14' => 'Effect 14: 3D Rotate from bottom', 'md-effect-15' => 'Effect 15: 3D Rotate in from left (Default)', 'md-effect-16' => 'Effect 16: Blur', 'md-effect-17' => 'Effect 17: Slide in from bottom with perspective on container', 'md-effect-18' => 'Effect 18: Slide from right with perspective on container', 'md-effect-19' => 'Effect 19: Slip in from the top with perspective on container')), array('id' => 'showsearchmenu', 'type' => 'switch', 'title' => __('Search Bar', 'redux-framework'), 'subtitle' => __('Search bar on main navigation', 'redux-framework'), "default" => 1, 'on' => __('Show', 'redux-framework'), 'off' => __('Hide', 'redux-framework')), array('id' => 'dt-comment-open', 'type' => 'switch', 'title' => __('Comment Post/Portfolio', 'redux-framework'), 'subtitle' => __('If "Off", comment disable for allpage as default ', 'redux-framework'), "default" => 1), array('id' => 'dt-404-text', 'type' => 'textarea', 'title' => __('404 Error Text', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => 'It\'s looking like you may have taken a wrong turn. Don\'t worry...it happens to the most of us.', 'validate' => 'html'), array('id' => 'dt-404-image', 'type' => 'media', 'title' => __('404 Error Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set 404 Error Image.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework')), array('id' => 'dt-contact-form-email', 'type' => 'text', 'title' => __('Contact Form Email Destination', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'validate' => 'email', 'msg' => 'custom error message', 'default' => '*****@*****.**'))); include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (is_plugin_active('woocommerce/woocommerce.php')) { $sections[] = array('icon' => 'el-icon-shopping-cart', 'title' => __('Shop Settings', 'redux-framework'), 'fields' => array(array('id' => 'dt-shop-banner-image', 'type' => 'media', 'title' => __('Default Shop Banner Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set default shop banner image.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/banner_detail_product.jpg')), array('id' => 'show-shop-slide', 'type' => 'switch', 'title' => __('Shop Slideshow', 'redux-framework'), 'subtitle' => __('Slide show on shop page or other.<br/>To embed shop slideshow on regular page put the shortcode [shopslider]', 'redux-framework'), "default" => 0, 'on' => __('Yes', 'redux-framework'), 'off' => __('No', 'redux-framework')), array('id' => 'shopslide', 'type' => 'shopslides', 'title' => __('Slides Options', 'redux-framework'), 'subtitle' => __('Unlimited slides with drag and drop sortings.', 'redux-framework'), 'placeholder' => array('title' => "This is the title", 'description' => "Description here", 'url' => "Link", 'label' => "Button Label"), 'desc' => __('This field will store all slides values into a multidimensional array to use into a foreach loop.', 'redux-framework')), array('id' => 'product-price-abbrevi', 'type' => 'text', 'title' => __('Number Prefixes ( price )', 'redux-framework'), 'subtitle' => __('Product price will shorten using prefix.', 'redux-framework'), 'placeholder' => array(), 'options' => array('thousand' => __('Thousands', 'redux-framework'), 'million' => __('Millions', 'redux-framework'), 'billion' => __('Billions', 'redux-framework'), 'trillion' => __('Trillions', 'redux-framework')), 'default' => array('thousand' => __('K', 'redux-framework'), 'million' => __('M', 'redux-framework'), 'billion' => __('B', 'redux-framework'), 'trillion' => __('T', 'redux-framework'))))); } $sections[] = array('icon' => 'el-icon-map-marker', 'title' => __('Map Settings', 'redux-framework'), 'fields' => array(array('id' => 'map-address', 'type' => 'text', 'title' => __('Address', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => 'Jl. Pahlawan no. 10'), array('id' => 'map-phone', 'type' => 'text', 'title' => __('Phone Number', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => '+62 7457821'), array('id' => 'map-email', 'type' => 'text', 'title' => __('Email', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'validate' => 'email', 'msg' => 'please enter valid email address', 'default' => '*****@*****.**'), array('id' => 'map-latitude', 'type' => 'text', 'title' => __('Google Map Latitude', 'redux-framework'), 'subtitle' => __('This must be numeric.', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'validate' => 'numeric', 'default' => '0'), array('id' => 'map-longitude', 'type' => 'text', 'title' => __('Google Map Longitude', 'redux-framework'), 'subtitle' => __('This must be numeric.', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'validate' => 'numeric', 'default' => '0'), array('id' => 'map-zoom-level', 'type' => 'select', 'title' => __('Google Map Zoom Level', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'options' => array('3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20', '21' => '21'), 'default' => '15'), array('id' => 'map-circle-number', 'type' => 'text', 'title' => __('Number (Circle)', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => '27'), array('id' => 'map-circle-address', 'type' => 'text', 'title' => __('Address (Circle)', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => 'Jl. Pahlawan'), array('id' => 'map-circle-city', 'type' => 'text', 'title' => __('City (Circle)', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => 'Surabaya'), array('id' => 'map-circle-zipcode', 'type' => 'text', 'title' => __('ZIP Code (Circle)', 'redux-framework'), 'subtitle' => __('', 'redux-framework'), 'default' => '60217'), array('id' => 'map-image', 'type' => 'media', 'title' => __('Map Background Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set map background image.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework'), 'default' => array('url' => $dt_theme_images . '/aerial_view.jpg')))); $sections[] = array('icon' => 'el-icon-website', 'title' => __('Styling Options', 'redux-framework'), 'fields' => array(array('id' => 'main-color', 'type' => 'color_nocheck', 'output' => array('.site-title'), 'title' => __('Main Color', 'redux-framework'), 'subtitle' => __('Pick a background color for the theme (default: #1abc9c).', 'redux-framework'), 'default' => '#1abc9c', 'validate' => 'color'), array('id' => 'primary-font', 'type' => 'typography', 'title' => __('Primary Font', 'redux-framework'), 'subtitle' => __('Specify the primary font properties.', 'redux-framework'), 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'color' => false, 'google' => true, 'line-height' => false, 'default' => array('font-family' => 'Open Sans')), array('id' => 'secondary-font', 'type' => 'typography', 'title' => __('Secondary Font', 'redux-framework'), 'subtitle' => __('Specify the secondary font properties.', 'redux-framework'), 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'color' => false, 'google' => true, 'line-height' => false, 'default' => array('font-family' => 'Lora')))); $sections['footer'] = array('title' => __('Footer', 'redux-framework'), 'icon' => 'el-icon-fork', 'fields' => array(array('id' => 'showfooterarea', 'type' => 'switch', 'title' => __('Footer', 'redux-framework'), 'subtitle' => __('Enable or Disable footer', 'redux-framework'), "default" => 1, 'on' => __('On', 'redux-framework'), 'off' => __('Off', 'redux-framework')), array('id' => 'footer-text', 'type' => 'editor', 'title' => __('Footer Text', 'redux-framework'), 'subtitle' => __('You can use the following shortcodes in your footer text: [wp-url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] [current-year]', 'redux-framework'), 'default' => '© [current-year] DeTheme, The Awesome Theme. All right reserved.'), array('id' => 'dt-background-footer', 'type' => 'media', 'title' => __('Footer Background Image', 'redux-framework'), 'compiler' => true, 'desc' => __('Set Footer Background Image.', 'redux-framework'), 'subtitle' => __('Upload any media using the WordPress native uploader', 'redux-framework')), array('id' => 'showfooterpage', 'type' => 'switch', 'title' => __('Post Footer', 'redux-framework'), 'subtitle' => __('Enable or Disable pre and post footer area', 'redux-framework'), "default" => 1, 'on' => __('On', 'redux-framework'), 'off' => __('Off', 'redux-framework')), array('id' => 'postfooterpage', 'type' => 'select', 'title' => __('Post Footer Page', 'redux-framework'), 'subtitle' => __('Select page for the post footer', 'redux-framework'), 'data' => 'pages', 'description' => '<a class="btn button" href="' . admin_url('post-new.php?post_type=page', 'relative') . '" target="_blank">' . __('Create New Page', 'redux-framework') . '</a>'))); $sections['advance'] = array('icon' => 'el-icon-wrench-alt', 'title' => __('Advanced Settings', 'redux-framework'), 'desc' => __('', 'redux-framework'), 'fields' => array(array('id' => 'sandbox-mode', 'type' => 'switch', 'title' => __('Development Mode', 'redux-framework'), 'subtitle' => __('Please activate this option during development stage', 'redux-framework'), 'description' => __('Few webhosts cached CSS file that causes Theme Option unresponsive', 'redux-framework'), "default" => 0, 'on' => __('On', 'redux-framework'), 'off' => __('Off', 'redux-framework')), array('id' => 'disable_automatic_update', 'type' => 'switch', 'title' => __('Automatic Update', 'redux-framework'), "default" => 1, 'on' => __('On', 'redux-framework'), 'off' => __('Off', 'redux-framework')), array('id' => 'core_automatic_update', 'type' => 'radio', 'title' => __('WP Core Automatic Update', 'redux-framework'), "default" => 'false', 'options' => array('true' => __('Enable', 'redux-framework'), 'minor' => __('Minor Update Only', 'redux-framework'), 'false' => __('Disable', 'redux-framework'))), array('id' => 'css-code', 'type' => 'ace_editor', 'title' => __('CSS Code', 'redux-framework'), 'subtitle' => __('Paste your CSS code here.', 'redux-framework'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => 'Your css code will saving at /css/customstyle.css ', 'default' => "body{\nheight: 100%;\n}"), array('id' => 'js-code', 'type' => 'ace_editor', 'title' => __('JS Code', 'redux-framework'), 'subtitle' => __('Paste your JS code here. JS Code loaded on end of page', 'redux-framework'), 'mode' => 'javascript', 'theme' => 'chrome', 'desc' => 'Be careful!', 'default' => "jQuery(document).ready(function(){\n\n});"))); if (function_exists('wp_get_theme')) { $theme_data = wp_get_theme(); $theme_uri = $theme_data->get('ThemeURI'); $description = $theme_data->get('Description'); $author = $theme_data->get('Author'); $version = $theme_data->get('Version'); $tags = $theme_data->get('Tags'); } else { $theme_data = wp_get_theme(trailingslashit(get_stylesheet_directory()) . 'style.css'); $theme_uri = $theme_data['URI']; $description = $theme_data['Description']; $author = $theme_data['Author']; $version = $theme_data['Version']; $tags = $theme_data['Tags']; } $theme_info = '<div class="redux-framework-section-desc">'; $theme_info .= '<p class="redux-framework-theme-data description theme-uri">' . __('<strong>Theme URL:</strong> ', 'redux-framework') . '<a href="' . $theme_uri . '" target="_blank">' . $theme_uri . '</a></p>'; $theme_info .= '<p class="redux-framework-theme-data description theme-author">' . __('<strong>Author:</strong> ', 'redux-framework') . $author . '</p>'; $theme_info .= '<p class="redux-framework-theme-data description theme-version">' . __('<strong>Version:</strong> ', 'redux-framework') . $version . '</p>'; $theme_info .= '<p class="redux-framework-theme-data description theme-description">' . $description . '</p>'; if (!empty($tags)) { $theme_info .= '<p class="redux-framework-theme-data description theme-tags">' . __('<strong>Tags:</strong> ', 'redux-framework') . implode(', ', $tags) . '</p>'; } $theme_info .= '</div>'; global $wp_filesystem; if (file_exists(dirname(__FILE__) . '/README.md')) { $sections['theme_docs'] = array('icon' => DethemeReduxFramework::$_url . 'assets/img/glyphicons/glyphicons_071_book.png', 'title' => __('Documentation', 'redux-framework'), 'fields' => array(array('id' => '17', 'type' => 'raw', 'content' => $wp_filesystem->get_contents(dirname(__FILE__) . '/README.md')))); } //if $sections[] = array('icon' => 'el-icon-info-sign', 'title' => __('Theme Information & Update', 'redux-framework'), 'desc' => __('<p class="description">The Awesome Wordpress Theme by detheme</p>', 'redux-framework'), 'fields' => array(array('title' => __('Purchase Number', 'redux-framework'), 'id' => 'detheme_license', 'type' => 'text', 'content' => '', 'desc' => __('Purchase number from themeforest.net. ex: 24c0d3f0-65e6-48b4-c642-548b04ea1d0c', 'redux-framework')), array('id' => 'raw_new_info', 'type' => 'raw', 'content' => $item_info))); if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) { $tabs['docs'] = array('icon' => 'el-icon-book', 'title' => __('Documentation', 'redux-framework'), 'content' => nl2br($wp_filesystem->get_contents(trailingslashit(dirname(__FILE__)) . 'README.html'))); } global $DethemeReduxFramework; $DethemeReduxFramework = new DethemeReduxFramework(); $DethemeReduxFramework->__render($sections, $args, $tabs); // END Sample Config }
static function init() { // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester self::$_dir = trailingslashit(str_replace(array('\\', '//'), array('/', '/'), dirname(__FILE__))); $wp_content_dir = trailingslashit(str_replace(array('\\', '//'), array('/', '/'), WP_CONTENT_DIR)); $relative_url = str_replace($wp_content_dir, '', self::$_dir); $wp_content_url = is_ssl() ? str_replace('http://', 'https://', WP_CONTENT_URL) : WP_CONTENT_URL; self::$_url = trailingslashit($wp_content_url) . $relative_url; /** Still need to port these. $defaults['footer_credit'] = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . self::$_version . '</span>'; $defaults['help_tabs'] = array(); $defaults['help_sidebar'] = ''; // __( '', 'redux-framework' ); $defaults['database'] = ''; // possible: options, theme_mods, theme_mods_expanded, transient $defaults['customizer'] = false; // setting to true forces get_theme_mod_expanded $defaults['global_variable'] = ''; $defaults['output'] = true; // Dynamically generate CSS $defaults['transient_time'] = 60 * MINUTE_IN_SECONDS; // The defaults are set so it will preserve the old behavior. $defaults['default_show'] = false; // If true, it shows the default value $defaults['default_mark'] = ''; // What to print by the field's title if the value shown is default **/ self::$_properties = array('args' => array('opt_name' => array('required', 'data_type' => 'string', 'label' => 'Option Name', 'desc' => 'Must be defined by theme/plugin. Is the unique key allowing multiple instance of Redux within a single Wordpress instance.', 'default' => ''), 'google_api_key' => array('data_type' => 'string', 'label' => 'Google Web Fonts API Key', 'desc' => 'Key used to request Google Webfonts. Google fonts are omitted without this.', 'default' => ''), 'last_tab' => array('data_type' => 'string', 'label' => 'Last Tab', 'desc' => 'Last tab used.', 'default' => '0'), 'menu_icon' => array('data_type' => 'string', 'label' => 'Default Menu Icon', 'desc' => 'Default menu icon used by sections when one is not specified.', 'default' => self::$_url . 'assets/img/menu_icon.png'), 'menu_title' => array('data_type' => 'string', 'label' => 'Menu Title', 'desc' => 'Label displayed when the admin menu is available.', 'default' => __('Options', 'redux-framework')), 'page_title' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Title used on the panel page.', 'default' => __('Options', 'redux-framework')), 'page_icon' => array('data_type' => 'string', 'label' => 'Page Title', 'desc' => 'Icon class to be used on the options page.', 'default' => 'icon-themes'), 'page_slug' => array('required', 'data_type' => 'string', 'label' => 'Page Slug', 'desc' => 'Slug used to access options panel.', 'default' => '_options'), 'page_cap' => array('required', 'data_type' => 'string', 'label' => 'Page Capabilities', 'desc' => 'Permissions needed to access the options panel.', 'default' => 'manage_options'), 'page_type' => array('required', 'data_type' => 'varchar', 'label' => 'Page Type', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'menu', 'form' => array('type' => 'select', 'options' => array('menu' => 'Admin Menu', 'submenu' => 'Submenu Only')), 'validation' => array('required')), 'page_parent' => array('required', 'data_type' => 'varchar', 'label' => 'Page Parent', 'desc' => 'Specify if the admin menu should appear or not.', 'default' => 'themes.php', 'form' => array('type' => 'select', 'options' => array('index.php' => 'Dashboard', 'edit.php' => 'Posts', 'upload.php' => 'Media', 'link-manager.php' => 'Links', 'edit.php?post_type=page' => 'pages', 'edit-comments.php' => 'Comments', 'themes.php' => 'Appearance', 'plugins.php' => 'Plugins', 'users.php' => 'Users', 'tools.php' => 'Tools', 'options-general.php' => 'Settings')), 'validation' => array('required')), 'page_position' => array('type' => 'int', 'label' => 'Page Position', 'desc' => 'Location where this menu item will appear in the admin menu. Warning, beware of overrides.', 'default' => null), 'enqueue' => array('required', 'data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Enqueue Files', 'desc' => 'Global shut-off for custom CSS enqueuing by the framework', 'default' => true), 'allow_sub_menu' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Allow Submenu', 'desc' => 'Turn on or off the submenu that will typically be shown under Appearance.', 'default' => true), 'show_import_export' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Show', false => 'Hide')), 'label' => 'Show Import/Export', 'desc' => 'Show/Hide the import/export tab.', 'default' => true), 'dev_mode' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'Developer Mode', 'desc' => 'Turn on or off the dev mode tab.', 'default' => false), 'system_info' => array('data_type' => 'bool', 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')), 'label' => 'System Info', 'desc' => 'Turn on or off the system info tab.', 'default' => false))); do_action('redux/loaded'); }