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)); }
<?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">
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]')); $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'certification_options2-line', array('section' => 'certification_section', 'type' => 'line'))); $wp_customize->add_control('certification_two_title', array('label' => __('Certification Two Title', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_2_title]')); $wp_customize->add_control('enigma_options[certification_2_icons]', array('label' => __('Certification Icon Two', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'certification_section', 'type' => 'text', 'settings' => 'enigma_options[certification_2_icons]')); $wp_customize->add_control('enigma_certification_two_text', array('label' => __('Certification Two Text', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_2_text]')); $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'enigma_certification_options3-line', array('section' => 'certification_section', 'type' => 'line'))); $wp_customize->add_control('enigma_certification_three_title', array('label' => __('Certification Three Title', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_3_title]')); $wp_customize->add_control('enigma_options[certification_3_icons]', array('label' => __('Certification Icon Three', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'certification_section', 'type' => 'text', 'settings' => 'enigma_options[certification_3_icons]')); $wp_customize->add_control('enigma_certification_three_text', array('label' => __('Certification Three Text', 'weblizar'), 'type' => 'text', 'section' => 'certification_section', 'settings' => 'enigma_options[certification_3_text]')); /*Avala Section*/ $wp_customize->add_section('avala_section', array('title' => __("Avala Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35, 'active_callback' => 'is_front_page')); $wp_customize->add_setting('enigma_options[home_avala_heading]', array('default' => esc_attr($wl_theme_options['home_avala_heading']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_control('home_avala_heading', array('label' => __('Home Avala Title', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[home_avala_heading]')); $wp_customize->add_setting('enigma_options[avala_1_icons]', array('default' => esc_attr($wl_theme_options['avala_1_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[avala_2_icons]', array('default' => esc_attr($wl_theme_options['avala_2_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[avala_3_icons]', array('default' => esc_attr($wl_theme_options['avala_3_icons']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[avala_1_title]', array('default' => esc_attr($wl_theme_options['avala_1_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[avala_2_title]', array('default' => esc_attr($wl_theme_options['avala_2_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[avala_3_title]', array('default' => esc_attr($wl_theme_options['avala_3_title']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_setting('enigma_options[avala_1_text]', array('default' => esc_attr($wl_theme_options['avala_1_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_setting('enigma_options[avala_2_text]', array('default' => esc_attr($wl_theme_options['avala_2_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_setting('enigma_options[avala_3_text]', array('default' => esc_attr($wl_theme_options['avala_3_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'avala_options1-line', array('section' => 'avala_section', 'type' => 'line'))); $wp_customize->add_control('avala_one_title', array('label' => __('Avala One Title', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_1_title]')); $wp_customize->add_control('enigma_options[avala_1_icons]', array('label' => __('Avala Icon One', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'avala_section', 'type' => 'text', 'settings' => 'enigma_options[avala_1_icons]')); $wp_customize->add_control('avala_one_text', array('label' => __('Avala One Text', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_1_text]')); $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'avala_options2-line', array('section' => 'avala_section', 'type' => 'line'))); $wp_customize->add_control('avala_two_title', array('label' => __('Avala Two Title', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_2_title]')); $wp_customize->add_control('enigma_options[avala_2_icons]', array('label' => __('Avala Icon Two', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'avala_section', 'type' => 'text', 'settings' => 'enigma_options[avala_2_icons]')); $wp_customize->add_control('enigma_avala_two_text', array('label' => __('Avala Two Text', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_2_text]')); $wp_customize->add_control(new enigma_Customize_Misc_Control($wp_customize, 'enigma_avala_options3-line', array('section' => 'avala_section', 'type' => 'line'))); $wp_customize->add_control('enigma_avala_three_title', array('label' => __('Avala Three Title', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_3_title]')); $wp_customize->add_control('enigma_options[avala_3_icons]', array('label' => __('Avala Icon Three', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'avala_section', 'type' => 'text', 'settings' => 'enigma_options[avala_3_icons]')); $wp_customize->add_control('enigma_avala_three_text', array('label' => __('Avala Three Text', 'weblizar'), 'type' => 'text', 'section' => 'avala_section', 'settings' => 'enigma_options[avala_3_text]')); /* 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' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35)); $wp_customize->add_setting('enigma_options[portfolio_home]', array('type' => 'option', 'default' => $wl_theme_options['portfolio_home'], 'sanitize_callback' => 'enigma_sanitize_checkbox', 'capability' => 'edit_theme_options')); $wp_customize->add_setting('enigma_options[port_heading]', array('type' => 'option', 'default' => $wl_theme_options['port_heading'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); for ($i = 1; $i <= 4; $i++) { $wp_customize->add_setting('enigma_options[port_' . $i . '_img]', array('type' => 'option', 'default' => $wl_theme_options['port_' . $i . '_img'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw')); $wp_customize->add_setting('enigma_options[port_' . $i . '_title]', array('type' => 'option', 'default' => $wl_theme_options['port_' . $i . '_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_setting('enigma_options[port_' . $i . '_link]', array('type' => 'option', 'default' => $wl_theme_options['port_' . $i . '_link'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw')); } $wp_customize->add_control('enigma_show_portfolio', array('label' => __('Enable Portfolio on Home', 'weblizar'), 'type' => 'checkbox', 'section' => 'portfolio_section', 'settings' => 'enigma_options[portfolio_home]')); $wp_customize->add_control('enigma_portfolio_title', array('label' => __('Portfolio Heading', 'weblizar'), 'type' => 'text', 'section' => 'portfolio_section', 'settings' => 'enigma_options[port_heading]')); for ($i = 1; $i <= 4; $i++) { $j = array(' One', ' Two', ' Three', ' Four'); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'enigma_portfolio_img_' . $i, array('label' => __('Portfolio Image' . $j[$i - 1], 'weblizar'), 'section' => 'portfolio_section', 'settings' => 'enigma_options[port_' . $i . '_img]'))); $wp_customize->add_control('enigma_portfolio_title_' . $i, array('label' => __('Portfolio Title' . $j[$i - 1], 'weblizar'), 'type' => 'text', 'section' => 'portfolio_section', 'settings' => 'enigma_options[port_' . $i . '_title]')); $wp_customize->add_control('enigma_portfolio_link_' . $i, array('label' => __('Portfolio Link' . $j[$i - 1], 'weblizar'), 'type' => 'url', 'section' => 'portfolio_section', 'settings' => 'enigma_options[port_' . $i . '_link]')); } /* Blog Option */ $wp_customize->add_section('blog_section', array('title' => __('Home Blog Options', 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35)); $wp_customize->add_setting('enigma_options[show_blog]', array('default' => esc_attr($wl_theme_options['show_blog']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_checkbox', 'capability' => 'edit_theme_options')); $wp_customize->add_control('show_blog', array('label' => __('Enable Social Media Icons in Header', 'weblizar'), 'type' => 'checkbox', 'section' => 'blog_section', 'settings' => 'enigma_options[show_blog]')); $wp_customize->add_setting('enigma_options[blog_title]', array('type' => 'option', 'default' => $wl_theme_options['blog_title'], 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('enigma_latest_post', array('label' => __('Home Blog Title', 'weblizar'), 'type' => 'text', 'section' => 'blog_section', 'settings' => 'enigma_options[blog_title]')); /* Social options */ $wp_customize->add_section('social_section', array('title' => __("Social Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35)); $wp_customize->add_setting('enigma_options[header_social_media_in_enabled]', array('default' => esc_attr($wl_theme_options['header_social_media_in_enabled']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_checkbox', 'capability' => 'edit_theme_options')); $wp_customize->add_control('header_social_media_in_enabled', array('label' => __('Enable Social Media Icons in Header', 'weblizar'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'enigma_options[header_social_media_in_enabled]')); $wp_customize->add_setting('enigma_options[footer_section_social_media_enbled]', array('default' => esc_attr($wl_theme_options['footer_section_social_media_enbled']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_checkbox', 'capability' => 'edit_theme_options')); $wp_customize->add_control('footer_section_social_media_enbled', array('label' => __('Enable Social Media Icons in Footer', 'weblizar'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'enigma_options[footer_section_social_media_enbled]')); $wp_customize->add_setting('enigma_options[email_id]', array('default' => esc_attr($wl_theme_options['email_id']), 'type' => 'option', 'sanitize_callback' => 'sanitize_email', 'capability' => 'edit_theme_options')); $wp_customize->add_control('email_id', array('label' => __('Email ID', 'weblizar'), 'type' => 'email', 'section' => 'social_section', 'settings' => 'enigma_options[email_id]')); $wp_customize->add_setting('enigma_options[phone_no]', array('default' => esc_attr($wl_theme_options['phone_no']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('phone_no', array('label' => __('Phone Number', 'weblizar'), 'type' => 'text', 'section' => 'social_section', 'settings' => 'enigma_options[phone_no]')); $wp_customize->add_setting('enigma_options[twitter_link]', array('default' => esc_attr($wl_theme_options['twitter_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('twitter_link', array('label' => __('Twitter', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[twitter_link]')); $wp_customize->add_setting('enigma_options[fb_link]', array('default' => esc_attr($wl_theme_options['fb_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('fb_link', array('label' => __('Facebook', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[fb_link]')); $wp_customize->add_setting('enigma_options[linkedin_link]', array('default' => esc_attr($wl_theme_options['linkedin_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('linkedin_link', array('label' => __('LinkedIn', 'social_media_incredible'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[linkedin_link]')); $wp_customize->add_setting('enigma_options[gplus]', array('default' => esc_attr($wl_theme_options['gplus']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('gplus', array('label' => __('Goole+', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[gplus]')); $wp_customize->add_setting('enigma_options[youtube_link]', array('default' => esc_attr($wl_theme_options['youtube_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('youtube_link', array('label' => __('Youtube', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[youtube_link]')); $wp_customize->add_setting('enigma_options[instagram]', array('default' => esc_attr($wl_theme_options['instagram']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options')); $wp_customize->add_control('instagram', array('label' => __('Instagram', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'enigma_options[instagram]')); /* Footer callout */ $wp_customize->add_section('callout_section', array('title' => __("Footer Call-Out Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35)); $wp_customize->add_setting('enigma_options[fc_home]', array('default' => esc_attr($wl_theme_options['fc_home']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_control('fc_home', array('label' => __('Enable Footer callout on HOme', 'weblizar'), 'type' => 'checkbox', 'section' => 'callout_section', 'settings' => 'enigma_options[fc_home]')); $wp_customize->add_setting('enigma_options[fc_title]', array('default' => esc_attr($wl_theme_options['fc_title']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_control('fc_title', array('label' => __('Footer callout Title', 'weblizar'), 'type' => 'text', 'section' => 'callout_section', 'settings' => 'enigma_options[fc_title]')); $wp_customize->add_setting('enigma_options[fc_btn_txt]', array('default' => esc_attr($wl_theme_options['fc_btn_txt']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_control('fc_btn_txt', array('label' => __('Footer callout Button Text', 'weblizar'), 'type' => 'text', 'section' => 'callout_section', 'settings' => 'enigma_options[fc_btn_txt]')); $wp_customize->add_setting('enigma_options[fc_btn_link]', array('default' => esc_attr($wl_theme_options['fc_btn_link']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'enigma_sanitize_text')); $wp_customize->add_control('fc_btn_link', array('label' => __('Footer callout Button Link', 'weblizar'), 'type' => 'text', 'section' => 'callout_section', 'settings' => 'enigma_options[fc_btn_link]')); /* Footer Options */ $wp_customize->add_section('footer_section', array('title' => __("Footer Options", 'weblizar'), 'panel' => 'enigma_theme_option', 'capability' => 'edit_theme_options', 'priority' => 35)); $wp_customize->add_setting('enigma_options[footer_customizations]', array('default' => esc_attr($wl_theme_options['footer_customizations']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('footer_customizations', array('label' => __('Footer Customization Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'enigma_options[footer_customizations]')); $wp_customize->add_setting('enigma_options[developed_by_text]', array('default' => esc_attr($wl_theme_options['developed_by_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('developed_by_text', array('label' => __('Developed By Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'enigma_options[developed_by_text]')); $wp_customize->add_setting('enigma_options[developed_by_weblizar_text]', array('default' => esc_attr($wl_theme_options['developed_by_weblizar_text']), 'type' => 'option', 'sanitize_callback' => 'enigma_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('developed_by_weblizar_text', array('label' => __('Developed By Link Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'enigma_options[developed_by_weblizar_text]')); $wp_customize->add_setting('enigma_options[developed_by_link]', array('default' => esc_attr($wl_theme_options['developed_by_link']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control('developed_by_link', array('label' => __('Developed By Link', 'weblizar'), 'type' => 'url', 'section' => 'footer_section', 'settings' => 'enigma_options[developed_by_link]')); $wp_customize->add_section('enigma_more', array('title' => __('Upgrade to Enigma Premium', 'weblizar'), 'priority' => 999, 'panel' => 'enigma_theme_option')); $wp_customize->add_setting('enigma_more', array('default' => null, 'sanitize_callback' => 'sanitize_text_field')); $wp_customize->add_control(new More_Enigma_Control($wp_customize, 'enigma_more', array('label' => __('Enigma Premium', 'weblizar'), 'section' => 'enigma_more', 'settings' => 'enigma_more', 'priority' => 1))); }
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' ) ); $wp_customize->add_control( 'social_media_in_contact_page_enabled', array( 'label' => __( 'Enable Social Media Icons in contact page', 'weblizar' ), 'type'=>'checkbox', 'section' => 'social_section', 'settings' => 'weblizar_options[social_media_in_contact_page_enabled]' ) ); */ $wp_customize->add_setting('weblizar_options[footer_section_social_media_enbled]', array('default' => esc_attr($wl_theme_options['footer_section_social_media_enbled']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capability' => 'edit_theme_options')); $wp_customize->add_control('footer_section_social_media_enbled', array('label' => __('Enable Social Media Icons in Footer', 'weblizar'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'weblizar_options[footer_section_social_media_enbled]')); $wp_customize->add_setting('weblizar_options[social_media_facebook_link]', array('default' => esc_attr($wl_theme_options['social_media_facebook_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options')); $wp_customize->add_control('social_media_facebook_link', array('label' => __('Facebook URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'weblizar_options[social_media_facebook_link]')); $wp_customize->add_setting('weblizar_options[social_media_twitter_link]', array('default' => esc_attr($wl_theme_options['social_media_twitter_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options')); $wp_customize->add_control('social_media_twitter_link', array('label' => __('Twitter URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'weblizar_options[social_media_twitter_link]')); $wp_customize->add_setting('weblizar_options[social_media_linkedin_link]', array('default' => esc_attr($wl_theme_options['social_media_linkedin_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options')); $wp_customize->add_control('social_media_linkedin_link', array('label' => __('LinkedIn URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'weblizar_options[social_media_linkedin_link]')); $wp_customize->add_setting('weblizar_options[social_media_google_plus]', array('default' => esc_attr($wl_theme_options['social_media_google_plus']), 'type' => 'option', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options')); $wp_customize->add_control('social_media_google_plus', array('label' => __('Goole+ URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'weblizar_options[social_media_google_plus]')); /* Footer Options */ $wp_customize->add_section('footer_section', array('title' => __("Footer Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capability' => 'edit_theme_options', 'priority' => 40)); $wp_customize->add_setting('weblizar_options[footer_customizations]', array('default' => esc_attr($wl_theme_options['footer_customizations']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('weblizar_footer_customizations', array('label' => __('Footer Customization Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'weblizar_options[footer_customizations]')); $wp_customize->add_setting('weblizar_options[developed_by_text]', array('default' => esc_attr($wl_theme_options['developed_by_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('weblizar_developed_by_text', array('label' => __('Footer Developed By Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'weblizar_options[developed_by_text]')); $wp_customize->add_setting('weblizar_options[developed_by_weblizar_text]', array('default' => esc_attr($wl_theme_options['developed_by_weblizar_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capability' => 'edit_theme_options')); $wp_customize->add_control('weblizar_developed_by_weblizar_text', array('label' => __('Footer Company Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'weblizar_options[developed_by_weblizar_text]')); $wp_customize->add_setting('weblizar_options[developed_by_link]', array('default' => esc_attr($wl_theme_options['developed_by_link']), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control('weblizar_developed_by_link', array('label' => __('Footer Customization Link', 'weblizar'), 'type' => 'url', 'section' => 'footer_section', 'settings' => 'weblizar_options[developed_by_link]')); $wp_customize->add_section('weblizar_more', array('title' => __('Upgrade to Weblizar Premium', 'weblizar'), 'priority' => 999, 'panel' => 'weblizar_theme_option')); $wp_customize->add_setting('weblizar_more', array('default' => null, 'sanitize_callback' => 'sanitize_text_field')); $wp_customize->add_control(new More_weblizar_Control($wp_customize, 'weblizar_more', array('label' => __('Weblizar Premium', 'weblizar'), 'section' => 'weblizar_more', 'settings' => 'weblizar_more', 'priority' => 1))); }
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; $i <= 4; $i++) { $j = array('', ' One', ' Two', ' Three'); $wp_customize->add_control(new weblizar_Customize_Misc_Control($wp_customize, 'guardian_options1-line', array('section' => 'service_section', 'type' => 'line'))); $wp_customize->add_control('weblizar_service_icon' . $i, array('label' => __('service_' . $i . '_icons', 'weblizar'), 'description' => __('<a href="http://fontawesome.bootstrapcheatsheets.com">FontAwesome Icons</a>', 'weblizar'), 'section' => 'service_section', 'settings' => 'guardian_options[service_' . $i . '_icons]')); $wp_customize->add_control('weblizar_service_title' . $i, array('label' => __('service_' . $i . '_title', 'weblizar'), 'type' => 'text', 'section' => 'service_section', 'settings' => 'guardian_options[service_' . $i . '_title]')); $wp_customize->add_control('weblizar_service_description_' . $i, array('label' => __('service_' . $i . '_text', 'weblizar'), 'type' => 'textarea', 'section' => 'service_section', 'settings' => 'guardian_options[service_' . $i . '_text]')); $wp_customize->add_control('weblizar_service_link_' . $i, array('label' => __('service_' . $i . '_link', 'weblizar'), 'type' => 'url', 'section' => 'service_section', 'settings' => 'guardian_options[service_' . $i . '_link]')); } /* Social options */ $wp_customize->add_section('social_section', array('title' => __("Social Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capabilit' => 'edit_theme_options', 'priority' => 41)); $wp_customize->add_setting('guardian_options[header_section_social_media_enbled]', array('default' => esc_attr($wl_theme_options['header_section_social_media_enbled']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('header_section_social_media_enbled', array('label' => __('Enable Social Media Icons in Header Section', 'weblizar'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'guardian_options[header_section_social_media_enbled]')); $wp_customize->add_setting('guardian_options[footer_section_social_media_enbled]', array('default' => esc_attr($wl_theme_options['footer_section_social_media_enbled']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_checkbox', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('footer_section_social_media_enbled', array('label' => __('Enable Social Media Icons in Footer', 'weblizar'), 'type' => 'checkbox', 'section' => 'social_section', 'settings' => 'guardian_options[footer_section_social_media_enbled]')); $wp_customize->add_setting('guardian_options[facebook_link]', array('default' => esc_attr($wl_theme_options['facebook_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('facebook_link', array('label' => __('Facebook URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[facebook_link]')); $wp_customize->add_setting('guardian_options[twitter_link]', array('default' => esc_attr($wl_theme_options['twitter_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('twitter_link', array('label' => __('Twitter URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[twitter_link]')); $wp_customize->add_setting('guardian_options[linkedin_link]', array('default' => esc_attr($wl_theme_options['linkedin_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('linkedin_link', array('label' => __('LinkedIn URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[linkedin_link]')); $wp_customize->add_setting('guardian_options[google_plus]', array('default' => esc_attr($wl_theme_options['google_plus']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('google_plus', array('label' => __('Goole+ URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[google_plus]')); $wp_customize->add_setting('guardian_options[flicker_link]', array('default' => esc_attr($wl_theme_options['flicker_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('flicker_link', array('label' => __('Flicker URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[flicker_link]')); $wp_customize->add_setting('guardian_options[rss_link]', array('default' => esc_attr($wl_theme_options['rss_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('rss_link', array('label' => __('RSS URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[rss_link]')); $wp_customize->add_setting('guardian_options[youtube_link]', array('default' => esc_attr($wl_theme_options['youtube_link']), 'type' => 'option', 'sanitize_callback' => 'esc_url_raw', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('youtube_link', array('label' => __('Youtube URL', 'weblizar'), 'type' => 'url', 'section' => 'social_section', 'settings' => 'guardian_options[youtube_link]')); $wp_customize->add_setting('guardian_options[contact_email]', array('default' => esc_attr($wl_theme_options['contact_email']), 'type' => 'option', 'capabilit' => 'edit_theme_options', 'sanitize_callback' => 'is_email')); $wp_customize->add_control('contact_email', array('label' => __('Email-ID', 'weblizar'), 'type' => 'email', 'section' => 'social_section', 'settings' => 'guardian_options[contact_email]')); $wp_customize->add_setting('guardian_options[contact_phone_no]', array('default' => esc_attr($wl_theme_options['contact_phone_no']), 'type' => 'option', 'capabilit' => 'edit_theme_options', 'sanitize_callback' => 'weblizar_sanitize_text')); $wp_customize->add_control('contact_phone_no', array('label' => __('Phone Number', 'weblizar'), 'type' => 'text', 'section' => 'social_section', 'sanitize_callback' => 'weblizar_sanitize_text', 'settings' => 'guardian_options[contact_phone_no]')); /* Footer Options */ $wp_customize->add_section('footer_section', array('title' => __("Footer Options", "weblizar"), 'panel' => 'weblizar_theme_option', 'capabilit' => 'edit_theme_options', 'priority' => 40)); $wp_customize->add_setting('guardian_options[footer_customizations]', array('default' => esc_attr($wl_theme_options['footer_customizations']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('weblizar_footer_customizations', array('label' => __('Footer Customization Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'guardian_options[footer_customizations]')); $wp_customize->add_setting('guardian_options[developed_by_text]', array('default' => esc_attr($wl_theme_options['developed_by_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('weblizar_developed_by_text', array('label' => __('Footer Developed By Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'guardian_options[developed_by_text]')); $wp_customize->add_setting('guardian_options[developed_by_weblizar_text]', array('default' => esc_attr($wl_theme_options['developed_by_weblizar_text']), 'type' => 'option', 'sanitize_callback' => 'weblizar_sanitize_text', 'capabilit' => 'edit_theme_options')); $wp_customize->add_control('weblizar_developed_by_weblizar_text', array('label' => __('Footer Company Text', 'weblizar'), 'type' => 'text', 'section' => 'footer_section', 'settings' => 'guardian_options[developed_by_weblizar_text]')); $wp_customize->add_setting('guardian_options[developed_by_link]', array('default' => esc_attr($wl_theme_options['developed_by_link']), 'type' => 'option', 'capabilit' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw')); $wp_customize->add_control('weblizar_developed_by_link', array('label' => __('Footer Customization Link', 'weblizar'), 'type' => 'url', 'section' => 'footer_section', 'settings' => 'guardian_options[developed_by_link]')); $wp_customize->add_section('guardian_options_more', array('title' => __('Upgrade to Guardian Premium', 'weblizar'), 'priority' => 999, 'panel' => 'weblizar_theme_option')); $wp_customize->add_setting('guardian_options_more', array('default' => null, 'sanitize_callback' => 'sanitize_text_field')); $wp_customize->add_control(new More_guardian_Control($wp_customize, 'guardian_options_more', array('label' => __('Guardian Premium', 'weblizar'), 'section' => 'guardian_options_more', 'settings' => 'guardian_options_more', 'priority' => 1))); }
} get_header(); get_template_part('weblizar', 'breadcrumbs'); $pagename = $post->post_name; ?> <div class="container"> <div class="content_fullwidth lessmar"> <div class="content stnd"> <img class="center-img" src="http://demo.themefuse.com/evangelist/wp-content/uploads/2013/07/phone_ico.png" alt=""> <h3 class="center">Send a Message or Contact Us Directly</h3> <div class="middle_txt"> <p class="center">Please use the <span class="sermon">Form below</span> to send us a message</p> </div> <div class="middle_txt"> <?php $_c_options = weblizar_get_options(); $_address = null; $contact_phone_no = isset($_c_options['contact_phone_no']) ? $_c_options['contact_phone_no'] : ""; if (isset($_c_options['address'])) { $_address = str_replace(", ", ", <br>", $_c_options['address']); } ?> <p class="center"> <?php echo $_address; ?> </p> <p class="center"><span class="icon"><i class="fa fa-phone fa-lg"></i></span> <?php echo $contact_phone_no; ?> </p>