本文整理汇总了PHP中Redux::setSection方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux::setSection方法的具体用法?PHP Redux::setSection怎么用?PHP Redux::setSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux
的用法示例。
在下文中一共展示了Redux::setSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* ---> SET ARGUMENTS
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
* */
$args = array('opt_name' => $opt_name, 'display_name' => 'Vehicle Booking System', 'display_version' => '1.0.0', 'menu_type' => 'submenu', 'allow_sub_menu' => false, 'menu_title' => __('VBS Options', 'vbs'), 'page_title' => __('Vehicle Booking Options', 'vbs'), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => false, 'admin_bar_icon' => 'dashicons-portfolio', 'admin_bar_priority' => 50, 'global_variable' => '', 'dev_mode' => false, 'update_notice' => false, 'customizer' => false, 'page_priority' => null, 'page_parent' => 'vbs_admin_menu', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'vbs_options', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true, 'transient_time' => 60 * MINUTE_IN_SECONDS, 'output' => true, 'output_tag' => true, 'database' => '', 'use_cdn' => false, 'hints' => array('icon' => 'fa fa-question', 'icon_position' => 'right', 'icon_color' => 'lightgray', 'icon_size' => 'normal', 'tip_style' => array('color' => 'light', 'shadow' => true, 'rounded' => false, 'style' => ''), 'tip_position' => array('my' => 'top left', 'at' => 'bottom right'), 'tip_effect' => array('show' => array('effect' => 'slide', 'duration' => '500', 'event' => 'mouseover'), 'hide' => array('effect' => 'slide', 'duration' => '500', 'event' => 'click mouseleave'))));
$args['share_icons'][] = array('url' => 'http://www.facebook.com/interactivedes', 'title' => 'Like us on Facebook', 'icon' => 'fa fa-facebook');
$args['share_icons'][] = array('url' => 'http://twitter.com/intera_design', 'title' => 'Follow us on Twitter', 'icon' => 'fa fa-twitter');
$args['share_icons'][] = array('url' => 'http://www.linkedin.com/companies/820832', 'title' => 'Find us on LinkedIn', 'icon' => 'fa fa-linkedin');
$args['share_icons'][] = array('url' => 'http://github.com/gnikolopoulos', 'title' => 'Find us on GitHub', 'icon' => 'fa fa-github');
// Add content after the form.
$args['footer_text'] = __('<p>Development by <a href="http://interactive-design.gr" target="_blank" >Interactive Design | creative studio</a></p>', 'vbs');
Redux::setArgs($opt_name, $args);
/*
* ---> END ARGUMENTS
*/
/*
*
* ---> START SECTIONS
*
*/
Redux::setSection($opt_name, array('title' => __('General', 'vbs'), 'id' => 'opt-general', 'icon' => 'fa fa-cogs', 'fields' => array(array('id' => 'use_base', 'type' => 'switch', 'title' => __('Use base Location', 'vbs'), 'default' => true), array('id' => 'base_location', 'type' => 'text', 'title' => __('Set your base location', 'vbs'), 'default' => 'Pl. Sintagmatos, Athina 105 63, Greece'), array('id' => 'currency_symbol', 'type' => 'text', 'title' => __('Set Currency symbol', 'vbs'), 'default' => '€'))));
Redux::setSection($opt_name, array('title' => __('Styling', 'vbs'), 'id' => 'opt-styling', 'icon' => 'fa fa-paint-brush', 'fields' => array(array('id' => 'form_style', 'type' => 'button_set', 'title' => __('Form Style', 'vbs'), 'options' => array('stacked' => 'Stacked', 'horizontal' => 'Horizontal'), 'default' => 'stacked'))));
Redux::setSection($opt_name, array('title' => __('PayPal', 'vbs'), 'id' => 'opt-paypal', 'icon' => 'fa fa-paypal', 'fields' => array(array('id' => 'paypal_email', 'type' => 'text', 'title' => __('PayPal email', 'vbs'), 'default' => 'example@example.com', 'validate' => 'email'), array('id' => 'paypal_mode', 'type' => 'switch', 'title' => __('Sandbox mode', 'vbs'), 'subtitle' => __('Enable PayPal Sandbox mode', 'vbs'), 'default' => true), array('id' => 'business_name', 'type' => 'text', 'title' => __('Will appear on the PayPal form', 'vbs'), 'default' => 'Your Company LLC.'), array('id' => 'currency_code', 'type' => 'text', 'title' => __('Currency', 'vbs'), 'default' => 'USD'), array('id' => 'return_page', 'type' => 'select', 'title' => __('Page to return to after transaction', 'vbs'), 'data' => 'pages'))));
Redux::setSection($opt_name, array('title' => __('Email', 'vbs'), 'id' => 'opt-email', 'icon' => 'fa fa-envelope', 'fields' => array(array('id' => 'default_email', 'type' => 'text', 'title' => __('Email to be used as the From: field', 'vbs'), 'default' => 'example@example.com', 'validate' => 'email'), array('id' => 'email_mode', 'type' => 'switch', 'title' => __('Use PHP mailer?', 'vbs'), 'subtitle' => __('Use PHP Mailer instead of wp_mail()', 'vbs'), 'default' => true))));
Redux::setSection($opt_name, array('title' => __('PHP Mailer', 'vbs'), 'desc' => __('Only needed when you don\'t want to use wp_mail()', 'vbs'), 'id' => 'opt-mailer', 'icon' => 'fa fa-paper-plane', 'fields' => array(array('id' => 'smtp_host', 'type' => 'text', 'title' => __('SMTP Host', 'vbs'), 'default' => 'mail.example.com'), array('id' => 'smtp_port', 'type' => 'text', 'title' => __('SMTP Port', 'vbs'), 'default' => '25'), array('id' => 'smtp_auth', 'type' => 'switch', 'title' => __('SMTP requires authentication?', 'vbs'), 'default' => true), array('id' => 'smtp_secure', 'type' => 'radio', 'title' => __('Use SSL/TLS?', 'vbs'), 'options' => array('none' => 'None', 'ssl' => 'Use SSL', 'tls' => 'Use TLS'), 'default' => 'none'), array('id' => 'smtp_login', 'type' => 'password', 'username' => true, 'title' => 'SMTP Account', 'placeholder' => array('username' => 'SMTP username', 'password' => 'SMTP Password')))));
Redux::setSection($opt_name, array('title' => __('Email Template', 'vbs'), 'id' => 'opt-template', 'icon' => 'fa fa-columns', 'fields' => array(array('id' => 'email_logo', 'type' => 'media', 'url' => true, 'title' => __('Logo image', 'vbs'), 'subtitle' => __('140x50px', 'vbs'), 'default' => array('url' => PLUGIN_DIR_URL . 'templates/default/img/logo.jpg')), array('id' => 'email_banner', 'type' => 'media', 'url' => true, 'title' => __('Heading image', 'vbs'), 'subtitle' => __('600x300px', 'vbs'), 'default' => array('url' => PLUGIN_DIR_URL . 'templates/default/img/banner.jpg')), array('id' => 'email_template', 'type' => 'text', 'title' => __('Folder name that contains the mail template', 'vbs'), 'subtitle' => __('Must be under the /templates folder', 'vbs'), 'default' => 'default'), array('id' => 'email_title', 'type' => 'text', 'title' => __('Email title/Subject', 'vbs'), 'default' => 'Your booking details'), array('id' => 'email_heading', 'type' => 'text', 'title' => __('Header text for notification emails', 'vbs'), 'default' => 'Thank you for booking with us!'), array('id' => 'email_intro', 'type' => 'textarea', 'title' => __('Email intro text', 'vbs'), 'subtitle' => __('No HTML allowed', 'vbs'), 'default' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod Tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo', 'validate' => 'no_html'))));
Redux::setSection($opt_name, array('title' => __('Social', 'vbs'), 'id' => 'opt-social', 'icon' => 'fa fa-share-alt', 'fields' => array(array('id' => 'facebook_url', 'type' => 'text', 'title' => __('Your Facebook page/profile URL', 'vbs'), 'default' => 'http://facebook.com', 'validate' => 'url'), array('id' => 'linkedin_url', 'type' => 'text', 'title' => __('Your LinkedIn profile URL', 'vbs'), 'default' => 'http://linkedin.com', 'validate' => 'url'), array('id' => 'twitter_url', 'type' => 'text', 'title' => __('Your Twitter profile URL', 'vbs'), 'default' => 'http://twitter.com', 'validate' => 'url'))));
/*
* <--- END SECTIONS
*/
示例2: 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'))));
}
示例3: array
// );
Redux::setArgs($opt_name, $args);
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$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);
// Set the help sidebar
$content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'admin_folder');
Redux::setHelpSidebar($opt_name, $content);
/*
* <--- END HELP TABS
*/
/*
*
* ---> START SECTIONS
*
*/
Redux::setSection($opt_name, array('title' => __('Page Builder', 'swift-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-adjust-alt', 'fields' => array(array('id' => 'disable_spb', 'type' => 'button_set', 'title' => __('Swift Page Builder', 'swiftframework'), 'subtitle' => __('Enable/Disable the Swift Page Builder functionality with this option.', 'swiftframework'), 'desc' => '', 'options' => array('1' => 'Disabled', '0' => 'Enabled'), 'default' => '0'), array('id' => 'spb_color_scheme', 'type' => 'select', 'title' => __('Page Builder Color', 'swiftframework'), 'subtitle' => "Choose the color for the Page Builder.", 'options' => array('spb-black' => 'Black', 'spb-blue' => 'Blue ', 'spb-blue-grey' => 'Blue Grey', 'spb-cyan' => 'Cyan', 'spb-grey' => 'Grey', 'spb-indigo' => 'Indigo', 'spb-light-green' => 'Light Green', 'spb-orange' => 'Orange', 'spb-pink' => 'Pink', 'spb-teal' => 'Teal'), 'desc' => '', 'default' => 'spb-blue'), 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', 'swiftframework'), 'desc' => __('Select here which post types you would like to enable the page builder for.', 'swiftframework')), array('id' => 'show_textblock_text', 'type' => 'button_set', 'title' => __('Show Text Block Text', 'swiftframework'), 'subtitle' => __('Enable/Disable the display of text block text on the text block elements in the builder.', 'swiftframework'), 'desc' => '', 'options' => array('1' => 'Enabled', '0' => 'Disabled'), 'default' => '1'), array('id' => 'spb_edit_modal_width', 'type' => 'slider', 'title' => __('Element Edit Modal Width', 'swiftframework'), 'subtitle' => __("Set the defailt width for the element edit modal, by default this is 620px.", 'swiftframework'), "default" => "620", "min" => "400", "step" => "20", "max" => "2000"), array('id' => 'shortcode_mapper_field', 'type' => 'shortcode_mapper', 'title' => __('Shortcode Mapper', 'swiftframework'), 'subtitle' => __('The shortcode mapper allows you to include custom shortcodes in the Swift Page Builder.', 'swiftframework')))));
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-1'));
Redux::setSection($opt_name, array('title' => __('Swift Slider', 'swiftframework'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-website', 'fields' => array(array('id' => 'disable_ss', 'type' => 'button_set', 'title' => __('Swift Slider', 'swiftframework'), 'subtitle' => __('Enable/Disable the Swift Slider functionality with this option.', 'swiftframework'), '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', 'swift-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-view-mode', 'fields' => array(array('id' => 'cpt-disable', 'type' => 'checkbox', 'title' => __('Disable Custom Post Types', 'swiftframework'), '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.', 'swiftframework'), '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', 'swift-slider' => '0')))));
Redux::setSection($opt_name, array('type' => 'divide', 'id' => 'divide-3'));
Redux::setSection($opt_name, array('title' => __('Performance', 'swift-builder'), 'desc' => '', 'subsection' => false, 'icon' => 'el el-icon-fire', 'fields' => array(array('id' => 'enable_min_styles', 'type' => 'button_set', 'title' => __('Load pre-minified stylesheets', 'swift-builder'), 'subtitle' => __('Enable this option to load pre-minified stlysheets, for faster page speed.', 'swift-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'), array('id' => 'enable_min_scripts', 'type' => 'button_set', 'title' => __('Load pre-minified scripts', 'swift-builder'), 'subtitle' => __('Enable this option to load pre-minified scripts, for faster page speed.', 'swift-builder'), 'desc' => '', 'options' => array('1' => 'On', '0' => 'Off'), 'default' => '1'))));
/*
* <--- END SECTIONS
*/
示例4: array
<?php
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Pages', 'span'), 'id' => 'pages_options', 'desc' => __('General Options for Pages', 'span'), 'customizer_width' => '400px', 'icon' => 'el el-file'));
global $option_namespace;
$option_namespace = 'pages';
require get_template_directory() . '/admin/parts/_global-options.php';
示例5: array
<?php
/*
* Header Options
*/
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Header', 'inspiry'), 'id' => 'header-section', 'desc' => __('This section contains options for header.', 'inspiry'), 'fields' => array(array('id' => 'inspiry_header_variation', 'type' => 'image_select', 'title' => __('Header Design Variation', 'inspiry'), 'subtitle' => __('Select the design variation that you want to use for site header.', 'inspiry'), 'options' => array('1' => array('title' => __('1st Variation', 'inspiry'), 'img' => get_template_directory_uri() . '/inc/theme-options/images/header-variation-1.png'), '2' => array('title' => __('2nd Variation', 'inspiry'), 'img' => get_template_directory_uri() . '/inc/theme-options/images/header-variation-2.png')), 'default' => '1'), array('id' => 'inspiry_header_menu_title', 'type' => 'text', 'title' => __('Menu Button Title', 'inspiry'), 'default' => __('Menu', 'inspiry'), 'required' => array('inspiry_header_variation', '=', 1)), array('id' => 'inspiry_favicon', 'type' => 'media', 'url' => false, 'title' => __('Favicon', 'inspiry'), 'subtitle' => __('Upload your website favicon.', 'inspiry')), array('id' => 'inspiry_logo', 'type' => 'media', 'url' => false, 'title' => __('Logo', 'inspiry'), 'subtitle' => __('Upload logo image for your Website. Otherwise site title will be displayed in place of logo.', 'inspiry')), array('id' => 'inspiry_header_phone', 'type' => 'text', 'title' => __('Phone Number', 'inspiry'), 'default' => ''), array('id' => 'inspiry_facebook_url', 'type' => 'text', 'title' => __('Facebook URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_twitter_url', 'type' => 'text', 'title' => __('Twitter URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_google_url', 'type' => 'text', 'title' => __('Google Plus URL', 'inspiry'), 'validate' => 'url', 'default' => ''), array('id' => 'inspiry_banner_image', 'type' => 'media', 'url' => false, 'title' => __('Banner Image', 'inspiry'), 'desc' => __('Banner image should have minimum width of 2000px and minimum height of 320px.', 'inspiry'), 'subtitle' => __('This banner image will be displayed on all the pages where banner image is not overridden by page specific banner settings.', 'inspiry')), array('id' => 'inspiry_display_wpml_flags', 'type' => 'switch', 'title' => __('WPML Language Switcher Flags', 'inspiry'), 'subtitle' => __('Do you want to display WPML language switcher flags in header top bar ?', 'inspiry'), 'desc' => __('This option only works if WPML plugin is installed.', 'inspiry'), 'default' => 1, 'on' => __('Display', 'inspiry'), 'off' => __('Hide', 'inspiry')), array('id' => 'inspiry_page_loader', 'type' => 'switch', 'title' => __('Page Loader', 'inspiry'), 'desc' => __('You can enable or disable page loader.', 'inspiry'), 'default' => 1, 'on' => __('Enable', 'inspiry'), 'off' => __('Disable', 'inspiry')), array('id' => 'inspiry_page_loader_gif', 'type' => 'media', 'url' => false, 'title' => __('Page Loader Gif', 'inspiry'), 'desc' => __('You can upload your page loader gif here or default one will be displayed.', 'inspiry'), 'required' => array('inspiry_page_loader', '=', 1)), array('id' => 'inspiry_quick_js', 'type' => 'ace_editor', 'title' => __('Quick JavaScript', 'inspiry'), 'desc' => __('You can paste your JavaScript code here.', 'inspiry'), 'mode' => 'javascript', 'theme' => 'chrome'))));
示例6: array
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')));
Redux::setHelpTab($opt_name, $tabs);
// Set the help sidebar
$content = __('<p>This is the sidebar content, HTML is allowed.</p>', 'redux-framework-demo');
Redux::setHelpSidebar($opt_name, $content);
/*
* <--- END HELP TABS
*/
/*
*
* ---> START SECTIONS
*
*/
/*
As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Basic Field', 'redux-framework-demo'), 'id' => 'basic', 'desc' => __('Basic field with no subsections.', 'redux-framework-demo'), 'icon' => 'el el-home', 'fields' => array(array('id' => 'opt-text', 'type' => 'text', 'title' => __('Example Text', 'redux-framework-demo'), 'desc' => __('Example description.', 'redux-framework-demo'), 'subtitle' => __('Example subtitle.', 'redux-framework-demo'), 'hint' => array('content' => 'This is a <b>hint</b> tool-tip for the text field.<br/><br/>Add any HTML based text you like here.')))));
Redux::setSection($opt_name, array('title' => __('Basic Fields', 'redux-framework-demo'), 'id' => 'basic', 'desc' => __('Basic fields as subsections.', 'redux-framework-demo'), 'icon' => 'el el-home'));
Redux::setSection($opt_name, array('title' => __('Text', 'redux-framework-demo'), 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="//docs.reduxframework.com/core/fields/text/" target="_blank">//docs.reduxframework.com/core/fields/text/</a>', 'id' => 'opt-text-subsection', 'subsection' => true, 'fields' => array(array('id' => 'text-example', 'type' => 'text', 'title' => __('Text Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Field Description', 'redux-framework-demo'), 'default' => 'Default Text'))));
Redux::setSection($opt_name, array('title' => __('Text Area', 'redux-framework-demo'), 'desc' => __('For full documentation on this field, visit: ', 'redux-framework-demo') . '<a href="//docs.reduxframework.com/core/fields/textarea/" target="_blank">//docs.reduxframework.com/core/fields/textarea/</a>', 'id' => 'opt-textarea-subsection', 'subsection' => true, 'fields' => array(array('id' => 'textarea-example', 'type' => 'textarea', 'title' => __('Text Area Field', 'redux-framework-demo'), 'subtitle' => __('Subtitle', 'redux-framework-demo'), 'desc' => __('Field Description', 'redux-framework-demo'), 'default' => 'Default Text'))));
/*
* <--- END SECTIONS
*/
示例7: array
<div class="nicdark_margin10">
<a href="#" class="nicdark_press right nicdark_btn_icon nicdark_bg_red small white"><i class="icon-youtube-play"></i></a>
</div>
<div class="nicdark_margin10">
<a href="#" class="nicdark_press right nicdark_btn_icon nicdark_facebook small white"><i class="icon-facebook"></i></a>
</div>'), array('id' => 'copyright_backtotop', 'type' => 'switch', 'required' => array('copyright_display', '=', '1'), 'title' => __('Disable Back To Top', 'redux-framework-demo'), 'subtitle' => __('Disable Back To Top Arrow', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => 1, 'on' => 'Enabled', 'off' => 'Disabled'))));
////////////////////////////////////////////////////END FOOTER SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////COLOR SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('Colors', 'redux-framework-demo'), 'id' => 'nicdark_colors_section', 'icon' => 'el el-pencil', 'fields' => array(array('id' => 'color_greydark', 'type' => 'color_gradient', 'title' => __('GREYDARK Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your greydark color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#434a54', 'to' => '#4a515b')), array('id' => 'color_red', 'type' => 'color_gradient', 'title' => __('RED Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your red color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#f76570', 'to' => '#ef606b')), array('id' => 'color_orange', 'type' => 'color_gradient', 'title' => __('ORANGE Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your orange color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#f3a46b', 'to' => '#e89d67')), array('id' => 'color_yellow', 'type' => 'color_gradient', 'title' => __('YELLOW Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your yellow color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#ffd205', 'to' => '#f4c906')), array('id' => 'color_blue', 'type' => 'color_gradient', 'title' => __('BLUE Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your blue color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#14b9d5', 'to' => '#15b0ca')), array('id' => 'color_green', 'type' => 'color_gradient', 'title' => __('GREEN Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your green color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#1bbc9b', 'to' => '#18b292')), array('id' => 'color_violet', 'type' => 'color_gradient', 'title' => __('VIOLET Normal/Dark', 'redux-framework-demo'), 'transparent' => false, 'subtitle' => __('Set your violet color (dark is used for shadows and borders)', 'redux-framework-demo'), 'desc' => __('', 'redux-framework-demo'), 'default' => array('from' => '#c377e4', 'to' => '#BA71DA')), array('id' => 'color_gradient', 'type' => 'ace_editor', 'title' => __('CSS Gradient', 'redux-framework-demo'), 'subtitle' => __('Paste your gradient CSS code here, generate the code <a target="_blank" href="http://www.colorzilla.com/gradient-editor/">HERE</a> ', 'redux-framework-demo'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => '', 'default' => "background: #f76570; /* Old browsers */\n background: -moz-linear-gradient(left, #f76570 0%, #f76570 8%, #f3a46b 8%, #f3a46b 16%, #f3a46b 16%, #ffd205 16%, #ffd205 24%, #ffd205 24%, #1bbc9b 24%, #1bbc9b 25%, #1bbc9b 32%, #14b9d5 32%, #14b9d5 40%, #c377e4 40%, #c377e4 48%, #f76570 48%, #f76570 56%, #f3a46b 56%, #f3a46b 64%, #ffd205 64%, #ffd205 72%, #1bbc9b 72%, #1bbc9b 80%, #14b9d5 80%, #14b9d5 80%, #14b9d5 89%, #c377e4 89%, #c377e4 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f76570), color-stop(8%,#f76570), color-stop(8%,#f3a46b), color-stop(16%,#f3a46b), color-stop(16%,#f3a46b), color-stop(16%,#ffd205), color-stop(24%,#ffd205), color-stop(24%,#ffd205), color-stop(24%,#1bbc9b), color-stop(25%,#1bbc9b), color-stop(32%,#1bbc9b), color-stop(32%,#14b9d5), color-stop(40%,#14b9d5), color-stop(40%,#c377e4), color-stop(48%,#c377e4), color-stop(48%,#f76570), color-stop(56%,#f76570), color-stop(56%,#f3a46b), color-stop(64%,#f3a46b), color-stop(64%,#ffd205), color-stop(72%,#ffd205), color-stop(72%,#1bbc9b), color-stop(80%,#1bbc9b), color-stop(80%,#14b9d5), color-stop(80%,#14b9d5), color-stop(89%,#14b9d5), color-stop(89%,#c377e4), color-stop(100%,#c377e4)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(left, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* IE10+ */\n background: linear-gradient(to right, #f76570 0%,#f76570 8%,#f3a46b 8%,#f3a46b 16%,#f3a46b 16%,#ffd205 16%,#ffd205 24%,#ffd205 24%,#1bbc9b 24%,#1bbc9b 25%,#1bbc9b 32%,#14b9d5 32%,#14b9d5 40%,#c377e4 40%,#c377e4 48%,#f76570 48%,#f76570 56%,#f3a46b 56%,#f3a46b 64%,#ffd205 64%,#ffd205 72%,#1bbc9b 72%,#1bbc9b 80%,#14b9d5 80%,#14b9d5 80%,#14b9d5 89%,#c377e4 89%,#c377e4 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f76570', endColorstr='#c377e4',GradientType=1 ); /* IE6-9 */"))));
////////////////////////////////////////////////////END COLOR SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////FONTS SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('Fonts', 'redux-framework-demo'), 'id' => 'nicdark_fonts_section', 'icon' => 'el el-font', 'fields' => array(array('id' => 'first_font', 'type' => 'typography', 'title' => __('Main Font', 'redux-framework-demo'), 'subtitle' => __('Specify the main font.', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Open Sans')), array('id' => 'second_font', 'type' => 'typography', 'title' => __('Second Font', 'redux-framework-demo'), 'subtitle' => __('Specify the second font.', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Open Sans')), array('id' => 'third_font', 'type' => 'typography', 'title' => __('Third Font', 'redux-framework-demo'), 'subtitle' => __('Specify the third font. Only for "signature" class apply to heading tag', 'redux-framework-demo'), 'google' => true, 'color' => false, 'text-align' => false, 'font-weight' => false, 'line-height' => false, 'font-size' => false, 'font-style' => false, 'default' => array('font-family' => 'Montez')))));
////////////////////////////////////////////////////END FONTS SETTINGS///////////////////////////////////////////////////
////////////////////////////////////////////////////GENERAL SETTINGS///////////////////////////////////////////////////
Redux::setSection($opt_name, array('title' => __('General', 'redux-framework-demo'), 'id' => 'nicdark_general_section', 'icon' => 'el el-cogs', 'fields' => array(array('id' => 'general_boxed', 'type' => 'switch', 'title' => __('Enable Boxed Layout', 'redux-framework-demo'), 'subtitle' => __('Enable Boxed Layout For Your Site!', 'redux-framework-demo'), 'default' => 0, 'on' => 'Enabled', 'off' => 'Disabled'), array('id' => 'general_background', 'type' => 'background', 'transparent' => false, 'required' => array('general_boxed', '=', '1'), 'output' => array('body'), 'title' => __('Background Options', 'redux-framework-demo'), 'subtitle' => __('Body background with image, pattern and color', 'redux-framework-demo')), array('id' => 'general_css', 'type' => 'ace_editor', 'title' => __('Custom CSS', 'redux-framework-demo'), 'subtitle' => __('Paste your CSS code here.', 'redux-framework-demo'), 'mode' => 'css', 'theme' => 'monokai', 'desc' => '', 'default' => ""), array('id' => 'general_js', 'type' => 'textarea', 'title' => __('Google Analytics', 'redux-framework-demo'), 'subtitle' => __('Paste your Google Analytics here. ', 'redux-framework-demo'), 'desc' => 'This will be added into the footer template of your theme.', 'default' => " "))));
////////////////////////////////////////////////////END GENERAL SETTINGS///////////////////////////////////////////////////
//END NICDARK REDUX
/*
* <--- END SECTIONS
*/
/**
* This is a test function that will let you see when the compiler hook occurs.
* It only runs if a field set with compiler=>true is changed.
* */
function compiler_action($options, $css, $changed_values)
{
echo '<h1>The compiler hook has run!</h1>';
echo "<pre>";
print_r($changed_values);
// Values that have changed since the last save
示例8: array
// 'title' => __( 'Theme Information 1', 'ssss' ),
// 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'ssss' )
// ),
// array(
// 'id' => 'redux-help-tab-2',
// 'title' => __( 'Theme Information 2', 'ssss' ),
// 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'ssss' )
// )
// );
// Redux::setHelpTab( $opt_name, $tabs );
// Set the help sidebar
// $content = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'ssss' );
// Redux::setHelpSidebar( $opt_name, $content );
/*
* <--- END HELP TABS
*/
/*
*
* ---> START SECTIONS
*
*/
/*
As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
// -> START Basic Fields
Redux::setSection($opt_name, array('title' => __('Settings', 'ssss'), 'id' => 'settings', 'desc' => __('Basic fields as subsections.', 'ssss'), 'icon' => 'el el-home'));
Redux::setSection($opt_name, array('title' => __('Twitter', 'ssss'), 'id' => 'social-media', 'desc' => __('Set social media profile urls', 'ssss'), 'icon' => 'el el-home', 'subsection' => true, 'fields' => array(array('id' => 'tweet_via', 'type' => 'text', 'title' => __('Tweet Via', 'ssss')), array('id' => 'tweet_reccomend', 'type' => 'text', 'title' => __('Tweet Reccomend', 'ssss')))));
/*
* <--- END SECTIONS
*/
示例9: array
<?php
/*
* Misc Options
*/
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Misc', 'inspiry'), 'id' => 'misc-section', 'desc' => __('This section contains options related to various features across the theme.', 'inspiry'), 'fields' => array(array('id' => 'inspiry_google_reCAPTCHA', 'type' => 'switch', 'title' => __('Google reCAPTCHA', 'inspiry'), 'default' => 0, 'on' => __('Enable', 'inspiry'), 'off' => __('Disable', 'inspiry')), array('id' => 'inspiry_reCAPTCHA_site_key', 'type' => 'text', 'title' => __('reCAPTCHA Site Key', 'inspiry'), 'required' => array('inspiry_google_reCAPTCHA', '=', 1)), array('id' => 'inspiry_reCAPTCHA_secret_key', 'type' => 'text', 'title' => __('reCAPTCHA Secret Key', 'inspiry'), 'required' => array('inspiry_google_reCAPTCHA', '=', 1)), array('id' => 'inspiry_reCAPTCHA_language', 'type' => 'select', 'title' => __('reCAPTCHA Language', 'inspiry'), 'options' => array("ar" => "Arabic", "bn" => "Bengali", "bg" => "Bulgarian", "ca" => "Catalan", "zh-CN" => "Chinese (Simplified)", "zh-TW" => "Chinese (Traditional)", "hr" => "Croatian", "cs" => "Czech", "da" => "Danish", "nl" => "Dutch", "en-GB" => "English (UK)", "en" => "English (US)", "et" => "Estonian", "fil" => "Filipino", "fi" => "Finnish", "fr" => "French", "fr-CA" => "French (Canadian)", "de" => "German", "gu" => "Gujarati", "Value" => "Language", "de-AT" => "German (Austria)", "de-CH" => "German (Switzerland)", "el" => "Greek", "iw" => "Hebrew", "hi" => "Hindi", "hu" => "Hungarain", "id" => "Indonesian", "it" => "Italian", "ja" => "Japanese", "kn" => "Kannada", "ko" => "Korean", "lv" => "Latvian", "lt" => "Lithuanian", "ms" => "Malay", "ml" => "Malayalam", "mr" => "Marathi", "no" => "Norwegian", "fa" => "Persian", "pl" => "Polish", "pt" => "Portuguese", "pt-BR" => "Portuguese (Brazil)", "pt-PT" => "Portuguese (Portugal)", "ro" => "Romanian", "ru" => "Russian", "sr" => "Serbian", "sk" => "Slovak", "sl" => "Slovenian", "es" => "Spanish", "es-419" => "Spanish (Latin America)", "sv" => "Swedish", "ta" => "Tamil", "te" => "Telugu", "th" => "Thai", "tr" => "Turkish", "uk" => "Ukrainian", "ur" => "Urdu", "vi" => "Vietnamese"), 'default' => 'en'), array('id' => 'inspiry_agent_cc_email', 'type' => 'text', 'title' => __('CC Email Address for Messages to Agents', 'inspiry'), 'subtitle' => __('Given email address will receive a copy of every message sent to any agent.', 'inspiry'), 'desc' => __('You can provide multiple email addresses separated with comma.', 'inspiry')))));
示例10: array
<?php
/*
* Basic Styles Options
*/
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Basic', 'inspiry'), 'id' => 'basic-styles', 'desc' => __('This sub section contains basic styles options.', 'inspiry'), 'subsection' => true, 'fields' => array(array('id' => 'inspiry_body_background', 'type' => 'background', 'output' => array('body', '.site-pages'), 'title' => __('Main Background', 'inspiry'), 'subtitle' => __('Configure body background of your choice. ( default:#eff1f5 )', 'inspiry'), 'default' => '#eff1f5'), array('id' => 'inspiry_change_font', 'type' => 'switch', 'title' => __('Do you want to change fonts?', 'inspiry'), 'default' => '0', 'on' => __('Yes', 'inspiry'), 'off' => __('No', 'inspiry')), array('id' => 'inspiry_headings_font', 'type' => 'typography', 'title' => __('Headings Font', 'inspiry'), 'subtitle' => __('Select the font for headings.', 'inspiry'), 'desc' => __('Varela Round is default font.', 'inspiry'), 'required' => array('inspiry_change_font', '=', '1'), 'google' => true, 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'line-height' => false, 'color' => false, 'text-align' => false, 'output' => array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', '.h1', '.h2', '.h3', '.h4', '.h5', '.h6'), 'default' => array('font-family' => 'Varela Round', 'google' => true)), array('id' => 'inspiry_body_font', 'type' => 'typography', 'title' => __('Text Font', 'inspiry'), 'subtitle' => __('Select the font for body text.', 'inspiry'), 'desc' => __('Varela Round is default font.', 'inspiry'), 'required' => array('inspiry_change_font', '=', '1'), 'google' => true, 'font-style' => false, 'font-weight' => false, 'font-size' => false, 'line-height' => false, 'color' => false, 'text-align' => false, 'output' => array('body'), 'default' => array('font-family' => 'Varela Round', 'google' => true)), array('id' => 'inspiry_headings_color', 'type' => 'color', 'output' => array('h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6'), 'title' => __('Headings Color', 'inspiry'), 'default' => '#4a525d', 'validate' => 'color', 'transparent' => false, 'desc' => 'default: #4a525d'), array('id' => 'inspiry_text_color', 'type' => 'color', 'transparent' => false, 'output' => array('body'), 'title' => __('Text Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'validate' => 'color'), array('id' => 'inspiry_blockquote_color', 'type' => 'color', 'output' => array('blockquote', 'blockquote p'), 'title' => __('Quote Text Color', 'inspiry'), 'default' => '#4a525d', 'validate' => 'color', 'transparent' => false, 'desc' => 'default: #4a525d'), array('id' => 'inspiry_link_color', 'type' => 'link_color', 'title' => __('Link Color', 'inspiry'), 'active' => true, 'output' => array('a'), 'default' => array('regular' => '#191c20', 'hover' => '#0dbae8', 'active' => '#0dbae8')), array('id' => 'inspiry_content_link_color', 'type' => 'link_color', 'title' => __('Link Color in Page and Post Contents', 'inspiry'), 'active' => true, 'output' => array('.default-page .entry-content a'), 'default' => array('regular' => '#0dbae8', 'hover' => '#ff8000', 'active' => '#ff8000')), array('id' => 'inspiry_animation', 'type' => 'switch', 'title' => __('Animation', 'inspiry'), 'desc' => __('You can enable or disable CSS3 animation on various components.', 'inspiry'), 'default' => 1, 'on' => __('Enable', 'inspiry'), 'off' => __('Disable', 'inspiry')), array('id' => 'inspiry_quick_css', 'type' => 'ace_editor', 'title' => __('Quick CSS', 'inspiry'), 'desc' => __('You can use this box for some quick css changes. For big changes, Use the custom.css file in css folder. In case of child theme please use style.css file in child theme.', 'inspiry'), 'mode' => 'css', 'theme' => 'monokai'))));
示例11: __
} 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'] = __('<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>', 'redux-framework-demo');
Redux::setArgs($opt_name, $args);
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$tabs = array(array('id' => 'redux-help-tab-1', 'title' => __('Theme Information 1', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')), array('id' => 'redux-help-tab-2', 'title' => __('Theme Information 2', 'redux-framework-demo'), 'content' => __('<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo')));
Redux::setHelpTab($opt_name, $tabs);
/*
* <--- END HELP TABS
*/
/*
*
* ---> START SECTIONS
*
*/
/*
As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for
*/
Redux::setSection($opt_name, array('title' => __('Global Message', 'pay2publish'), 'desc' => __('Set the message to display when the user does not have enough funds', 'pay2publish'), 'id' => 'global_message', 'subsection' => true, 'customizer_width' => '700px', 'fields' => array(array('id' => 'global_message_editor', 'type' => 'editor', 'title' => __('Message when no funds', 'pay2publish'), 'subtitle' => __('', 'pay2publish'), 'desc' => __('Set the message to display when the user does not have enough funds', 'pay2publish'), 'default' => __('You do not have enought credits to create a new publication of that Post Type', 'pay2publish'), 'validate_callback' => array('myCRED_P2P_Main', 'validation_callback')), array('id' => 'opt-raw', 'type' => 'raw', 'title' => __('Support', 'pay2publish'), 'subtitle' => __('If you like this plugin you can support it by doing the following:.', 'pay2publish'), 'desc' => __('Rate, follow or donate... will not ask for more', 'pay2publish'), 'content' => file_get_contents(P2PADDON_ROOT_DIR . 'myfile.txt')))));
Redux::init($opt_name);
/*
* <--- END SECTIONS
*/
示例12: array
<?php
/*
* Search Options
*/
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Archives', 'inspiry'), 'id' => 'archives-section', 'desc' => __('This section contains options related property post type archive and taxonomy archives pages like property city, property status, property type and property feature.', 'inspiry'), 'fields' => array(array('id' => 'inspiry_archive_module_below_header', 'type' => 'button_set', 'title' => __('What to Display Below Header on Archive Pages', 'inspiry'), 'options' => array('banner' => __('Image Banner', 'inspiry'), 'google-map' => __('Google Map', 'inspiry')), 'default' => 'google-map'), array('id' => 'inspiry_archive_properties_number', 'type' => 'select', 'title' => __('Number of Properties on an Archive Page', 'inspiry'), 'options' => array(1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10'), 'default' => 6, 'select2' => array('allowClear' => false)), array('id' => 'inspiry_archive_layout', 'type' => 'select', 'title' => __('Archive Page Layout', 'inspiry'), 'options' => array('list' => __('List Layout - Full Width', 'inspiry'), 'grid' => __('Grid Layout - Full Width', 'inspiry')), 'default' => 'list', 'select2' => array('allowClear' => false)), array('id' => 'inspiry_archive_order', 'type' => 'select', 'title' => __('Default Order of Properties on an Archive Page.', 'inspiry'), 'options' => array('price-asc' => __('Sort by Price Low to High', 'inspiry'), 'price-desc' => __('Sort by Price High to Low', 'inspiry'), 'date-asc' => __('Sort by Date Old to New', 'inspiry'), 'date-desc' => __('Sort by Date New to Old', 'inspiry')), 'default' => 'date-desc', 'select2' => array('allowClear' => false)))));
示例13: span_opt_post
/**
* Post Meta
**/
function span_opt_post($namespace)
{
// Meta
$fields = array();
$fields[] = array('id' => $namespace . '_post_meta', 'type' => 'checkbox', 'title' => __('Post Meta', 'span'), 'desc' => __('You can enable or disable a meta according to your needs.', 'span'), 'options' => array('date' => __('Display date', 'span'), 'category' => __('Display category', 'span'), 'tag' => __('Display tag (on single post)', 'span'), 'like' => __('Display like', 'span'), 'comments' => __('Display comments', 'span'), 'author' => __('Display author', 'span')), 'default' => array('date' => '1', 'category' => '1', 'tag' => '1', 'like' => '1', 'comments' => '1', 'author' => '1'));
// Share
$fields[] = array('id' => $namespace . '_post_share', 'type' => 'checkbox', 'title' => __('Social Share', 'span'), 'desc' => __('Pick at least one service to enable post share feature.', 'span'), 'options' => array('facebook' => __('Facebook', 'span'), 'twitter' => __('Twitter', 'span'), 'google' => __('Google+', 'span'), 'linkedin' => __('LinkedIn', 'span')), 'default' => array('facebook' => '0', 'twitter' => '1', 'google' => '1', 'linkedin' => '1'));
Redux::setSection(SPAN_OPT_NAME, array('title' => __('Post Options', 'span'), 'id' => $namespace . '_post_options', 'subsection' => true, 'customizer_width' => '450px', 'desc' => sprintf(__('This hold options for %s post', 'span'), ucwords($namespace)), 'fields' => $fields));
}
示例14: wp_get_theme
<?php
if (!class_exists('ReduxFramework')) {
return;
}
$opt_name = "hnmOpt";
$theme = wp_get_theme();
$args = array('opt_name' => 'hnmOpt', 'display_name' => $theme->get('Name') . ' ' . __('Options', 'health-plus'), 'display_version' => $theme->get('Version'), 'menu_type' => 'submenu', 'allow_sub_menu' => true, 'menu_title' => __('Health+ Options', 'health-plus'), 'page_title' => $theme->get('Name') . ' ' . __('Options', 'health-plus'), 'google_api_key' => '', 'google_update_weekly' => false, 'async_typography' => true, 'admin_bar' => true, 'admin_bar_icon' => 'dashicons-admin-generic', 'admin_bar_priority' => 50, 'global_variable' => '', 'dev_mode' => false, 'update_notice' => false, 'customizer' => false, 'page_parent' => 'themes.php', 'page_permissions' => 'manage_options', 'menu_icon' => '', 'last_tab' => '', 'page_icon' => 'icon-themes', 'page_slug' => 'hnm-options', 'save_defaults' => true, 'default_show' => false, 'default_mark' => '', 'show_import_export' => true);
Redux::setArgs($opt_name, $args);
// GENERAL
Redux::setSection($opt_name, array('icon' => 'el-icon-globe', 'title' => __('General', 'health-plus'), 'id' => 'general', 'fields' => array(array('id' => 'envato_api_key', 'type' => 'text', 'title' => __('Item Purchase Code', 'health-plus'), 'desc' => __('Insert item purchase code to receive automatic theme updates.', 'health-plus'), 'std' => ''), array("title" => __('Upload Favicon', 'health-plus'), "desc" => __('A transparent PNG image of size 16x16 or an ICO image file can be uploaded for a favicon.', 'health-plus'), "id" => "favicon", "default" => array('url' => get_template_directory_uri() . '/favicon.ico'), 'url' => true, "type" => "media"), array('id' => 'site_layout', 'type' => 'image_select', 'title' => __('Site Layout', 'health-plus'), 'desc' => __('Select a style for the site. e.g. Boxed or Full Width', 'health-plus'), 'default' => 'var2', 'options' => array('var2' => array('alt' => 'Boxed', 'img' => get_template_directory_uri() . '/images/bx.png'), 'var1' => array('alt' => 'Full Width', 'img' => get_template_directory_uri() . '/images/fw.png'))), array('id' => 'sidebar_pos', 'type' => 'image_select', 'title' => __('Blog Sidebar', 'health-plus'), 'desc' => __('Sidebar Position for blog pages. i.e. Blog, Search, Archives and Post detail pages.', 'health-plus'), 'default' => 'right', 'options' => array('right' => array('alt' => 'Right Sidebar', 'img' => get_template_directory_uri() . '/images/rs.png'), 'left' => array('alt' => 'Left Sidebar', 'img' => get_template_directory_uri() . '/images/ls.png'))), array("title" => __('Default Banner Image', 'health-plus'), "desc" => __('Upload an image to be used as a default banner image if no banner image is set in individual page.', 'health-plus'), "id" => "page_img", "type" => "media", 'url' => true), array('id' => 'news_cats', 'title' => __('News Categories', 'health-plus'), 'desc' => __('Select categories for news page template to show their posts on News page template. Make sure that you have an empty page with News page template assigned to it.', 'health-plus'), 'type' => 'select', 'args' => array('hide_empty' => true, 'taxonomy' => array(0 => 'category')), 'data' => 'category', 'multi' => true, 'placeholder' => 'Select a Category'))));
// HEADER
Redux::setSection($opt_name, array('icon' => 'el-icon-cogs', 'title' => __('Header', 'health-plus'), 'fields' => array(array("title" => __('Upload Logo', 'health-plus'), "desc" => __('Upload your logo for the site here. This will display in the header section.', 'health-plus'), "id" => "logo", "url" => true, "type" => "media"), array('title' => __('Top Bar Phone #', 'health-plus'), 'desc' => __('Enter some text to display in top bar. e.g. Phone No', 'health-plus'), 'id' => 'phone', 'type' => 'text', 'default' => ''), array('title' => __('Top Bar Email', 'health-plus'), 'desc' => __('Enter some text to display in top bar besides Phone no. e.g. Email', 'health-plus'), 'id' => 'email', 'type' => 'text', 'default' => ''))));
// HOME
Redux::setSection($opt_name, array('icon' => 'el-icon-home', 'title' => __('Home', 'health-plus')));
Redux::setSection($opt_name, array('title' => __('Banner: Home v1', 'health-plus'), 'subsection' => true, 'fields' => array(array("desc" => __('Will apply to pages with template Home v1 only.', 'health-plus'), "id" => "banner_info", "type" => "info", 'style' => 'warning'), array("title" => __('Banner Title', 'health-plus'), "desc" => __('Title to show on banner besides the appointment form.', 'health-plus'), "id" => "banner_title", "type" => "text"), array('title' => __('Banner Timing', 'health-plus'), 'desc' => __('Wok times schedule to display on banner. HTML is allowed.', 'health-plus'), 'id' => 'banner_times', 'type' => 'textarea', 'validate' => 'html'), array('title' => __('Banner Contents', 'health-plus'), 'desc' => __('Contents to show on banner. HTML is allowed.', 'health-plus'), 'id' => 'banner_contents', 'type' => 'textarea', 'validate' => 'html'))));
Redux::setSection($opt_name, array('title' => __('Banner: Home v2', 'health-plus'), 'subsection' => true, 'fields' => array(array("desc" => __('Will apply to pages with template Home v2 only.', 'health-plus'), "id" => "banner_info_b", "type" => "info", 'style' => 'warning'), array("title" => __('Banner Title', 'health-plus'), "desc" => __('Title to show on banner besides the appointment form.', 'health-plus'), "id" => "banner_title_b", "type" => "text"), array('title' => __('Banner Contents', 'health-plus'), 'desc' => __('Contents to show on banner. HTML is allowed.', 'health-plus'), 'id' => 'banner_contents_b', 'type' => 'textarea', 'validate' => 'html'))));
Redux::setSection($opt_name, array('title' => __('Appointment Form', 'health-plus'), 'subsection' => true, 'fields' => array(array("title" => __('Form Title', 'health-plus'), "desc" => __('Title to show before the form.', 'health-plus'), "id" => "appt_form_title", "type" => "text"), array("desc" => __('Make sure that you have Contact Form 7 plugin installed and activated.', 'health-plus'), "id" => "appt_form_info", "type" => "info", 'style' => 'warning'), array('title' => __('Form Shortcode', 'health-plus'), 'desc' => __('Insert contact form 7 shortcode here.', 'health-plus'), 'id' => 'appt_form', 'type' => 'text'))));
// FOOTER
Redux::setSection($opt_name, array('icon' => 'el-icon-cogs', 'title' => __('Footer', 'health-plus'), 'fields' => array(array('id' => 'footer_subscription', 'type' => 'switch', 'title' => __('Subscription Form', 'health-plus'), 'desc' => __('Show / Hide subscription form in footer above the widgets area.', 'health-plus'), 'default' => true, 'on' => 'Show', 'off' => 'Hide'), array("desc" => __('Make sure that Mailchimp for Wordpress plugin is installed and active.', 'health-plus'), "id" => "footer_subscription_info", "type" => "info", 'style' => 'info', 'required' => array('footer_subscription', 'equals', true)), array("title" => __('Subscription Title', 'health-plus'), "desc" => __('Title to show before the subscription form.', 'health-plus'), "id" => "footer_subscription_title", "type" => "text", 'validate' => 'html'), array("title" => __('Copyright Text', 'health-plus'), "desc" => __('Copyright information at the bottom. Basic HTML tags are allowed.', 'health-plus'), "id" => "footer_text", "type" => "textarea", 'validate' => 'html'))));
示例15: array
<?php
/*
* Footer Styles Options
*/
global $opt_name;
Redux::setSection($opt_name, array('title' => __('Footer', 'inspiry'), 'id' => 'footer-styles', 'desc' => __('This sub section contains footer styles options.', 'inspiry'), 'subsection' => true, 'fields' => array(array('id' => 'inspiry_footer_variation', 'type' => 'button_set', 'title' => __('Overall Footer Style', 'inspiry'), 'options' => array('one' => __('Light', 'inspiry'), 'two' => __('Dark', 'inspiry')), 'default' => 'one'), array('id' => 'inspiry_footer_divider', 'type' => 'divide'), array('id' => 'inspiry_light_footer_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.site-footer'), 'title' => __('Footer Background Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_heading', 'type' => 'color', 'output' => array('.site-footer h1', '.site-footer h2', '.site-footer h3', '.site-footer h4', '.site-footer h5', '.site-footer h6', '.site-footer .h1', '.site-footer .h2', '.site-footer .h3', '.site-footer .h4', '.site-footer .h5', '.site-footer .h6'), 'title' => __('Footer Headings Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_text', 'type' => 'color', 'output' => array('.site-footer'), 'title' => __('Footer Text Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_light_footer_link', 'type' => 'link_color', 'title' => __('Footer Link Color', 'inspiry'), 'active' => true, 'output' => array('.site-footer a'), 'default' => array('regular' => '#9aa2aa', 'hover' => '#0dbae8', 'active' => '#0dbae8'), 'required' => array('inspiry_footer_variation', '=', 'one')), array('id' => 'inspiry_dark_footer_bg', 'type' => 'color', 'mode' => 'background-color', 'output' => array('.site-footer-two'), 'title' => __('Footer Background Color', 'inspiry'), 'desc' => 'default: #4a525d', 'default' => '#4a525d', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_heading', 'type' => 'color', 'output' => array('.site-footer-two h1', '.site-footer-two h2', '.site-footer-two h3', '.site-footer-two h4', '.site-footer-two h5', '.site-footer-two h6', '.site-footer-two .h1', '.site-footer-two .h2', '.site-footer-two .h3', '.site-footer-two .h4', '.site-footer-two .h5', '.site-footer-two .h6'), 'title' => __('Footer Headings Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_text', 'type' => 'color', 'output' => array('.site-footer-two'), 'title' => __('Footer Text Color', 'inspiry'), 'desc' => 'default: #ffffff', 'default' => '#ffffff', 'transparent' => false, 'required' => array('inspiry_footer_variation', '=', 'two')), array('id' => 'inspiry_dark_footer_link', 'type' => 'link_color', 'title' => __('Footer Link Color', 'inspiry'), 'active' => true, 'output' => array('.site-footer-two a'), 'default' => array('regular' => '#9aa2aa', 'hover' => '#ffffff', 'active' => '#ffffff'), 'required' => array('inspiry_footer_variation', '=', 'two')))));