• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP weblizar_get_options函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中weblizar_get_options函数的典型用法代码示例。如果您正苦于以下问题:PHP weblizar_get_options函数的具体用法?PHP weblizar_get_options怎么用?PHP weblizar_get_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: weblizar_scripts

function weblizar_scripts()
{
    //** font-awesome-4.2.0 **//
    wp_enqueue_style('font-awesome-css', WL_TEMPLATE_DIR_URI . '/css/font-awesome-4.2.0/css/font-awesome.css');
    wp_enqueue_style('font-awesome-min-css', WL_TEMPLATE_DIR_URI . '/css/font-awesome-4.2.0/css/font-awesome.min.css');
    wp_enqueue_style('bootstrap-min', WL_TEMPLATE_DIR_URI . '/css/bootstrap.min.css');
    wp_enqueue_style('responsive', WL_TEMPLATE_DIR_URI . '/css/responsive.css');
    wp_enqueue_style('flat-blue', WL_TEMPLATE_DIR_URI . '/css/skins/flat-blue.css');
    wp_enqueue_style('theme-menu', WL_TEMPLATE_DIR_URI . '/css/theme-menu.css');
    wp_enqueue_style('carousel', WL_TEMPLATE_DIR_URI . '/css/carousel.css');
    // Js
    wp_enqueue_script('menu', WL_TEMPLATE_DIR_URI . '/js/menu/menu.js', array('jquery'));
    wp_enqueue_script('bootstrap-js', WL_TEMPLATE_DIR_URI . '/js/bootstrap.js');
    $count_posts = wp_count_posts();
    $published_posts = $count_posts->publish;
    $wl_theme_options = weblizar_get_options();
    $blog_count = $wl_theme_options['blog_count'];
    wp_enqueue_script('more-posts', WL_TEMPLATE_DIR_URI . '/js/more-posts.js');
    wp_localize_script('more-posts', 'load_more_posts_var', array('counts' => $published_posts, 'blog_count' => $blog_count));
}
开发者ID:sleeping-lion,项目名称:dojisa,代码行数:20,代码来源:functions.php


示例2: weblizar_get_options

<?php

$wl_theme_options = weblizar_get_options();
?>
<div class="rev-slider-full">
    <div class="rev-slider-banner-full  rev-slider-full">		
		<ul>			
            <li data-transition="fade" data-slotamount="7" data-masterspeed="300" >
                <img src="<?php 
echo GL_TEMPLATE_DIR_URI;
?>
/images/slide1-bg.jpg"  alt="rev-full1" data-fullwidthcentering="on">
				<?php 
if ($wl_theme_options['slide_image'] != '') {
    ?>
				<div class="tp-caption lfb stb stl"  data-x="0" data-y="120" data-speed="100" data-start="200" data-easing="easeOutExpo" data-end="6000" data-endspeed="500">
					
				 <img src="<?php 
    echo $wl_theme_options['slide_image'];
    ?>
" class="img-responsive img-slide" alt="First slide">
				</div>
                <?php 
}
?>
				<div class="tp-caption very_large_text2 sft str"
                     data-x="672"
                     data-y="100"
                     data-speed="300"
                     data-start="1800"
                     data-easing="easeOutCubic" data-end="5800" data-endspeed="500">
开发者ID:patrickcurl,项目名称:monks,代码行数:31,代码来源:home-slider.php


示例3: weblizar_gl_customizer

function weblizar_gl_customizer($wp_customize)
{
    wp_enqueue_style('customizr', WL_TEMPLATE_DIR_URI . '/css/customizr.css');
    $ImageUrl1 = WL_TEMPLATE_DIR_URI . "/images/1.png";
    $ImageUrl2 = WL_TEMPLATE_DIR_URI . "/images/2.png";
    $ImageUrl3 = WL_TEMPLATE_DIR_URI . "/images/3.png";
    $ImageUrl4 = esc_url(get_template_directory_uri() . "/images/home-ppt1.png");
    $ImageUrl5 = esc_url(get_template_directory_uri() . "/images/home-ppt2.png");
    $ImageUrl6 = esc_url(get_template_directory_uri() . "/images/home-ppt3.png");
    $ImageUrl7 = esc_url(get_template_directory_uri() . "/images/home-ppt4.png");
    /* Genral section */
    $wp_customize->add_panel('enigma_theme_option', array('title' => __('Theme Options', 'weblizar'), 'priority' => 1));
    $wp_customize->add_section('general_sec', array('title' => __('Theme General Options', 'weblizar'), 'description' => 'Here you can customize Your theme\'s general Settings', 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35));
    $wl_theme_options = weblizar_get_options();
    $wp_customize->add_setting('enigma_options[_frontpage]', array('type' => 'option', 'default' => $wl_theme_options['_frontpage'], 'sanitize_callback' => 'enigma_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('enigma_front_page', array('label' => __('Show Front Page', 'weblizar'), 'type' => 'checkbox', 'section' => 'general_sec', 'settings' => 'enigma_options[_frontpage]'));
    $wp_customize->add_setting('enigma_options[upload_image_logo]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_logo'], 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[height]', array('type' => 'option', 'default' => $wl_theme_options['height'], 'sanitize_callback' => 'enigma_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[width]', array('type' => 'option', 'default' => $wl_theme_options['width'], 'sanitize_callback' => 'enigma_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_upload_image_logo', array('label' => __('Website Logo', 'weblizar'), 'section' => 'general_sec', 'settings' => 'enigma_options[upload_image_logo]')));
    $wp_customize->add_control('enigma_logo_height', array('label' => __('Logo Height', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'enigma_options[height]'));
    $wp_customize->add_control('enigma_logo_width', array('label' => __('Logo Width', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'enigma_options[width]'));
    $wp_customize->add_setting('enigma_options[upload_image_favicon]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_favicon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_upload_image_favicon', array('label' => __('Custom favicon', 'weblizar'), 'section' => 'general_sec', 'settings' => 'enigma_options[upload_image_favicon]')));
    $wp_customize->add_setting('weblizar_options[custom_css]', array('default' => esc_attr($wl_theme_options['custom_css']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_control('custom_css', array('label' => __('Custom CSS', 'weblizar'), 'type' => 'textarea', 'section' => 'general_sec', 'settings' => 'weblizar_options[custom_css]'));
    /* Slider options */
    $wp_customize->add_section('slider_sec', array('title' => __('Theme Slider Options', 'weblizar'), 'panel' => 'enigma_theme_option', 'description' => 'Here you can add slider images', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('enigma_options[slide_image_1]', array('type' => 'option', 'default' => $ImageUrl1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('enigma_options[slide_image_2]', array('type' => 'option', 'default' => $ImageUrl2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('enigma_options[slide_image_3]', array('type' => 'option', 'default' => $ImageUrl3, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('enigma_options[slide_title_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_title_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_title_3]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_3'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_desc_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_desc_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_desc_3]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_3'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_btn_text_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_btn_text_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_btn_text_3]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_3'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[slide_btn_link_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('enigma_options[slide_btn_link_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('enigma_options[slide_btn_link_3]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_3'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_slider_image_1', array('label' => __('Slider Image One', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_image_1]')));
    $wp_customize->add_control('enigma_slide_title_1', array('label' => __('Slider title one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_title_1]'));
    $wp_customize->add_control('enigma_slide_desc_1', array('label' => __('Slider description one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_desc_1]'));
    $wp_customize->add_control('Slider button one', array('label' => __('Slider Button Text One', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_text_1]'));
    $wp_customize->add_control('enigma_slide_btnlink_1', array('label' => __('Slider Button Link One', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_link_1]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_slider_image_2', array('label' => __('Slider Image Two ', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_image_2]')));
    $wp_customize->add_control('enigma_slide_title_2', array('label' => __('Slider Title Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_title_2]'));
    $wp_customize->add_control('enigma_slide_desc_2', array('label' => __('Slider Description Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_desc_2]'));
    $wp_customize->add_control('enigma_slide_btn_2', array('label' => __('Slider Button Text Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_text_2]'));
    $wp_customize->add_control('enigma_slide_btnlink_2', array('label' => __('Slider Button Link Two', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_link_2]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_slider_image_3', array('label' => __('Slider Image Three', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_image_3]')));
    $wp_customize->add_control('enigma_slide_title_3', array('label' => __('Slider Title Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_title_3]'));
    $wp_customize->add_control('enigma_slide_desc_3', array('label' => __('Slider Description Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_desc_3]'));
    $wp_customize->add_control('enigma_slide_btn_3', array('label' => __('Slider Button Text Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_text_3]'));
    $wp_customize->add_control('enigma_slide_btnlink_3', array('label' => __('Slider Button Link Three', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'enigma_options[slide_btn_link_3]'));
    /* Service Options */
    $wp_customize->add_section('service_section', array('title' => __("Service Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('enigma_options[home_service_heading]', array('default' => esc_attr($wl_theme_options['home_service_heading']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_control('home_service_heading', array('label' => __('Home Service Title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[home_service_heading]'));
    $wp_customize->add_setting('enigma_options[service_1_icons]', array('default' => esc_attr($wl_theme_options['service_1_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[service_2_icons]', array('default' => esc_attr($wl_theme_options['service_2_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[service_3_icons]', array('default' => esc_attr($wl_theme_options['service_3_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[service_1_title]', array('default' => esc_attr($wl_theme_options['service_1_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[service_2_title]', array('default' => esc_attr($wl_theme_options['service_2_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[service_3_title]', array('default' => esc_attr($wl_theme_options['service_3_title']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[service_1_text]', array('default' => esc_attr($wl_theme_options['service_1_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[service_2_text]', array('default' => esc_attr($wl_theme_options['service_2_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[service_3_text]', array('default' => esc_attr($wl_theme_options['service_3_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'service_options1-line', array('section' => 'service_section', 'type' => 'line')));
    $wp_customize->add_control('service_one_title', array('label' => __('Service One Title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_1_title]'));
    $wp_customize->add_control('enigma_options[service_1_icons]', array('label' => __('Service Icon One', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'service_section', 'type' => 'text', 'settings' => 'enigma_options[service_1_icons]'));
    $wp_customize->add_control('service_one_text', array('label' => __('Service One Text', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_1_text]'));
    $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'service_options2-line', array('section' => 'service_section', 'type' => 'line')));
    $wp_customize->add_control('service_two_title', array('label' => __('Service Two Title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_2_title]'));
    $wp_customize->add_control('enigma_options[service_2_icons]', array('label' => __('Service Icon Two', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'service_section', 'type' => 'text', 'settings' => 'enigma_options[service_2_icons]'));
    $wp_customize->add_control('enigma_service_two_text', array('label' => __('Service Two Text', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_2_text]'));
    $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'enigma_service_options3-line', array('section' => 'service_section', 'type' => 'line')));
    $wp_customize->add_control('enigma_service_three_title', array('label' => __('Service Three Title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_3_title]'));
    $wp_customize->add_control('enigma_options[service_3_icons]', array('label' => __('Service Icon Three', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'service_section', 'type' => 'text', 'settings' => 'enigma_options[service_3_icons]'));
    $wp_customize->add_control('enigma_service_three_text', array('label' => __('Service Three Text', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'enigma_options[service_3_text]'));
    // Certification Section
    $wp_customize->add_section('certification_section', array('title' => __("Certification Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('enigma_options[home_certification_heading]', array('default' => esc_attr($wl_theme_options['home_certification_heading']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_control('home_certification_heading', array('label' => __('Home Certification Title', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[home_certification_heading]'));
    $wp_customize->add_setting('enigma_options[certification_1_icons]', array('default' => esc_attr($wl_theme_options['certification_1_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[certification_2_icons]', array('default' => esc_attr($wl_theme_options['certification_2_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[certification_3_icons]', array('default' => esc_attr($wl_theme_options['certification_3_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[certification_1_title]', array('default' => esc_attr($wl_theme_options['certification_1_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[certification_2_title]', array('default' => esc_attr($wl_theme_options['certification_2_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text'));
    $wp_customize->add_setting('enigma_options[certification_3_title]', array('default' => esc_attr($wl_theme_options['certification_3_title']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[certification_1_text]', array('default' => esc_attr($wl_theme_options['certification_1_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[certification_2_text]', array('default' => esc_attr($wl_theme_options['certification_2_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('enigma_options[certification_3_text]', array('default' => esc_attr($wl_theme_options['certification_3_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'certification_options1-line', array('section' => 'certification_section', 'type' => 'line')));
    $wp_customize->add_control('certification_one_title', array('label' => __('Certification One Title', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_1_title]'));
    $wp_customize->add_control('enigma_options[certification_1_icons]', array('label' => __('Certification Icon One', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'certification_section', 'type' => 'text', 'settings' => 'enigma_options[certification_1_icons]'));
    $wp_customize->add_control('certification_one_text', array('label' => __('Certification One Text', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_1_text]'));
//.........这里部分代码省略.........
开发者ID:jemandez,项目名称:Luna,代码行数:101,代码来源:customizer.php


示例4: weblizar_customizer

function weblizar_customizer($wp_customize)
{
    wp_enqueue_style('customizr', WL_TEMPLATE_DIR_URI . '/css/customizr.css');
    $ImageUrl1 = get_template_directory_uri() . "/images/slide-1.jpg";
    $ImageUrl2 = get_template_directory_uri() . "/images/slide-2.jpg";
    $ImageUrl3 = get_template_directory_uri() . "/images/slide-3.jpg";
    /* Genral section */
    /* Slider Section */
    $wp_customize->add_panel('weblizar_theme_option', array('title' => __('Weblizar Options', 'weblizar'), 'priority' => 1));
    $wp_customize->add_section('general_sec', array('title' => __('Theme General Options', 'weblizar'), 'description' => __('Here you can customize Your theme\'s general Settings', 'weblizar'), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35));
    $wl_theme_options = weblizar_get_options();
    //var_dump($wl_theme_options['upload_image_logo']); die;
    $wp_customize->add_setting('weblizar_options[_frontpage]', array('type' => 'option', 'default' => $wl_theme_options['_frontpage'], 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('weblizar_front_page', array('label' => __('Show Front Page', 'weblizar'), 'type' => 'checkbox', 'section' => 'general_sec', 'settings' => 'weblizar_options[_frontpage]'));
    $wp_customize->add_setting('weblizar_options[upload_image_logo]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_logo'], 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('weblizar_options[height]', array('type' => 'option', 'default' => $wl_theme_options['height'], 'sanitize_callback' => 'weblizar_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('weblizar_options[width]', array('type' => 'option', 'default' => $wl_theme_options['width'], 'sanitize_callback' => 'weblizar_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('weblizar_options[upload_image_favicon]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_favicon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_upload_image_logo', array('label' => __('Website Logo', 'weblizar'), 'section' => 'general_sec', 'settings' => 'weblizar_options[upload_image_logo]')));
    $wp_customize->add_control('weblizar_logo_height', array('label' => __('Logo Height', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'weblizar_options[height]'));
    $wp_customize->add_control('weblizar_logo_width', array('label' => __('Logo Width', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'weblizar_options[width]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_upload_favicon_image', array('label' => __('Custom favicon', 'weblizar'), 'section' => 'general_sec', 'settings' => 'weblizar_options[upload_image_favicon]')));
    $wp_customize->add_setting('weblizar_options[custom_css]', array('default' => esc_attr($wl_theme_options['custom_css']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_control('custom_css', array('label' => __('Custom CSS', 'weblizar'), 'type' => 'textarea', 'section' => 'general_sec', 'settings' => 'weblizar_options[custom_css]'));
    /* Slider Section */
    $wp_customize->add_section('slider_sec', array('title' => __('Theme Slider Options', 'weblizar'), 'panel' => 'weblizar_theme_option', 'description' => __('Here you can add slider images', 'weblizar'), 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('weblizar_options[slide_image]', array('type' => 'option', 'default' => $ImageUrl1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('weblizar_options[slide_image_1]', array('type' => 'option', 'default' => $ImageUrl2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('weblizar_options[slide_image_2]', array('type' => 'option', 'default' => $ImageUrl3, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('weblizar_options[slide_title]', array('type' => 'option', 'default' => $wl_theme_options['slide_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_title_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_title_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_desc]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_desc_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_desc_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_btn_text]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_btn_text_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_btn_text_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[slide_btn_link]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('weblizar_options[slide_btn_link_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('weblizar_options[slide_btn_link_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_1', array('label' => __('Slider Image One', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_image]')));
    $wp_customize->add_control('weblizar_slide_title_1', array('label' => __('Slider title one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_title]'));
    $wp_customize->add_control('weblizar_slide_desc_1', array('label' => __('Slider description one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_desc]'));
    $wp_customize->add_control('Slider button one', array('label' => __('Slider Button Text One', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_text]'));
    $wp_customize->add_control('weblizar_slide_btnlink_1', array('label' => __('Slider Button Link', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_link]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_2', array('label' => __('Slider Image Two ', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_image_1]')));
    $wp_customize->add_control('weblizar_slide_title_2', array('label' => __('Slider Title Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_title_1]'));
    $wp_customize->add_control('weblizar_slide_desc_2', array('label' => __('Slider Description Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_desc_1]'));
    $wp_customize->add_control('weblizar_slide_btn_2', array('label' => __('Slider Button Text Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_text_1]'));
    $wp_customize->add_control('weblizar_slide_btnlink_2', array('label' => __('Slider Link Two', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_link_1]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_3', array('label' => __('Slider Image Three', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_image_2]')));
    $wp_customize->add_control('weblizar_slide_title_3', array('label' => __('Slider Title Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_title_2]'));
    $wp_customize->add_control('weblizar_slide_desc_3', array('label' => __('Slider Description Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_desc_2]'));
    $wp_customize->add_control('weblizar_slide_btn_3', array('label' => __('Slider Button Text Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_text_2]'));
    $wp_customize->add_control('weblizar_slide_btnlink_3', array('label' => __('Slider Button Link Three', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'weblizar_options[slide_btn_link_2]'));
    /* Portfolio Section */
    $wp_customize->add_section('portfolio_section', array('title' => __('Portfolio Options', 'weblizar'), 'description' => __('Here you can add Portfolio title,description and even portfolios', 'weblizar'), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 36, 'active_callback' => 'is_front_page'));
    /* Blog Option */
    $wp_customize->add_section('blog_section', array('title' => __('Site Info Option', 'weblizar'), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 37));
    $wp_customize->add_setting('weblizar_options[site_intro_title]', array('default' => esc_attr($wl_theme_options['site_intro_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[site_intro_text]', array('default' => esc_attr($wl_theme_options['site_intro_text']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('weblizar_options[blog_title]', array('default' => esc_attr($wl_theme_options['blog_title']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('weblizar_blog_title', array('label' => __('Home Blog Title', 'weblizar'), 'type' => 'text', 'section' => 'blog_section', 'settings' => 'weblizar_options[blog_title]'));
    $wp_customize->add_setting('weblizar_options[blog_text]', array('default' => esc_attr($wl_theme_options['blog_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('weblizar_options[blog_count]', array('default' => $wl_theme_options['blog_count'], 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options'));
    $count_posts = wp_count_posts();
    $published_posts = $count_posts->publish;
    $wp_customize->add_control('weblizar_blog_count', array('label' => __('Show Home Blog Post', 'weblizar'), 'type' => 'select', 'section' => 'blog_section', 'settings' => 'weblizar_options[blog_count]', 'choices' => array('3' => '3', '6' => '6', '9' => '9', '12' => '12', '15' => '15', $published_posts => 'Show All Post')));
    $wp_customize->add_control('weblizar_blog_desc', array('label' => __('Home Blog Description', 'weblizar'), 'type' => 'textarea', 'section' => 'blog_section', 'settings' => 'weblizar_options[blog_text]'));
    $wp_customize->add_control('weblizar_service_title', array('label' => __('Site Info Title', 'weblizar'), 'type' => 'text', 'section' => 'blog_section', 'settings' => 'weblizar_options[site_intro_title]'));
    $wp_customize->add_control('weblizar_service_description', array('label' => __('Site Info Description', 'weblizar'), 'type' => 'textarea', 'section' => 'blog_section', 'settings' => 'weblizar_options[site_intro_text]'));
    /* Service Section */
    $wp_customize->add_section('service_section', array('title' => __("Service Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('weblizar_options[service_enable]', array('type' => 'option', 'default' => $wl_theme_options['service_enable'], 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('weblizar_service_enabled', array('label' => __('Enable Home Service', 'weblizar'), 'type' => 'checkbox', 'section' => 'service_section', 'settings' => 'weblizar_options[service_enable]'));
    for ($i = 1; $i <= 4; $i++) {
        $wp_customize->add_setting('weblizar_options[service_' . $i . '_icons]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
        $wp_customize->add_setting('weblizar_options[service_' . $i . '_title]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
        $wp_customize->add_setting('weblizar_options[service_' . $i . '_text]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options'));
        $wp_customize->add_setting('weblizar_options[service_' . $i . '_link]', array('type' => 'option', 'default' => $wl_theme_options['service_' . $i . '_link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    }
    for ($i = 1; $i <= 4; $i++) {
        $j = array('', ' One', ' Two', ' Three');
        $wp_customize->add_control(new weblizar_Customize_Misc_Control($wp_customize, 'weblizar_options1-line', array('section' => 'service_section', 'type' => 'line')));
        $wp_customize->add_control('weblizar_service_icon' . $i, array('label' => __('service-icon-' . $i . '', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'service_section', 'settings' => 'weblizar_options[service_' . $i . '_icons]'));
        $wp_customize->add_control('weblizar_service_title' . $i, array('label' => __('service-title-' . $i . '', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'weblizar_options[service_' . $i . '_title]'));
        $wp_customize->add_control('weblizar_service_description_' . $i, array('label' => __('service-text--' . $i . '', 'weblizar'), 'type' => 'textarea', 'section' => 'service_section', 'settings' => 'weblizar_options[service_' . $i . '_text]'));
        $wp_customize->add_control('weblizar_service_link_' . $i, array('label' => __('service-link-' . $i . '', 'weblizar'), 'type' => 'url', 'section' => 'service_section', 'settings' => 'weblizar_options[service_' . $i . '_link]'));
    }
    /* Social options */
    $wp_customize->add_section('social_section', array('title' => __("Social Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 41));
    /* $wp_customize->add_setting(
    	'weblizar_options[social_media_in_contact_page_enabled]',
    		array(
    		'default'=>esc_attr($wl_theme_options['social_media_in_contact_page_enabled']),
    		'type'=>'option',
    		'sanitize_callback'=>'weblizar_sanitize_checkbox',
    		'capability'=>'edit_theme_options'
    		)
//.........这里部分代码省略.........
开发者ID:sleeping-lion,项目名称:dojisa,代码行数:101,代码来源:customizer.php


示例5: weblizar_customizer

function weblizar_customizer($wp_customize)
{
    wp_enqueue_style('customizr', WL_TEMPLATE_DIR_URI . '/css/customizr.css');
    $ImageUrl1 = get_template_directory_uri() . "/images/slide-1.jpg";
    $ImageUrl2 = get_template_directory_uri() . "/images/slide-2.jpg";
    $ImageUrl3 = get_template_directory_uri() . "/images/slide-3.jpg";
    /* Genral section */
    /* Slider Section */
    $wp_customize->add_panel('weblizar_theme_option', array('title' => __('Guardian Options', 'weblizar'), 'priority' => 1));
    $wp_customize->add_section('general_sec', array('title' => __('Theme General Options', 'weblizar'), 'description' => __('Here you can customize Your theme\'s general Settings', 'weblizar'), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35));
    $wl_theme_options = weblizar_get_options();
    //var_dump($wl_theme_options['upload_image_logo']); die;
    $wp_customize->add_setting('guardian_options[_frontpage]', array('type' => 'option', 'default' => $wl_theme_options['_frontpage'], 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('weblizar_front_page', array('label' => __('Show Front Page', 'weblizar'), 'type' => 'checkbox', 'section' => 'general_sec', 'settings' => 'guardian_options[_frontpage]'));
    /* $wp_customize->add_setting(
    		'guardian_options[text_title]',
    		array(
    			'type'    => 'option',
    			'default'=>$wl_theme_options['text_title'],
    			'sanitize_callback'=>'weblizar_sanitize_checkbox',
    			'capability'        => 'edit_theme_options',
    		)
    	);
    	$wp_customize->add_control( 'weblizar_front_page_text_title', array(
    		'label'        => __( 'Show Text Title on Front Page', 'weblizar' ),
    		'type'=>'checkbox',
    		'section'    => 'general_sec',
    		'settings'   => 'guardian_options[text_title]',
    	) ); */
    $wp_customize->add_setting('guardian_options[upload_image_logo]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_logo'], 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('guardian_options[height]', array('type' => 'option', 'default' => $wl_theme_options['height'], 'sanitize_callback' => 'weblizar_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('guardian_options[width]', array('type' => 'option', 'default' => $wl_theme_options['width'], 'sanitize_callback' => 'weblizar_sanitize_integer', 'capability' => 'edit_theme_options'));
    $wp_customize->add_setting('guardian_options[upload_image_favicon]', array('type' => 'option', 'default' => $wl_theme_options['upload_image_favicon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_upload_image_logo', array('label' => __('Website Logo', 'weblizar'), 'section' => 'general_sec', 'settings' => 'guardian_options[upload_image_logo]')));
    $wp_customize->add_control('weblizar_logo_height', array('label' => __('Logo Height', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'guardian_options[height]'));
    $wp_customize->add_control('weblizar_logo_width', array('label' => __('Logo Width', 'weblizar'), 'type' => 'number', 'section' => 'general_sec', 'settings' => 'guardian_options[width]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_upload_favicon_image', array('label' => __('Custom favicon', 'weblizar'), 'section' => 'general_sec', 'settings' => 'guardian_options[upload_image_favicon]')));
    /* Slider Section */
    $wp_customize->add_section('slider_sec', array('title' => __('Theme Slider Options', 'weblizar'), 'panel' => 'weblizar_theme_option', 'description' => __('Here you can add slider images', 'weblizar'), 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('guardian_options[slide_image]', array('type' => 'option', 'default' => $ImageUrl1, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('guardian_options[slide_image_1]', array('type' => 'option', 'default' => $ImageUrl2, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('guardian_options[slide_image_2]', array('type' => 'option', 'default' => $ImageUrl3, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('guardian_options[slide_title]', array('type' => 'option', 'default' => $wl_theme_options['slide_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_title_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_title_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_title_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_desc]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_desc_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_desc_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_desc_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_btn_text]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_btn_text_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_btn_text_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_text_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[slide_btn_link]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('guardian_options[slide_btn_link_1]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_1'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_setting('guardian_options[slide_btn_link_2]', array('type' => 'option', 'default' => $wl_theme_options['slide_btn_link_2'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_1', array('label' => __('Slider Image One', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_image]')));
    $wp_customize->add_control('weblizar_slide_title_1', array('label' => __('Slider title one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_title]'));
    $wp_customize->add_control('weblizar_slide_desc_1', array('label' => __('Slider description one', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_desc]'));
    $wp_customize->add_control('Slider button one', array('label' => __('Slider Button Text One', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_text]'));
    $wp_customize->add_control('weblizar_slide_btnlink_1', array('label' => __('Slider Button Link', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_link]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_2', array('label' => __('Slider Image Two ', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_image_1]')));
    $wp_customize->add_control('weblizar_slide_title_2', array('label' => __('Slider Title Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_title_1]'));
    $wp_customize->add_control('weblizar_slide_desc_2', array('label' => __('Slider Description Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_desc_1]'));
    $wp_customize->add_control('weblizar_slide_btn_2', array('label' => __('Slider Button Text Two', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_text_1]'));
    $wp_customize->add_control('weblizar_slide_btnlink_2', array('label' => __('Slider Link Two', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_link_1]'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'weblizar_slider_image_3', array('label' => __('Slider Image Three', 'weblizar'), 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_image_2]')));
    $wp_customize->add_control('weblizar_slide_title_3', array('label' => __('Slider Title Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_title_2]'));
    $wp_customize->add_control('weblizar_slide_desc_3', array('label' => __('Slider Description Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_desc_2]'));
    $wp_customize->add_control('weblizar_slide_btn_3', array('label' => __('Slider Button Text Three', 'weblizar'), 'type' => 'text', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_text_2]'));
    $wp_customize->add_control('weblizar_slide_btnlink_3', array('label' => __('Slider Button Link Three', 'weblizar'), 'type' => 'url', 'section' => 'slider_sec', 'settings' => 'guardian_options[slide_btn_link_2]'));
    /* Blog Option */
    $wp_customize->add_section('blog_section', array('title' => __('Home Blog Options', 'weblizar'), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 37));
    $wp_customize->add_setting('guardian_options[blog_title]', array('default' => esc_attr($wl_theme_options['blog_title']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options'));
    $wp_customize->add_control('weblizar_blog_title', array('label' => __('Home Blog Title', 'weblizar'), 'type' => 'text', 'section' => 'blog_section', 'settings' => 'guardian_options[blog_title]'));
    /* Service Section */
    $wp_customize->add_section('service_section', array('title' => __("Service Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page'));
    $wp_customize->add_setting('guardian_options[home_service_title]', array('default' => esc_attr($wl_theme_options['home_service_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_setting('guardian_options[home_service_description]', array('default' => esc_attr($wl_theme_options['home_service_description']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
    $wp_customize->add_control('weblizar_service_title', array('label' => __('Service Title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'guardian_options[home_service_title]'));
    $wp_customize->add_control('weblizar_service_description', array('label' => __('Service Description', 'weblizar'), 'type' => 'textarea', 'section' => 'service_section', 'settings' => 'guardian_options[home_service_description]'));
    for ($i = 1; $i <= 4; $i++) {
        $wp_customize->add_setting('guardian_options[service_' . $i . '_icons]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
        $wp_customize->add_setting('guardian_options[service_' . $i . '_title]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_title']), 'type' => 'option', 'capabilit' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text'));
        $wp_customize->add_setting('guardian_options[service_' . $i . '_text]', array('default' => esc_attr($wl_theme_options['service_' . $i . '_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capabilit' => 'edit_theme_options'));
        $wp_customize->add_setting('guardian_options[service_' . $i . '_link]', array('type' => 'option', 'default' => $wl_theme_options['service_' . $i . '_link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw'));
    }
    for ($i = 1;  

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP weblog_ping函数代码示例发布时间:2022-05-23
下一篇:
PHP web_url函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap