本文整理汇总了PHP中Redux::setArgs方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux::setArgs方法的具体用法?PHP Redux::setArgs怎么用?PHP Redux::setArgs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux
的用法示例。
在下文中一共展示了Redux::setArgs方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_options
static function add_options()
{
$opt_name = "webidia_framework_opts";
$args = array('opt_name' => $opt_name, 'use_cdn' => TRUE, 'display_name' => 'Webidia Framework Options', 'display_version' => FALSE, 'page_title' => 'Webidia Framework Options', 'update_notice' => TRUE, 'intro_text' => '', 'footer_text' => '', 'menu_type' => 'submenu', 'allow_sub_menu' => TRUE, 'menu_title' => 'Options', 'page_parent' => 'webidia-framework', 'customizer' => TRUE, 'admin_bar' => FALSE, 'dev_mode' => FALSE, 'default_mark' => '*', 'hints' => array('icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light'), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('duration' => '500', 'event' => 'mouseover'), 'hide' => array('duration' => '500', 'event' => 'mouseleave unfocus'))), 'output' => TRUE, 'output_tag' => TRUE, 'settings_api' => TRUE, 'cdn_check_time' => '1440', 'compiler' => TRUE, 'page_permissions' => 'manage_options', 'save_defaults' => TRUE, 'show_import_export' => TRUE, 'database' => 'options', 'transient_time' => '3600', 'network_sites' => TRUE);
Redux::setArgs($opt_name, $args);
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'admin_folder'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'admin_folder')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'admin_folder'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'admin_folder')));
Redux::setHelpTab($opt_name, $tabs);
$content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'admin_folder');
Redux::setHelpSidebar($opt_name, $content);
Redux::setSection($opt_name, array('title' => __('Plugins', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-adjust-alt', 'fields' => array(array('id' => 'wf_options_general_basic_smoothscroll', 'type' => 'switch', 'title' => __('Smooth Scroll', 'webidia_framework'), 'subtitle' => __('', 'webidia_framework'), 'default' => true, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'wf_options_general_basic_animations', 'type' => 'switch', 'title' => __('Animations', 'webidia_framework'), 'subtitle' => __('', 'webidia_framework'), 'default' => true, 'on' => 'Enabled', 'off' => 'Disabled'))));
Redux::setSection($opt_name, array('title' => __('Page Builder', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-adjust-alt', 'fields' => array(array('id' => 'disable_spb', 'type' => 'button_set', 'title' => __('Webidia Page Builder', 'webidiaframework'), 'subtitle' => __('Enable/Disable the Webidia Page Builder functionality with this option.', 'webidiaframework'), 'desc' => '', 'options' => array('1' => 'Disabled', '0' => 'Enabled'), 'default' => '0'), array('id' => 'spb-post-types', 'type' => 'select', 'data' => 'post_types', 'multi' => true, 'default' => array('page', 'post', 'portfolio', 'team', 'spb-section'), 'title' => __('Page Builder Post Types', 'webidiaframework'), 'desc' => __('Select here which post types you would like to enable the page builder for.', 'webidiaframework')))));
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-1'));
Redux::setSection($opt_name, array('title' => __('Webidia Slider', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-website', 'fields' => array(array('id' => 'disable_ss', 'type' => 'button_set', 'title' => __('Webidia Slider', 'webidiaframework'), 'subtitle' => __('Enable/Disable the Webidia Slider functionality with this option.', 'webidiaframework'), 'desc' => '', 'options' => array('1' => 'Disabled', '0' => 'Enabled'), 'default' => '0'))));
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-2'));
Redux::setSection($opt_name, array('title' => __('Custom Post Types', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-view-mode', 'fields' => array(array('id' => 'cpt-disable', 'type' => 'checkbox', 'title' => __('Disable Custom Post Types', 'webidiaframework'), 'subtitle' => __('You can disable the custom post types used within the theme here, by checking the corresponding box. NOTE: If you do not want to disable any, then make sure none of the boxes are checked.', 'webidiaframework'), 'options' => array('portfolio' => 'Portfolio', 'galleries' => 'Galleries', 'team' => 'Team', 'clients' => 'Clients', 'testimonials' => 'Testimonials', 'directory' => 'Directory', 'faqs' => 'FAQ', 'spb-section' => 'SPB Section'), 'default' => array('portfolio' => '0', 'galleries' => '0', 'team' => '0', 'clients' => '0', 'testimonials' => '0', 'directory' => '0', 'webidia-slider' => '0')))));
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-3'));
Redux::setSection($opt_name, array('title' => __('Performance', 'webidia-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-fire', 'fields' => array(array('id' => 'enable_min_styles', 'type' => 'button_set', 'title' => __('Load pre-minified stylesheets', 'webidia-builder'), 'subtitle' => __('Enable this option to load pre-minified stlysheets, for faster page speed.', 'webidia-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'), array('id' => 'enable_min_scripts', 'type' => 'button_set', 'title' => __('Load pre-minified scripts', 'webidia-builder'), 'subtitle' => __('Enable this option to load pre-minified scripts, for faster page speed.', 'webidia-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'))));
}
示例2: setArgs
private function setArgs()
{
$args = array('opt_name' => $this->opt_name, 'display_name' => 'Redux Notice Editor', 'menu_type' => 'menu', 'allow_sub_menu' => true, 'menu_title' => __('Redux Notice Editor', 'redux-framework-demo'), 'page_title' => __('Redux Notice Editor', 'redux-framework-demo'), 'google_api_key' => '1', 'async_typography' => false, 'admin_bar' => true, 'global_variable' => '', 'dev_mode' => false, 'customizer' => true, 'page_priority' => null, 'page_parent' => 'themes.php', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'redux_notice_admin', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => false, 'open_expanded' => false, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'database' => '', 'system_info' => false, 'update_notice' => false, 'font_control' => false, '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'))));
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
$args['share_icons'][] = array('url' => 'https://github.com/reduxframework/redux-framework', 'title' => 'GitHub', 'icon' => 'el el-github');
$args['share_icons'][] = array('url' => 'https://www.facebook.com/reduxframework', 'title' => 'Facebook', 'icon' => 'el el-facebook');
$args['share_icons'][] = array('url' => 'http://twitter.com/reduxframework', 'title' => 'Twitter', 'icon' => 'el el-twitter');
// 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'] = '';
// 'Redux Extension demonstrations. For a complete list of Redux extensions, please visit the <a href="http://reduxframework.com/extensions/">Redux Extensions page</a>.';
} 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>', 'redux-framework-demo');
}
// Add content after the form.
//$args['footer_text'] = '<center>You are currently viewing demos of the Redux Color Scheme, Social Profiles, Date/Time Picker, Spectrum Color Picker, CSS Layout, Multi Media Selector, and JS Button extensions.<br/>Like what you see? Click a link to purchase: <a href="http://reduxframework.com/extension/color-schemes" title="Color Schemes" target="_blank">Color Schemes</a> | <a href="http://reduxframework.com/extension/social-profiles" title="Social Profiles" target="_blank">Social Profiles</a> | <a href="http://reduxframework.com/extension/date-time-picker" title="Date/Time Picker" target="_blank">Date/Time Picker</a> | <a href="http://reduxframework.com/extension/spectrum-color-picker" title="Spectrum Color Picker" target="_blank">Spectrum Color Picker</a> | <a href="http://reduxframework.com/extension/css-layout" title="CSS Layout" target="_blank">CSS Layout</a> | <a href="http://reduxframework.com/extension/multi-media" title="Multi Media Selector" target="_blank">Multi Media Selector</a> | <a href="http://reduxframework.com/extension/js-button" title="JS Button" target="_blank">JS Button</a> </center>';
//$args = apply_filters( "extensions/args", $args );
Redux::setArgs($this->opt_name, $args);
}
示例3: str_replace
);
*/
// 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>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'shopstyler-plugin'), $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>', 'shopstyler-plugin');
}
// Add content after the form.
$args['footer_text'] = __('<p>This text is displayed below the options panel. It isn\'t required, but more info is always better! The footer_text field accepts all HTML.</p>', 'shopstyler-plugin');
Redux::setArgs($opt_name, $args);
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('General Settings', 'shopstyler-plugin'), 'content' => __('
<p>Enable ShopStyler and general settings</p>
<table>
<tr>
<td>Enable ShopStyler</td>
<td>activate ShopStyler customizer</td>
</tr>
<tr>
<td>Set Shop as homepage</td>
示例4: init
public function init()
{
Redux::setArgs($this->opt_name, $this->args);
$sections = $this->addSections();
Redux::setSections($this->opt_name, $sections);
}
示例5: wp_get_theme
}
}
}
/* -----------------------------------------------------------------------------
* Prepare Options
* -------------------------------------------------------------------------- */
$theme = wp_get_theme();
$vw_opt_name = 'vw_presso';
$help_html = '<a href="http://envirra.com/themes/presso/document/" target="_blank"><img src="' . VW_CONST_REDUX_ASSET_URL . '/help-documentation.png"></a>';
$help_html .= '<a href="http://envirra.com/themes/presso/document/#troubleshooting" target="_blank"><img src="' . VW_CONST_REDUX_ASSET_URL . '/help-troubleshooting.png"></a>';
$help_html .= '<a href="http://themeforest.net/user/envirra/portfolio?ref=envirra" target="_blank"><img src="' . VW_CONST_REDUX_ASSET_URL . '/help-more-themes.png"></a>';
$args = array('opt_name' => $vw_opt_name, 'display_name' => $theme->get('Name'), 'display_version' => $theme->get('Version'), 'menu_type' => 'menu', 'allow_sub_menu' => true, 'menu_title' => 'Theme Options', 'page_title' => 'Theme Options', 'google_api_key' => 'AIzaSyCNyDK8sPUuf9bTcG1TdFFLAVUfA1IDm38', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => true, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => '', 'dev_mode' => false, 'update_notice' => false, 'customizer' => true, 'page_priority' => null, 'page_parent' => 'themes.php', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'vw_theme_options', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'database' => '', 'system_info' => false, 'hints' => array('icon' => 'el el-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light', 'shadow' => true, 'rounded' => false, 'style' => ''), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('effect' => 'slide', 'duration' => '500', 'event' => 'mouseover'), 'hide' => array('effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave'))));
if (!class_exists('Redux')) {
return;
}
Redux::setArgs($vw_opt_name, $args);
/**
General
*/
Redux::setSection($vw_opt_name, array('title' => 'General', 'id' => 'vw-options-general', 'desc' => '', 'icon' => 'el el-website', 'fields' => array(array('id' => 'theme_info_1', 'type' => 'raw', 'content' => $help_html), array('id' => 'site_enable_open_graph', 'type' => 'switch', 'title' => 'Enable Facebook Open Graph Supports', 'default' => 1), array('id' => 'site_enable_rtl', 'type' => 'switch', 'title' => 'Enable RTL Supports', 'subtitle' => 'Enabling this option, The site will be shown in RTL direction.', 'default' => 0), array('id' => 'site_enable_post_box_effects', 'type' => 'switch', 'title' => 'Enable Fly-in Effects for Post', 'default' => 1), array('id' => 'site_enable_meta_description', 'type' => 'switch', 'title' => 'Enable Meta Description', 'subtitle' => 'You can disable the meta description tag when using the SEO plugin like Yoast', 'default' => 1), array('id' => 'tracking_code', 'type' => 'ace_editor', 'theme' => 'monokai', 'mode' => 'html', 'title' => 'Tracking Code', 'subtitle' => 'Enter your Google Analytics Code or other tracking code. The code must including <strong><script></strong> tag.'))));
/**
Site
*/
Redux::setSection($vw_opt_name, array('title' => 'Site', 'desc' => '', 'id' => 'vw-options-site', 'icon' => 'el el-home', 'fields' => array(array('id' => 'site_layout', 'type' => 'select', 'title' => 'Site Layout', 'subtitle' => 'Select the site layout.', 'options' => array('full-medium' => 'Full-Page (970px Wide)', 'full-large' => 'Full-Page (1200px Wide)', 'boxed' => 'Boxed'), 'default' => 'boxed'))));
Redux::setSection($vw_opt_name, array('title' => 'Site Header', 'desc' => '', 'id' => 'vw-options-site-header', 'subsection' => true, 'fields' => array(array('id' => 'header_layout', 'type' => 'select', 'title' => 'Site Header Layout', 'subtitle' => 'Select a site header style.', 'default' => 'left-logo', 'options' => array('left-logo' => 'Left Logo', 'center-logo' => 'Centered Logo')))));
Redux::setSection($vw_opt_name, array('title' => 'Header Ads', 'desc' => 'Insert Ads on site header. The ads will be displayed depends on width of screen.', 'id' => 'vw-options-site-header-ads', 'subsection' => true, 'fields' => array(array('id' => 'header_ads_code', 'type' => 'ace_editor', 'theme' => 'monokai', 'mode' => 'html', 'title' => 'Header Ads Code'))));
Redux::setSection($vw_opt_name, array('title' => 'Site Footer', 'desc' => '', 'id' => 'vw-options-site-footer', 'subsection' => true, 'fields' => array(array('id' => 'copyright_text', 'type' => 'textarea', 'title' => 'Copyright', 'subtitle' => 'Enter copyright text', 'default' => 'Copyright ©, All Rights Reserved.'))));
/**
Blog/Archive
*/
Redux::setSection($vw_opt_name, array('title' => 'Blog / Archive', 'desc' => '', 'id' => 'vw-options-blog', 'icon' => 'el el-pencil', 'fields' => array(array('id' => 'blog_excerpt_length', 'type' => 'text', 'title' => 'Excerpt Length', 'subtitle' => 'The number of first words to be show when the custom excerpt is not provided.', 'validate' => 'numeric', 'default' => '25'), array('id' => 'blog_layout', 'type' => 'select', 'title' => 'Blog Layout', 'subtitle' => 'Select default blog layout for blog page, search page, archive and category.', 'options' => array('large-thumbnail' => 'Large Thumbnail', 'classic' => 'Classic'), 'default' => 'large-thumbnail'), array('id' => 'blog_sidebar', 'type' => 'select', 'title' => 'Default Sidebar for Blog', 'subtitle' => 'Used for blog page, archives & search results.', 'data' => 'sidebar', 'default' => 'blog-sidebar'), array('id' => 'archive_enable_post_slider', 'type' => 'switch', 'title' => 'Enable Posts Slider on Archive Page', 'subtitle' => 'All posts marked as featured will be shown in post slider.', 'default' => 1), array('id' => 'blog_show_featured_image_single_post', 'type' => 'switch', 'title' => 'Show Featured Image', 'subtitle' => 'Show/hide the featured image for standard post type on single-post page.', 'default' => 1), array('id' => 'blog_show_video_player_for_thumbnail', 'type' => 'switch', 'title' => 'Show Video Player on Featured Image', 'default' => 1))));
示例6: wp_get_theme
if (!class_exists('Redux')) {
return;
}
$opt_name = "evl_options";
$theme = wp_get_theme();
$t4p_url = esc_url("http://theme4press.com/");
$fb_url = esc_url("https://www.facebook.com/Theme4Press");
// Upgrade from version 3.3 and below
$upgrade_from_33 = get_option('evolve', false);
Redux::setArgs($opt_name, array('display_name' => __('evolve', 'evolve'), 'display_name' => '<img width="135" height="28" src="' . get_template_directory_uri() . '/library/functions/images/logo.png" alt="evolve">', 'display_version' => $theme->get('Version'), 'menu_type' => 'submenu', 'dev_mode' => false, 'menu_title' => __('Theme Options', 'evolve'), 'page_title' => $theme->get('Name') . ' ' . __('Options', 'evolve'), 'admin_bar' => true, 'customizer' => true, 'save_defaults' => empty($upgrade_from_33), 'share_icons' => array(array('url' => $t4p_url . 'evolve-multipurpose-wordpress-theme/', 'title' => __('Theme Homepage', 'evolve'), 'icon' => 't4p-icon-appbarhome'), array('url' => $t4p_url . 'docs/', 'title' => __('Documentation', 'evolve'), 'icon' => 't4p-icon-appbarpagetext'), array('url' => $t4p_url . 'support-forums/', 'title' => __('Support', 'evolve'), 'icon' => 't4p-icon-appbarlifesaver'), array('url' => $fb_url, 'title' => __('Facebook', 'evolve'), 'icon' => 't4p-icon-appbarsocialfacebook')), 'intro_text' => '<a href="' . $t4p_url . 'evolve-multipurpose-wordpress-theme/" title="Theme Homepage" target="_blank"><i class="t4p-icon-appbarhome"></i> Theme Homepage</a><a href="' . $t4p_url . 'docs/" title="Documentation" target="_blank"><i class="t4p-icon-appbarpagetext"></i> Documentation</a><a href="' . $t4p_url . 'support-forums/" title="Support" target="_blank"><i class="t4p-icon-appbarlifesaver"></i> Support</a><a href="' . $fb_url . '" title="Facebook" target="_blank"><i class="t4p-icon-appbarsocialfacebook"></i> Facebook</a>'));
// If the Redux plugin is installed
if (ReduxFramework::$_is_plugin) {
Redux::setArgs($opt_name, array('customizer_only' => false, 'customizer' => true));
} else {
// No Redux plugin. Use embedded. Customizer only!
Redux::setArgs($opt_name, array('customizer_only' => true));
}
// Pull all the categories into an array
$options_categories = array();
$options_categories_obj = get_categories();
foreach ($options_categories_obj as $category) {
$options_categories[$category->cat_ID] = $category->cat_name;
}
// Pull all the pages into an array
$options_pages = array();
$options_pages_obj = get_pages('sort_column=post_parent,menu_order');
$options_pages[''] = 'Select a page:';
foreach ($options_pages_obj as $page) {
$options_pages[$page->ID] = $page->post_title;
}
// If using image radio buttons, define a directory path
示例7: ultra_get_option
* ---> SET ARGUMENTS
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
* */
/*ADDED in Ultra Admin - START */
// manageoptions and super admin
$ultraadmin_permissions = ultra_get_option("ultraadmin_plugin_access", "manage_options");
if ($ultraadmin_permissions == "super_admin" && is_super_admin()) {
$ultraadmin_permissions = 'manage_options';
}
// specific user
$ultraadmin_userid = ultra_get_option("ultraadmin_plugin_userid", "");
if ($ultraadmin_permissions == "specific_user" && $ultraadmin_userid == get_current_user_id()) {
$ultraadmin_permissions = 'read';
}
// if plugin is network activated, then hide it from inner sites.
$menu_type = 'menu';
if (!function_exists('is_plugin_active_for_network')) {
require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
// Makes sure the plugin is defined before trying to use it
if (is_plugin_active_for_network('ultra-admin/ultra-core.php')) {
if (!is_main_site()) {
$menu_type = 'hidden';
}
}
/*ADDED in Ultra Admin - END*/
// $theme = wp_get_theme(); // For use with some settings. Not necessary.
$args = array('opt_name' => $manager_option, 'display_name' => 'Quản lý thiết bị phòng thực hành', 'display_version' => '1.0', 'menu_type' => $menu_type, 'allow_sub_menu' => true, 'menu_title' => __('Management', 'redux-framework-ultra-demo'), 'page_title' => __('Management', 'redux-framework-ultra-demo'), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => true, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => 'manager_option', 'dev_mode' => false, 'update_notice' => true, 'customizer' => false, 'page_priority' => null, 'page_parent' => 'themes.php', 'page_permissions' => $ultraadmin_permissions, 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'manager_control', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'footer_credit' => ' ', 'database' => '', 'system_info' => false, 'hints' => array('icon' => 'el el-question-sign', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light', 'shadow' => true, 'rounded' => false, 'style' => ''), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('effect' => 'slide', 'duration' => '500', 'event' => 'mouseover'), 'hide' => array('effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave'))));
Redux::setArgs($manager_option, $args);
示例8: array
<?php
$sections = array();
$args = array();
// ------------------------
// Tab: Advanced
// ------------------------
$sections[] = array('title' => esc_html__('General', 'village-ca'), 'icon' => 'el-icon-wrench', 'fields' => array(array('id' => "client_area_page", 'title' => esc_html__("Client area archive page", 'village-ca'), 'subtitle' => esc_html__("In which page to list all client galleries ?", 'village-ca'), 'type' => 'select', 'data' => 'pages', 'required' => 0), array('id' => "enable_favorites", 'title' => esc_html__("Enable Favorites", 'village-ca'), 'subtitle' => esc_html__("Let your clients pick their favorite images ?", 'village-ca'), 'type' => 'switch', 'default' => '1'), array('id' => "enable_comments", 'title' => esc_html__("Enable Comments", 'village-ca'), 'subtitle' => esc_html__("Display comment area ?", 'village-ca'), 'type' => 'switch', 'default' => '1'), array('id' => "enable_smart_tags", 'title' => esc_html__("Enable Smart Tags", 'village-ca'), 'subtitle' => esc_html__("Enable hoverable image number tags ?", 'village-ca'), 'type' => 'switch', 'default' => '1'), array('id' => "image_name_type", 'title' => esc_html__("Image Name", 'village-ca'), 'subtitle' => 'Show additional image info', 'type' => 'select', 'options' => array('none' => "Disable", 'title' => 'Show image title', 'filename' => 'Show image filename'), 'default' => 'none')));
//-----------------------------------*/
// Initialize Redux:
//-----------------------------------*/
$args['display_name'] = 'Village Client Area';
$args['display_version'] = VCA()->version;
$args['menu_title'] = esc_html__("Settings", 'village-ca');
$args['page_slug'] = 'village-client';
$args['menu_type'] = 'submenu';
$args['page_parent'] = 'edit.php?post_type=client_gallery';
// Disable Redux CSS Output
$args['output'] = false;
$args['dev_mode'] = false;
$args['share_icons'][] = array('url' => 'http://twitter.com/Theme_Village', 'title' => 'Follow us on Twitter', 'icon' => 'el-icon-twitter');
$args['share_icons'][] = array('url' => 'http://www.facebook.com/themevillage.net', 'title' => 'Like us on Facebook', 'icon' => 'el-icon-facebook');
$args = apply_filters('ca_redux_args', $args);
$sections = apply_filters('ca_redux_sections', $sections);
Redux::setArgs(CA_Option::$key, $args);
CA_Options_Parser::set_sections(CA_Option::$key, $sections);
示例9: __
/**
* @var string Localized string of allowable HTML tags
*/
$text_tags_allowed = __('Tags <a>, <br>, <em>, <strong> are allowed.', 'appica');
/**
* @var array font-weight possible values
*/
$font_weight = array('lighter' => 'Lighter', '100' => '100', '200' => '200', '300' => '300', '400' => 'Normal (400)', '500' => '500', '600' => '600', '700' => 'Bold (700)', '800' => '800', '900' => '900', 'bolder' => 'Bolder');
/**
* @var array text-transform possible values
*/
$text_transform = array('none' => 'None', 'capitalize' => 'Capitalize', 'lowercase' => 'Lowercase', 'uppercase' => 'Uppercase');
/*
* Set global args
*/
Redux::setArgs($opt_name, array('opt_name' => $opt_name, 'display_name' => $theme->get('Name'), 'display_version' => $theme->get('Version'), 'page_slug' => 'appica', 'page_priority' => '59.3', 'page_permissions' => 'edit_theme_options', 'page_icon' => 'icon-themes', 'page_title' => $text_appica, 'menu_title' => $text_appica, 'menu_icon' => 'dashicons-editor-textcolor', 'menu_type' => 'menu', 'allow_sub_menu' => true, 'class' => 'appica', 'admin_bar_icon' => 'dashicons-admin-generic', 'output' => false, 'output_tag' => false, 'hide_expand' => true, 'disable_save_warn' => true, 'customizer' => false, 'dev_mode' => false, 'update_notice' => false, 'system_info' => false, 'into_text' => '', 'footer_text' => '<p>' . __('Appica theme by 8guild', 'appica') . '</p>', 'admin_bar_links' => array(), 'share_icons' => array(array('url' => 'https://twitter.com/8Guild', 'title' => 'Twitter', 'icon' => 'el el-twitter'), array('url' => 'https://www.facebook.com/8guild', 'title' => 'Facebook', 'icon' => 'el el-facebook'), array('url' => 'https://plus.google.com/u/0/b/109505223181338808677/109505223181338808677/posts', 'title' => 'Google+', 'icon' => 'el el-googleplus'), array('url' => 'http://dribbble.com/8guild', 'title' => 'Dribbble', 'icon' => 'el el-dribbble'), array('url' => 'https://www.behance.net/8Guild', 'title' => 'Behance', 'icon' => 'el el-behance'))));
/*
* Global Settings section
*/
Redux::setSection($opt_name, array('title' => __('Global Settings', 'appica'), 'icon' => 'el-icon-globe', 'fields' => array(array('type' => 'media', 'id' => 'global_favicon', 'title' => __('Custom Favicon', 'appica'), 'desc' => '<p class="description">' . __('Upload your custom favicon here in .ico or .png format.', 'appica') . '</p>'), array('type' => 'media', 'id' => 'global_preloader_logo', 'title' => __('Preloader Logo', 'appica'), 'desc' => '<p class="description">' . __('Logo optimal size is 240x240px', 'appica') . '</p>'), array('type' => 'text', 'id' => 'global_preloader_text', 'title' => __('Preloader Text', 'appica'), 'default' => 'Appica 2'), array('id' => 'global_blog_pagination', 'type' => 'select', 'title' => __('Blog Pagination Type', 'appica'), 'default' => 'pagination', 'options' => array('pagination' => __('Page links', 'appica'), 'load-more' => __('Load More', 'appica'), 'infinite-scroll' => __('Infinite Scroll', 'appica'))))));
/*
* Global Colors
*/
Redux::setSection($opt_name, array('title' => __('Global Colors', 'appica'), 'desc' => __('Set colors that are globally applied everywhere in the theme.', 'appica'), 'icon' => 'el-icon-tint', 'fields' => array(array('type' => 'color', 'id' => 'color_body_font', 'title' => __('Body Font Color', 'appica'), 'transparent' => false, 'default' => '#3a3a3a'), array('type' => 'color', 'id' => 'color_primary', 'title' => __('Primary Color', 'appica'), 'transparent' => false, 'default' => '#007aff'), array('type' => 'color', 'id' => 'color_primary_hover', 'title' => __('Primary Hover/Focus Color', 'appica'), 'transparent' => false, 'default' => '#3899ff'), array('type' => 'color', 'id' => 'color_success', 'title' => __('Success Color', 'appica'), 'transparent' => false, 'default' => '#4cd964'), array('type' => 'color', 'id' => 'color_success_hover', 'title' => __('Success Hover/Focus Color', 'appica'), 'transparent' => false, 'default' => '#74e286'), array('type' => 'color', 'id' => 'color_info', 'title' => __('Info Color', 'appica'), 'transparent' => false, 'default' => '#5ac8fa'), array('type' => 'color', 'id' => 'color_info_hover', 'title' => __('Info Hover/Focus Color', 'appica'), 'transparent' => false, 'default' => '#8dd9fb'), array('type' => 'color', 'id' => 'color_warning', 'title' => __('Warning Color', 'appica'), 'transparent' => false, 'default' => '#ffcc00'), array('type' => 'color', 'id' => 'color_warning_hover', 'title' => __('Warning Hover/Focus Color', 'appica'), 'transparent' => false, 'default' => '#ffd633'), array('type' => 'color', 'id' => 'color_danger', 'title' => __('Danger Color', 'appica'), 'transparent' => false, 'default' => '#ff2d55'), array('type' => 'color', 'id' => 'color_danger_hover', 'title' => __('Danger Hover/Focus Color', 'appica'), 'transparent' => false, 'default' => '#ff617e'), array('type' => 'color', 'id' => 'color_text_light', 'title' => __('Light Gray Color', 'appica'), 'transparent' => false, 'default' => '#c4c4c4'), array('type' => 'color', 'id' => 'color_text_dark', 'title' => __('Dark Gray Color', 'appica'), 'transparent' => false, 'default' => '#8e8e93'))));
/*
* Typography section
*/
Redux::setSection($opt_name, array('title' => __('Typography', 'appica'), 'desc' => __('Customize your typography', 'appica'), 'icon' => 'el-icon-text-width', 'fields' => array(array('type' => 'switch', 'id' => 'typography_is_google', 'title' => __('Enable/Disable Google Fonts', 'appica'), 'on' => $text_enable, 'off' => $text_disable, 'default' => true), array('type' => 'text', 'id' => 'typography_google_font', 'title' => __('Google Font link', 'appica'), 'desc' => '<p class="description">' . __('Go to <a href="http://www.google.com/fonts" target="_blank">google.com/fonts</a>, click "Quick-use" button and follow the instructions. From step 3 copy the "href" value and paste in field above.', 'appica') . '</p>', 'default' => 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300,800', 'required' => array('typography_is_google', '=', 1)), array('type' => 'text', 'id' => 'typography_font_family', 'title' => __('Body Font Family', 'appica'), 'desc' => '<p class="description">' . __('Put chosen google font (do not forget about quotation marks) along with fallback fonts, separated by comma.', 'appica') . '</p>', 'default' => '\'Open Sans\', Helvetica, Arial, sans-serif'), array('type' => 'slider', 'id' => 'typography_body_font_size', 'title' => __('Body Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 16), array('type' => 'slider', 'id' => 'typography_smaller_font_size', 'title' => __('Smaller Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 14), array('type' => 'slider', 'id' => 'typography_h1_font_size', 'title' => __('Heading 1 (h1) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 72px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 72, 'step' => 1, 'default' => 48), array('type' => 'select', 'id' => 'typography_h1_font_weight', 'title' => __('Heading 1 (h1) Font weight', 'appica'), 'options' => $font_weight, 'default' => '300'), array('type' => 'select', 'id' => 'typography_h1_text_transform', 'title' => __('Heading 1 (h1) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_h2_font_size', 'title' => __('Heading 2 (h2) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 36), array('type' => 'select', 'id' => 'typography_h2_font_weight', 'title' => __('Heading 2 (h2) Font weight', 'appica'), 'options' => $font_weight, 'default' => '300'), array('type' => 'select', 'id' => 'typography_h2_text_transform', 'title' => __('Heading 2 (h2) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_h3_font_size', 'title' => __('Heading 3 (h3) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 24), array('type' => 'select', 'id' => 'typography_h3_font_weight', 'title' => __('Heading 3 (h3) Font weight', 'appica'), 'options' => $font_weight, 'default' => '300'), array('type' => 'select', 'id' => 'typography_h3_text_transform', 'title' => __('Heading 3 (h3) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_h4_font_size', 'title' => __('Heading 4 (h4) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 18), array('type' => 'select', 'id' => 'typography_h4_font_weight', 'title' => __('Heading 4 (h4) Font weight', 'appica'), 'options' => $font_weight, 'default' => '400'), array('type' => 'select', 'id' => 'typography_h4_text_transform', 'title' => __('Heading 4 (h4) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_h5_font_size', 'title' => __('Heading 5 (h5) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 16), array('type' => 'select', 'id' => 'typography_h5_font_weight', 'title' => __('Heading 5 (h5) Font weight', 'appica'), 'options' => $font_weight, 'default' => '600'), array('type' => 'select', 'id' => 'typography_h5_text_transform', 'title' => __('Heading 5 (h5) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_h6_font_size', 'title' => __('Heading 6 (h6) Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 14), array('type' => 'select', 'id' => 'typography_h6_font_weight', 'title' => __('Heading 6 (h6) Font weight', 'appica'), 'options' => $font_weight, 'default' => '700'), array('type' => 'select', 'id' => 'typography_h6_text_transform', 'title' => __('Heading 6 (h6) Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'), array('type' => 'slider', 'id' => 'typography_badge_font_size', 'title' => __('Badge Font size', 'appica'), 'desc' => '<p class="description">' . __('Min: 1px, Max: 50px, Step: 1px', 'appica') . '</p>', 'min' => 0, 'max' => 50, 'step' => 1, 'default' => 14), array('type' => 'select', 'id' => 'typography_badge_font_weight', 'title' => __('Badge Font weight', 'appica'), 'options' => $font_weight, 'default' => '400'), array('type' => 'select', 'id' => 'typography_badge_text_transform', 'title' => __('Badge Text Transform', 'appica'), 'options' => $text_transform, 'default' => 'none'))));
/*
* Socials section
*/
示例10: setUpPage
/**
* @author Panagiotis Vagenas <pan.vagenas@gmail.com>
* @since 0.0.2
*/
public function setUpPage()
{
$optName = $this->plugin->getOptions()->getOptName();
\Redux::setArgs($optName, $this->toArray());
if ($this->helpTabs) {
$tabs = array();
foreach ($this->helpTabs as $helpTab) {
/* @var HelpTab $helpTab */
$tabs[] = $helpTab->toArray();
}
\Redux::setHelpTab($optName, $tabs);
}
if ($this->helpSidebar) {
\Redux::setHelpSidebar($optName, $this->helpSidebar);
}
foreach ($this->sections as $section) {
/* @var Section $section */
\Redux::setSection($optName, $section->toArray());
}
}