当前位置: 首页>>代码示例>>PHP>>正文


PHP Redux::setSections方法代码示例

本文整理汇总了PHP中Redux::setSections方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux::setSections方法的具体用法?PHP Redux::setSections怎么用?PHP Redux::setSections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Redux的用法示例。

在下文中一共展示了Redux::setSections方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: array

                            'description' => "Upload your own logo, change background color or images, select links color which you love - it's limitless",
                            'url'         => '<a class="da-link" href="#">Learn more</a>',
                            'enabled'     => 1,
                        )
                    )
                ),
*/
Redux::setSections($opt_name, array(array('id' => 'evl-tab-8', 'title' => __('Parallax Slider', 'evolve'), 'icon' => 't4p-icon-appbarmonitor', 'fields' => $fields)));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-9', 'title' => __('Posts Slider', 'evolve'), 'icon' => 't4p-icon-appbarvideogallery', 'fields' => array(array('subtitle' => __('Display Posts Slider on the homepage, all pages or select the slider in the post/page edit mode.', 'evolve'), 'id' => 'evl_posts_slider', 'type' => 'select', 'options' => array('homepage' => __('Homepage only', 'evolve'), 'post' => __('Manually select in a Post/Page edit mode', 'evolve'), 'all' => __('All pages', 'evolve')), 'title' => __('Posts Slider placement', 'evolve'), 'default' => 'post'), array('id' => 'evl_posts_number', 'type' => 'spinner', 'min' => 1, 'max' => 10, 'title' => __('Number of posts to display', 'evolve'), 'default' => '5'), array('subtitle' => __('Choose to display latest posts or posts of a category.', 'evolve'), 'id' => 'evl_posts_slider_content', 'type' => 'select', 'options' => array('recent' => __('Recent posts', 'evolve'), 'category' => __('Posts in category', 'evolve')), 'title' => __('Slideshow content', 'evolve'), 'default' => 'recent'), array('subtitle' => __('Select post categories to pull content for the post slideshow.', 'evolve'), 'id' => 'evl_posts_slider_id', 'type' => 'select', 'multi' => true, 'data' => 'categories', 'required' => array(array('evl_posts_slider_content', '=', 'category')), 'title' => __('Category ID(s)', 'evolve')), array('subtitle' => __('Input the time between transitions (Default: 3500);', 'evolve'), 'id' => 'evl_carousel_speed', 'type' => 'spinner', 'title' => __('Slider Speed', 'evolve'), 'step' => 100, 'default' => '7000'), array('subtitle' => __('Sets the length of Slider Title. Default is 40', 'evolve'), 'id' => 'evl_posts_slider_title_length', 'type' => 'spinner', 'title' => __('Slider Title Length', 'evolve'), 'default' => '40'), array('subtitle' => __('Select the typography you want for the slide title. * non web-safe font.', 'evolve'), 'id' => 'evl_carousel_slide_title_font', 'type' => 'typography', 'line-height' => false, 'text-align' => false, 'title' => __('Slider Title font', 'evolve'), 'default' => array('font-size' => '36px', 'font-family' => 'Roboto', 'color' => '', 'font-style' => '')), array('subtitle' => __('Select the typography you want for the slide description. * non web-safe font.', 'evolve'), 'id' => 'evl_carousel_slide_subtitle_font', 'type' => 'typography', 'line-height' => false, 'text-align' => false, 'title' => __('Slider description font', 'evolve'), 'default' => array('font-size' => '18px', 'font-family' => 'Roboto', 'color' => '', 'font-style' => ''))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-17', 'title' => __('Flexslider', 'evolve'), 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'icon' => 't4p-icon-appbarlayer', 'fields' => array(array('subtitle' => __('Turn on to autoplay the slideshow.', 'evolve'), 'id' => 'evl_slideshow_autoplay', 'type' => 'switch', 'title' => __('Autoplay', 'evolve')), array('subtitle' => __('Controls the speed of slideshows for the [slider] shortcode and sliders within posts. 1000 = 1 second.', 'evolve'), 'id' => 'evl_slideshow_speed', 'type' => 'spinner', 'title' => __('Slideshow speed', 'evolve'), 'default' => '7000'), array('subtitle' => __('Controls the number of slides per group for the flexslider plugin.', 'evolve'), 'id' => 'evl_flexslider_number', 'type' => 'spinner', 'title' => __('Number of FlexSlider Slides', 'evolve'), 'default' => '5'), array('subtitle' => __('Turn on if you want to show pagination circles below a video slide for flexslider. Leave it off to hide them on video slides.', 'evolve'), 'id' => 'evl_pagination_video_slide', 'type' => 'switch', 'title' => __('Pagination circles below video slides', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-19', 'title' => __('Lightbox', 'evolve'), 'icon' => 't4p-icon-appbarwindowmaximize', 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'fields' => array(array('subtitle' => __('Set the speed of the animation.', 'evolve'), 'id' => 'evl_lightbox_animation_speed', 'type' => 'select', 'options' => array('fast' => __('Fast', 'evolve'), 'slow' => __('Slow', 'evolve'), 'normal' => __('Normal', 'evolve')), 'title' => __('Animation Speed', 'evolve'), 'default' => 'fast'), array('subtitle' => __('Show the gallery.', 'evolve'), 'id' => 'evl_lightbox_gallery', 'type' => 'switch', 'title' => __('Show gallery', 'evolve')), array('subtitle' => __('Autoplay the lightbox gallery.', 'evolve'), 'id' => 'evl_lightbox_autoplay', 'type' => 'switch', 'title' => __('Autoplay the Lightbox Gallery', 'evolve')), array('subtitle' => __('If autoplay is enabled, set the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_lightbox_slideshow_speed', 'type' => 'spinner', 'title' => __('Slideshow Speed', 'evolve'), 'default' => '5000'), array('subtitle' => __('Set the opacity of background, <br />0.1 (lowest) to 1 (highest).', 'evolve'), 'id' => 'evl_lightbox_opacity', 'type' => 'slider', 'min' => 0.1, 'max' => 1, 'step' => 0.1, 'resolution' => 0.1, 'title' => __('Background Opacity', 'evolve'), 'default' => '0.8'), array('subtitle' => __('Show the image caption.', 'evolve'), 'id' => 'evl_lightbox_title', 'type' => 'switch', 'title' => __('Show Caption', 'evolve')), array('subtitle' => __('Show the image description. The Alternative text field is used for the description.', 'evolve'), 'id' => 'evl_lightbox_subtitle', 'type' => 'switch', 'title' => __('Show description', 'evolve')), array('subtitle' => __('Show social sharing buttons on lightbox.', 'evolve'), 'id' => 'evl_lightbox_social', 'type' => 'switch', 'title' => __('Social Sharing', 'evolve')), array('subtitle' => __('Show post images that are inside the post content area in the lightbox.', 'evolve'), 'id' => 'evl_lightbox_post_images', 'type' => 'switch', 'title' => __('Show Post Images in Lightbox', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-13', 'title' => __('Contact', 'evolve'), 'icon' => 't4p-icon-appbarlocationcheckin', 'fields' => array(array('subtitle' => __('Select the type of google map to show on the contact page.', 'evolve'), 'id' => 'evl_gmap_type', 'type' => 'select', 'options' => array('roadmap' => __('roadmap', 'evolve'), 'satellite' => __('satellite', 'evolve'), 'hybrid' => __('hybrid (default)', 'evolve'), 'terrain' => __('terrain', 'evolve')), 'title' => __('Google Map Type', 'evolve'), 'default' => 'hybrid'), array('subtitle' => __('(in pixels or percentage, e.g.:100% or 100px)', 'evolve'), 'id' => 'evl_gmap_width', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Width', 'evolve'), 'default' => '100%'), array('subtitle' => __('(in pixels, e.g.: 100px)', 'evolve'), 'id' => 'evl_gmap_height', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Height', 'evolve'), 'default' => '415px'), array('subtitle' => __('Example: 775 New York Ave, Brooklyn, Kings, New York 11203.<br /> For multiple markers, separate the addresses with the | symbol. ex: Address 1|Address 2|Address 3.', 'evolve'), 'id' => 'evl_gmap_address', 'compiler' => true, 'type' => 'text', 'title' => __('Google Map Address', 'evolve'), 'default' => 'Via dei Fori Imperiali'), array('subtitle' => __('Insert name of header which will be in the header of sent email.', 'evolve'), 'id' => 'evl_sent_email_header', 'type' => 'text', 'title' => __('Sent Email Header (From)', 'evolve'), 'default' => 'Evolve'), array('subtitle' => __('Enter the email adress the form will be sent to.', 'evolve'), 'id' => 'evl_email_address', 'type' => 'text', 'title' => __('Email Address', 'evolve')), array('subtitle' => __('Higher number will be more zoomed in.', 'evolve'), 'id' => 'evl_map_zoom_level', 'type' => 'slider', 'min' => 0, 'max' => 25, 'title' => __('Map Zoom Level', 'evolve'), 'default' => '18'), array('subtitle' => __('Display the address pin.', 'evolve'), 'id' => 'evl_map_pin', 'type' => 'switch', 'on' => __('Hide', 'evolve'), 'off' => __('Show', 'evolve'), 'title' => __('Hide Address Pin', 'evolve')), array('subtitle' => __('Keep the popup graphic with address info hidden when the google map loads. It will only show when the pin on the map is clicked.', 'evolve'), 'id' => 'evl_map_popup', 'type' => 'switch', 'title' => __('Show Map Popup On Click', 'evolve')), array('subtitle' => __('Disable scrollwheel on google maps.', 'evolve'), 'id' => 'evl_map_scrollwheel', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'type' => 'switch', 'title' => __('Disable Map Scrollwheel', 'evolve')), array('subtitle' => __('Disable scale on google maps.', 'evolve'), 'id' => 'evl_map_scale', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Scale', 'evolve')), array('subtitle' => __('Check the box to disable zoom control icon and pan control icon on google maps.', 'evolve'), 'id' => 'evl_map_zoomcontrol', 'type' => 'switch', 'on' => __('Disabled', 'evolve'), 'off' => __('Enabled', 'evolve'), 'title' => __('Disable Map Zoom & Pan Control Icons', 'evolve')), array('subtitle' => sprintf(__('Get Google reCAPTCHA keys <a href="%s">here</a>  to enable spam protection on the contact page.', 'evolve'), 'https://www.google.com/recaptcha/admin'), 'id' => 'evl_captcha_plugin', 'style' => 'warning', 'type' => 'info', 'notice' => false), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_public', 'type' => 'text', 'title' => __('Google reCAPTCHA Site Key', 'evolve')), array('subtitle' => __('Follow the steps in our docs to get your key', 'evolve'), 'id' => 'evl_recaptcha_private', 'type' => 'text', 'title' => __('Google reCAPTCHA Secret key', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-7', 'title' => __('Extra', 'evolve'), 'icon' => 't4p-icon-appbarsettings', 'fields' => array(array('subtitle' => __('Select the slideshow speed, 1000 = 1 second.', 'evolve'), 'id' => 'evl_testimonials_speed', 'type' => 'spinner', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Testimonials Speed', 'evolve'), 'default' => '4000'), array('subtitle' => __('Check the box to add rel="nofollow" attribute to social sharing box shortcode.', 'evolve'), 'id' => 'evl_nofollow_social_links', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Add rel="nofollow" to social links', 'evolve')), array('subtitle' => __('Check this box if you want to enable breadcrumbs navigation', 'evolve'), 'id' => 'evl_breadcrumbs', 'type' => 'checkbox', 'title' => __('Enable Breadcrumbs Navigation', 'evolve'), 'default' => '1'), array('subtitle' => __('Choose the position of the <strong>Older/Newer Posts</strong> links', 'evolve'), 'id' => 'evl_nav_links', 'type' => 'select', 'options' => array('after' => __('After posts', 'evolve'), 'before' => __('Before posts', 'evolve'), 'both' => __('Both', 'evolve')), 'title' => __('Position of navigation links', 'evolve'), 'default' => 'after'), array('id' => 'evl_pos_button', 'type' => 'select', 'compiler' => true, 'options' => array('disable' => __('Disable', 'evolve'), 'left' => __('Left', 'evolve'), 'right' => __('Right', 'evolve'), 'middle' => __('Middle', 'evolve')), 'title' => __('Position of \'Back to Top\' button', 'evolve'), 'default' => 'right'), array('subtitle' => __('<h3 style=\'margin: 0;\'>Options For Plugins Integrated Within The Theme</h3>', 'evolve'), 'id' => 'evl_plugins_only', 'type' => 'info'), array('subtitle' => __('Check this box if you want to enable FlexSlider support', 'evolve'), 'id' => 'evl_flexslider', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Enable FlexSlider support', 'evolve')), array('subtitle' => __('Check this box if you want to enable Parallax Slider support', 'evolve'), 'id' => 'evl_parallax_slider_support', 'type' => 'checkbox', 'title' => __('Enable Parallax Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Carousel Slider support', 'evolve'), 'id' => 'evl_carousel_slider', 'type' => 'checkbox', 'title' => __('Enable Carousel Slider support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Google Map Scripts', 'evolve'), 'id' => 'evl_status_gmap', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Google Map Scripts', 'evolve'), 'default' => '1'), array('subtitle' => __('Check this box if you want to enable Animate.css plugin support - (menu hover effect, featured image hover effect, button hover effect, etc.)', 'evolve'), 'id' => 'evl_animatecss', 'compiler' => true, 'type' => 'checkbox', 'title' => __('Enable Animate.css plugin support', 'evolve'), 'default' => '1'), array('subtitle' => __('Check the box to disable Youtube API scripts.', 'evolve'), 'id' => 'evl_status_yt', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Disable Youtube API Scripts', 'evolve')), array('subtitle' => __('Check the box to disable Vimeo API scripts.', 'evolve'), 'id' => 'evl_status_vimeo', 'type' => 'checkbox', 'locked' => sprintf(__('This option is only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'title' => __('Disable Vimeo API Scripts', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-12', 'title' => __('WooCommerce', 'evolve'), 'locked' => sprintf(__('These options are only available with the <a href="%s" target="_blank">evolve+ Premium</a> version.', 'evolve'), $t4p_url . 'evolve-multipurpose-wordpress-theme/'), 'icon' => 't4p-icon-appbarcart', 'fields' => array(array('subtitle' => __('Insert the number of posts to display per page.', 'evolve'), 'id' => 'evl_woo_items', 'type' => 'text', 'title' => __('Number of Products per Page', 'evolve'), 'default' => '12'), array('subtitle' => __('Check the box to disable the ordering boxes displayed on the shop page.', 'evolve'), 'id' => 'evl_woocommerce_evolve_ordering', 'type' => 'checkbox', 'title' => __('Disable Woocommerce Shop Page Ordering Boxes', 'evolve')), array('subtitle' => __('Check the box to use evolve\'s one page checkout template.', 'evolve'), 'id' => 'evl_woocommerce_one_page_checkout', 'type' => 'checkbox', 'title' => __('Use Woocommerce One Page Checkout', 'evolve')), array('subtitle' => __('Check the box to show the order notes on the checkout page.', 'evolve'), 'id' => 'evl_woocommerce_enable_order_notes', 'type' => 'checkbox', 'title' => __('Show Woocommerce Order Notes on Checkout', 'evolve')), array('subtitle' => __('Check the box to show My Account link, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_acc_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce My Account Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the Cart icon, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_cart_link_main_nav', 'type' => 'checkbox', 'title' => __('Show Woocommerce Cart Link in Header', 'evolve')), array('subtitle' => __('Check the box to show the social icons on product pages, uncheck to disable.', 'evolve'), 'id' => 'evl_woocommerce_social_links', 'type' => 'checkbox', 'title' => __('Show Woocommerce Social Icons', 'evolve')), array('subtitle' => __('Insert your text and it will appear in the first message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_1', 'type' => 'textarea', 'title' => __('Account Area Message 1', 'evolve'), 'default' => 'Call us - <i class="fa fa-phone"></i> 7438 882 764'), array('subtitle' => __('Insert your text and it will appear in the second message box on the account page.', 'evolve'), 'id' => 'evl_woo_acc_msg_2', 'type' => 'textarea', 'title' => __('Account Area Message 2', 'evolve'), 'default' => 'Email us - <i class="fa fa-envelope"></i> contact@example.com')))));
Redux::setSections($opt_name, array(array('id' => 'evl-tab-11', 'title' => __('Custom CSS', 'evolve'), 'icon' => 't4p-icon-appbarsymbolbraces', 'fields' => array(array('subtitle' => __('Paste your CSS code, do not include any tags or HTML in this field. Any custom CSS entered here will override the theme CSS. In some cases, the !important tag may be needed.', 'evolve'), 'id' => 'evl_css_content', 'type' => 'textarea', 'title' => __('Custom CSS', 'evolve'))))));
Redux::setSections($opt_name, array(array('id' => 'import/export', 'title' => __('Import / Export', 'evolve'), 'heading' => '', 'icon' => 't4p-icon-appbarinbox', 'customizer' => false, 'fields' => array(array('id' => 'redux_import_export', 'type' => 'import_export', 'full_width' => true)))));
add_action("redux/extension/customizer/control/includes", 'evolve_extend_customizer');
function evolve_extend_customizer()
{
    // Extra customizer field types
    if (!class_exists('Redux_Customizer_Control_spinner')) {
        class Redux_Customizer_Control_spinner extends Redux_Customizer_Control
        {
            public $type = "redux-spinner";
        }
    }
    if (!class_exists('Redux_Customizer_Control_slider')) {
        class Redux_Customizer_Control_slider extends Redux_Customizer_Control
        {
            public $type = "redux-slider";
        }
开发者ID:George323,项目名称:njhykcy,代码行数:31,代码来源:options-init.php


示例2: init

 public function init()
 {
     Redux::setArgs($this->opt_name, $this->args);
     $sections = $this->addSections();
     Redux::setSections($this->opt_name, $sections);
 }
开发者ID:ergov2015,项目名称:condosky.dev,代码行数:6,代码来源:condo-config.php


示例3: get_option

    echo 'Permalink: : ' . (get_option('permalink_structure') ? get_option('permalink_structure') : 'Default') . '<br>';
    $front_page_display = get_option('show_on_front');
    if ($front_page_display == 'page') {
        $front_page_id = get_option('page_on_front');
        $blog_page_id = get_option('page_for_posts');
        echo 'Front Page: ' . ($front_page_id != 0 ? get_the_title($front_page_id) . ' (#' . $front_page_id . ')' : 'Unset') . '<br>';
        echo 'Posts Page: ' . ($blog_page_id != 0 ? get_the_title($blog_page_id) . ' (#' . $blog_page_id . ')' : 'Unset') . '<br>';
    }
    if (function_exists('ini_get')) {
        echo 'PHP memory limit: ' . ini_get('memory_limit');
    }
}
// END Config
if (class_exists('Redux')) {
    Redux::setArgs($opt_name, $args);
    Redux::setSections($opt_name, $sections);
}
/**
 * Get an array of registered post types with different options
 *
 * @param array $args
 * @return array
 */
function kleo_post_types($args = array())
{
    $kleo_post_types = array();
    if (isset($args['extra'])) {
        $kleo_post_types = $args['extra'];
    }
    $post_args = array('public' => true, '_builtin' => false);
    $types_return = 'objects';
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:options.php



注:本文中的Redux::setSections方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。