Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter L1KDE

    (@l1kde)

    Administration, please delete this topic, or links to my site from replies.
    Thank you.

    Thread Starter L1KDE

    (@l1kde)

    Hi.

    1)
    I have deactivated all the plugins. And nothing.
    It is even doesn’t offers me “Save changes” in customizer, when i’m changes text in field for “Button text one”, like nothing changed.

    Mb there is a problem in “customizer” code!?

    <?php
    function weblizar_customizer( $wp_customize ) {
    	wp_enqueue_style('customizr', WL_TEMPLATE_DIR_URI .'/css/customizr.css');
    	wp_enqueue_style( 'snowfall', get_template_directory_uri() . '/snowfall/styles.css' );
        wp_enqueue_script( 'jquery' );
        wp_enqueue_script( 'snowfall', get_template_directory_uri() . '/snowfall/snowfall.min.jquery.js' );
    	$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, // Mixed with top-level-section hierarchy.
    	) );
    	$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="https://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,
    			) ) );
    }
    add_action( 'customize_register', 'weblizar_customizer' );
    function weblizar_sanitize_text( $input ) {
        return wp_kses_post( force_balance_tags( $input ) );
    }
    function weblizar_sanitize_checkbox( $input ) {
        if ( $input == 'on' ) {
            return 'on';
        } else {
            return '';
        }
    }
    function weblizar_sanitize_integer( $input ) {
        return (int)($input);
    }
    /* Custom Control Class */
    if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'weblizar_Customize_Misc_Control' ) ) :
    class weblizar_Customize_Misc_Control extends WP_Customize_Control {
        public $settings = 'blogname';
        public $description = '';
        public function render_content() {
            switch ( $this->type ) {
                default:
    
                case 'heading':
                    echo '<span class="customize-control-title">' . esc_html( $this->label ) . '</span>';
                    break;
    
                case 'line' :
                    echo '<hr />';
                    break;
    
            }
        }
    }
    endif;
    
    if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'More_guardian_Control' ) ) :
    class More_guardian_Control extends WP_Customize_Control {
    
    	/**
    	* Render the content on the theme customizer page
    	*/
    	public function render_content() {
    		?>
    		<label style="overflow: hidden; zoom: 1;">
    			<div class="col-md-2 col-sm-6 upsell-btn">
    					<a style="margin-bottom:20px;margin-left:20px;" href="https://weblizar.com/themes/guardian-premium-theme/" target="blank" class="btn btn-success btn"><?php _e('Upgrade to Guardian Premium','weblizar'); ?> </a>
    			</div>
    			<div class="col-md-4 col-sm-6">
    				<img class="enigma_img_responsive " src="<?php echo WL_TEMPLATE_DIR_URI .'/images/GP.png'?>">
    			</div>
    			<div class="col-md-3 col-sm-6">
    				<h3 style="margin-top:10px;margin-left: 20px;text-decoration:underline;color:#333;"><?php echo _e( 'Guardian Premium - Features','weblizar'); ?></h3>
    					<ul style="padding-top:20px">
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Responsive Design','weblizar'); ?> </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('More than 15+ Templates','weblizar'); ?> </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('12 types Themes Colors Scheme','weblizar'); ?> </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('6 Types of Portfolio Templates','weblizar'); ?></li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Patterns Background','weblizar'); ?></li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Full Width & Boxed Layout','weblizar'); ?>   </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Touch Slider','weblizar'); ?>   </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Ultimate Portfolio layout with Isotope effect','weblizar'); ?>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Image Background','weblizar'); ?>  </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Rich Short codes','weblizar'); ?>  </li>	
    
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Coming Soon Mode','weblizar'); ?>  </li>
    						<li class="upsell-enigma"> <div class="dashicons dashicons-yes"></div> <?php _e('Extreme Gallery Design Layout','weblizar'); ?>  </li>
    
    					</ul>
    			</div>
    			<div class="col-md-2 col-sm-6 upsell-btn">
    					<a style="margin-bottom:20px;margin-left:20px;" href="https://weblizar.com/themes/guardian-premium-theme/" target="blank" class="btn btn-success btn"><?php _e('Upgrade to Guardian Premium','weblizar'); ?> </a>
    			</div>
    			<span class="customize-control-title"><?php _e( 'Enjoying Guardian?', 'weblizar' ); ?></span>
    			<p>
    				<?php
    					printf( __( 'If you Like our Products , Please do Rate us on %swww.ads-software.com%s?  We\'d really appreciate it!', 'weblizar' ), '<a target="" href="https://www.ads-software.com/support/view/theme-reviews/guardian?filter=5">', '</a>' );
    				?>
    			</p>
    		</label>
    		<?php
    	}
    }
    endif;
    ?>
    
    <?php
    add_action('wp_footer', 'snowfall_effect1');
    
    function snowfall_effect1() { ?>
        <script type="text/javascript">
            jQuery(document).ready(function(){
                jQuery(document).snowfall({
                    flakeCount : 100,
                    flakeColor : '#fff',
                    flakeIndex: 999999,
                    minSize : 1,
                    maxSize : 10,
                    minSpeed : 2,
                    maxSpeed : 3,
                    round : true,
                    shadow : false,
                });
            });
        </script><?php
    }
    ?>

    2) Right now i’ve apllied new font in “Typography” only for “p” tag. And as you can see on front page, text on the slider also changed color to black.
    Here is screenshot of “Google Typography” settings:
    https://studio-26.ru/wp-content/uploads/2016/01/fas.jpg

    Thank you.

    Thread Starter L1KDE

    (@l1kde)

    <?php get_header();
    $wl_theme_options = weblizar_get_options();
    if ($wl_theme_options['_frontpage']=="on" && is_front_page())
    { ?>
    <!-- Slider ======================================= -->
        <div id="myCarousel" class="carousel slide" data-ride="carousel">
          <!-- Indicators -->
          <ol class="carousel-indicators">
            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#myCarousel" data-slide-to="1"></li>
            <li data-target="#myCarousel" data-slide-to="2"></li>
          </ol>
          <div class="carousel-inner">
            <div class="item active">
    			<?php if($wl_theme_options['slide_image'] !='') { ?>
    			<img src="<?php echo esc_url($wl_theme_options['slide_image']); ?>" class="img-responsive" alt="First slide">
    			<?php } ?>
    			<div class="container">
    				<div class="carousel-caption">
    				<?php if($wl_theme_options['slide_title'] !='') { ?> <p><strong><?php echo  esc_attr($wl_theme_options['slide_title']); ?></strong></p>	<?php } ?>
    				<?php if($wl_theme_options['slide_desc'] !='') { ?>
    				<p><?php echo  esc_attr($wl_theme_options['slide_desc']); ?></p>
    				<?php } ?>
    				<?php if($wl_theme_options['slide_desc'] !='') { ?>
    				<p><a class="btn btn-lg btn-primary" target="_blank" href="<?php if($wl_theme_options['slide_btn_link'] !='') { echo esc_url($wl_theme_options['slide_btn_link']); }  ?>" role="button"><?php echo esc_attr($wl_theme_options['slide_btn_text']); ?></a></p>
    				<?php } ?>
    				</div>
    			</div>
            </div>
    		<div class="item ">
    			<?php if($wl_theme_options['slide_image_1'] !='') { ?>
    			<img src="<?php echo esc_url($wl_theme_options['slide_image_1']); ?>" class="img-responsive" alt="Second slide">
    			<?php } ?>
    			<div class="container">
    				<div class="carousel-caption">
    				<?php if($wl_theme_options['slide_title_1'] !='') { ?> <p><strong><?php echo  esc_attr($wl_theme_options['slide_title_1']); ?></strong></p>	<?php } ?>
    				<?php if($wl_theme_options['slide_desc_1'] !='') { ?>
    				<p><?php echo  esc_attr($wl_theme_options['slide_desc_1']); ?></p>
    				<?php } ?>
    				<?php if($wl_theme_options['slide_desc_1'] !='') { ?>
    				<p><a class="btn btn-lg btn-primary" target="_blank" href="<?php if($wl_theme_options['slide_btn_link_1'] !='') { echo esc_url($wl_theme_options['slide_btn_link_1']); }  ?>" role="button"><?php echo esc_attr($wl_theme_options['slide_btn_text_1']); ?></a></p>
    				<?php } ?>
    				</div>
    			</div>
            </div>
    		<div class="item ">
    			<?php if($wl_theme_options['slide_image_2'] !='') { ?>
    			<img src="<?php echo esc_url($wl_theme_options['slide_image_2']); ?>" class="img-responsive" alt="First slide">
    			<?php } ?>
    			<div class="container">
    				<div class="carousel-caption">
    				<?php if($wl_theme_options['slide_title_2'] !='') { ?> <p><strong><?php echo  esc_attr($wl_theme_options['slide_title_2']); ?></strong></p>	<?php } ?>
    				<?php if($wl_theme_options['slide_desc_2'] !='') { ?>
    				<p><?php echo  esc_attr($wl_theme_options['slide_desc_2']); ?></p>
    				<?php } ?>
    				<?php if($wl_theme_options['slide_desc_2'] !='') { ?>
    				<p><a class="btn btn-lg btn-primary" target="_blank" href="<?php if($wl_theme_options['slide_btn_link_2'] !='') { echo esc_url($wl_theme_options['slide_btn_link_2']); }  ?>" role="button"><?php echo esc_attr($wl_theme_options['slide_btn_text_2']); ?></a></p>
    				<?php } ?>
    				</div>
    			</div>
            </div>
          </div>
          <a class="left carousel-control" href="#myCarousel" data-slide="prev"><i class="fa fa-angle-left"></i></a>
          <a class="right carousel-control" href="#myCarousel" data-slide="next"><i class="fa fa-angle-right"></i></a>
     </div><!-- /.carousel -->
    
    <div class="feature_section1">
    	<div class="container">
    		<h2><?php
    			if($wl_theme_options['home_service_title'] !='') { 	echo esc_attr($wl_theme_options['home_service_title']); }
    			if($wl_theme_options['home_service_description'] !='') {  ?>
    			<b><?php echo esc_attr($wl_theme_options['home_service_description']); ?></b>
    			<?php } ?>
    		</h2>
    		<div class="margin_top3"></div>
    		<div class="one_fourth animate" data-anim-type="fadeIn" data-anim-delay="100">
    			<div class="arrow_box"><?php if($wl_theme_options['service_1_icons'] !='') { echo "<i class='".esc_attr($wl_theme_options['service_1_icons'])."' ></i>";  }?></div>
    			<?php if($wl_theme_options['service_1_title'] !='') { ?><a href="<?php echo esc_url($wl_theme_options['service_1_link']);  ?>"><h5 class="caps"><?php echo esc_attr($wl_theme_options['service_1_title']);  ?></h5></a><?php } ?>
    			<?php if($wl_theme_options['service_1_text'] !='') { echo "<p>".apply_filters('the_content', esc_attr($wl_theme_options['service_1_text']), true). "</p>"; } ?>
    		</div>
    		<div class="one_fourth animate" data-anim-type="fadeIn" data-anim-delay="200">
    			<div class="arrow_box"><?php if($wl_theme_options['service_2_icons'] !='') { echo "<i class='".esc_attr($wl_theme_options['service_2_icons']). "'></i>";  }?></div>
    			<?php if($wl_theme_options['service_2_title'] !='') { ?><a href="<?php echo esc_url($wl_theme_options['service_2_link']);  ?>"><h5 class="caps"><?php echo esc_attr($wl_theme_options['service_2_title']);  ?></h5></a><?php } ?>
    			<?php if($wl_theme_options['service_2_text'] !='') { echo "<p>".apply_filters('the_content', esc_attr($wl_theme_options['service_2_text']), true). "</p>"; } ?>
    		</div>
    		<div class="one_fourth animate" data-anim-type="fadeIn" data-anim-delay="300">
    			<div class="arrow_box"><?php if($wl_theme_options['service_3_icons'] !='') { echo "<i class='".esc_attr($wl_theme_options['service_3_icons']). "'></i>";  }?></div>
    			<?php if($wl_theme_options['service_3_title'] !='') { ?><a href="<?php echo esc_url($wl_theme_options['service_3_link']);  ?>"><h5 class="caps"><?php echo esc_attr($wl_theme_options['service_3_title']);  ?></h5></a><?php } ?>
    			<?php if($wl_theme_options['service_3_text'] !='') { echo "<p>".apply_filters('the_content', esc_attr($wl_theme_options['service_3_text']), true). "</p>"; } ?>
    		</div>
    		<div class="one_fourth last animate" data-anim-type="fadeIn" data-anim-delay="400">
    			<div class="arrow_box"><?php if($wl_theme_options['service_4_icons'] !='') { echo "<i class='".esc_attr($wl_theme_options['service_4_icons']). "'></i>";  }?></div>
    			<?php if($wl_theme_options['service_4_title'] !='') { ?><a href="<?php echo esc_url($wl_theme_options['service_4_link']);  ?>"><h5 class="caps"><?php echo esc_attr($wl_theme_options['service_4_title']);  ?></h5></a><?php } ?>
    			<?php if($wl_theme_options['service_4_text'] !='') { echo "<p>".apply_filters('the_content', esc_attr($wl_theme_options['service_4_text']), true). "</p>"; } ?>
    		</div>	
    
    	</div>
    </div><!-- end of service section1 -->
    <div class="clearfix"></div>
    <div class="feature_section5">
    	<div class="container">
    		<?php $wl_theme_options=weblizar_get_options();;
    		if($wl_theme_options['blog_title'] !='') { echo "<h2>".esc_attr($wl_theme_options['blog_title']). "</h2><br>"; } ?>
    		<?php if ( have_posts()) {
    		$i=1;
    		$args = array( 'post_type' => 'post','posts_per_page'=>3, 'post__not_in' => get_option( 'sticky_posts' ));
    		$post_type_data = new WP_Query( $args );
    		while($post_type_data->have_posts()):
    		$post_type_data->the_post(); 	 ?>
    		<div class="one_third animate" data-anim-type="fadeInUp" <?php if($i==3) { echo "id='nth_child_service'"; } ?>>
    			<h4 ><a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
    			<?php if(has_post_thumbnail()):
    				$class=array('class'=>'enigma_img_responsive');
    				the_post_thumbnail('home_post_thumb', $class);
    			endif; ?>
    			<p><?php echo substr(get_the_content(), 0, 150); ?></p><br />
    			<a href="<?php the_permalink(); ?>" class="lfour"><i class="fa fa-chevron-circle-right"></i>&nbsp; <?php _e('Read More', gr_td); ?></a>
    		</div>
    		<?php  $i++; endwhile;
    			} else { ?>
    		<div class="one_third animate" data-anim-type="fadeInUp">
    			<h4 ><?php _e('The point of using psum is that has more normal letters ', gr_td); ?></h4>
    			<img src="https://placehold.it/361x180" alt="" class="img_left1" />
    			<p><?php _e('Lorem Ipsum as their default model the and a search for lorem ipsum will uncover many web sites the stilin infancy versions have evolved over the years.', gr_td); ?></p>
    			<br />
    			<a href="#" class="lfour"><i class="fa fa-chevron-circle-right"></i>&nbsp; <?php _e('Read More', gr_td); ?></a>
    		</div>
    
    		<div class="one_third animate" data-anim-type="fadeInUp">
    			<h4 class="white"><?php _e('Will cover many web sites still in their infancy websites', gr_td); ?></h4>
    			<img src="https://placehold.it/361x180" alt="" class="img_left1" />
    			<p><?php _e('Lorem Ipsum as their default model the and a search for lorem ipsum will uncover many web sites the stilin infancy versions have evolved over the years.', gr_td); ?></p>
    			<br />
    			<a href="#" class="lfour"><i class="fa fa-chevron-circle-right"></i>&nbsp; <?php _e('Read More', gr_td); ?></a>
    		</div>
    
    		<div class="one_third last animate" data-anim-type="fadeInUp">
    			<h4 class="white"><?php _e('The point of using psum is that has more normal letters', gr_td); ?></h4>
    			<img src="https://placehold.it/361x180" alt="" class="img_left1" />
    			<p><?php _e('Lorem Ipsum as their default model the and a search for lorem ipsum will uncover many web sites the stilin infancy versions have evolved over the years.', gr_td); ?></p>
    			<br />
    			<a href="#" class="lfour"><i class="fa fa-chevron-circle-right"></i>&nbsp; <?php _e('Read More', gr_td); ?></a>
    		</div>
    		<?php } ?>
    	</div>
    </div><!-- end blog section5 -->
    <div class="clearfix"></div>
    <?php
    get_footer();
    }
    else
    {
    if(is_page()){
    get_template_part('page');
    } else {
    get_template_part('index');
    }
    } ?>

    Thank you.

    Thread Starter L1KDE

    (@l1kde)

    I’ve already changed text of 1st button a lot of times. It’s not changing. When i’m opening customizer next time, there is “Read more” again.
    And it’s not changing in DB. When i’m trying manually change it in DB, it brokes all options on page.
    It seems like customizer doesn’t save changes in field for 1st button text.
    Dont know what to do.

    And about fonts.

    I want set “Open Sans Condensed” everywhere on site. And change it default size for “p”.
    Manually changing “.p” in CSS doesn’t work.
    I’ve tryed to use “Google typography” plugin.
    But when i’m applying font in it, it changes color of font in slider.

    Thread Starter L1KDE

    (@l1kde)

    Oh, sorry.
    Now it’s visible.
    Thanx.

    Thread Starter L1KDE

    (@l1kde)

    up

    Thread Starter L1KDE

    (@l1kde)

    Also, i’ve changed height of slider.
    How now i can fix size of uploading images to it?

    Thread Starter L1KDE

    (@l1kde)

    And one more.
    How can i change size and family of the fonts!?
    If i’m using Google Typography plugin, when set it to “paragraph” it’s changing all the fonts on site.

    Thread Starter L1KDE

    (@l1kde)

    It’s in cyrilic, sorry =).
    https://studio-26.ru/

Viewing 9 replies - 1 through 9 (of 9 total)