label ); ?>
add_panel('aneeq_theme_options', array(
'title' => __( 'Aneeq Theme Options', 'aneeq' ),
'priority' => 1,
)
);
// Upgrade To aneeq Premium
$wp_customize->add_section( 'upgrade_aneeq_premium' , array(
'title' => __( 'Upgrade to Aneeq Premium', 'aneeq' ),
'priority' => 1,
'panel'=>'aneeq_theme_options',
) );
$wp_customize->add_setting( 'upgrade_aneeq_premium', array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( new More_aneeq_Control( $wp_customize, 'upgrade_aneeq_premium', array(
'label' => __( 'Aneeq Premium', 'aneeq' ),
'section' => 'upgrade_aneeq_premium',
'settings' => 'upgrade_aneeq_premium',
'priority' => 1,
) ) );
//General Settings
$wp_customize->add_section( 'aneeq_general_settings' , array(
'title' => __( 'General Settings', 'aneeq' ),
'priority' => 2,
'panel' => 'aneeq_theme_options',
)
);
//Theme Color
$wp_customize->add_setting( 'aneeq_skin_theme_color' , array(
'default' => '#29B6F6',
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aneeq_skin_theme_color', array(
'label' => __( 'Theme Color', 'aneeq' ),
'section' => 'aneeq_general_settings',
'settings' => 'aneeq_skin_theme_color',
'priority' => 1,
)
)
);
//Site Layout
$wp_customize->add_setting( 'aneeq_theme_layout', array(
'default' => 'wide',
'sanitize_callback' => 'aneeq_sanitize_radio',
)
);
$wp_customize->add_control('aneeq_theme_layout', array(
'type' => 'radio',
'label' => __('Theme Layout', 'aneeq'),
'section' => 'aneeq_general_settings',
'priority' => 2,
'choices' => array(
'wide' => __( 'Wide Layout', 'aneeq' ),
'boxed' => __( 'Box Layout', 'aneeq' ),
),
)
);
//Boxed Layout Background Image
$wp_customize->add_setting( 'aneeq_boxed_layout_bgimg', array(
'default' => esc_html( 'wood', 'aneeq' ),
'sanitize_callback' => 'aneeq_sanitize_select',
)
);
$wp_customize->add_control('aneeq_boxed_layout_bgimg', array(
'type' => 'select',
'label' => __('Boxed Layout Background Image', 'aneeq'),
'section' => 'aneeq_general_settings',
'priority' => 3,
'choices' => array(
'crossed_stripes' => __( 'Crossed Stripes', 'aneeq' ),
'classy_fabric' => __( 'Classy Fabric', 'aneeq' ),
'low_contrast_linen' => __( 'Low Contrast Linen', 'aneeq' ),
'wood' => __( 'Wood', 'aneeq' ),
'diamonds' => __( 'Diamonds', 'aneeq' ),
'triangles' => __( 'Triangles', 'aneeq' ),
'black_mamba' => __( 'Black Mamba', 'aneeq' ),
'vichy' => __( 'Vichy', 'aneeq' ),
'back_pattern' => __( 'Back Pattern', 'aneeq' ),
'checkered_pattern' => __( 'Checkered Pattern', 'aneeq' ),
'diamond_upholstery' => __( 'Diamond Upholstery', 'aneeq' ),
'lyonnette' => __( 'Lyonnette', 'aneeq' ),
'graphy' => __( 'Graphy', 'aneeq' ),
'black_thread' => __( 'Black Thread', 'aneeq' ),
'subtlenet2' => __( 'Subtlenet', 'aneeq' ),
),
/* 'active_callback' => function() use ( $wp_customize ) {
return 'boxed' === $wp_customize->get_setting( 'aneeq_theme_layout' )->value();
}, */
)
);
//General Page Layout
$wp_customize->add_setting( 'aneeq_general_page_layout', array(
'default' => 'fullwidth',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_general_page_layout', array(
'type' => 'radio',
'label' => __('Page Layout', 'aneeq'),
'section' => 'aneeq_general_settings',
'priority' => 4,
'choices' => array(
'leftsidebar' => __( 'Left Sidebar', 'aneeq' ),
'fullwidth' => __( 'Full width (no sidebar)', 'aneeq' ),
'rightsidebar' => __( 'Right Sidebar', 'aneeq' )
),
)
);
//Header Settings
$wp_customize->add_section( 'aneeq_header_option' , array(
'title' => __( 'Header Settings', 'aneeq' ),
'priority' => 3,
'panel' => 'aneeq_theme_options',
)
);
//Site Icon
$wp_customize->add_setting( 'logo_type_aneeq', array(
'default' => 'aneeq_logo_text',
'sanitize_callback' => 'aneeq_sanitize_radio',
)
);
$wp_customize->add_control('logo_type_aneeq', array(
'type' => 'radio',
'label' => __('Site Logo', 'aneeq'),
'description' => __('Select the logo type you want display as your site logo.', 'aneeq'),
'section' => 'aneeq_header_option',
'priority' => 1,
'choices' => array(
'aneeq_logo_text' => __( 'Text', 'aneeq' ),
'aneeq_logo_image' => __( 'Image', 'aneeq' ),
),
)
);
//Logo Text Name
$wp_customize->add_setting('aneeq_logo_text_name', array(
'default' => esc_html( '', 'aneeq' ),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_logo_text_name', array(
'label' => __( 'Text', 'aneeq' ),
'section' => 'aneeq_header_option',
'type' => 'text',
'description' => __('Type in the text to set as your site logo.', 'aneeq'),
'priority' => 2,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'aneeq_logo_text' === $wp_customize->get_setting( 'logo_type_aneeq' )->value();
}, */
)
);
//Site Icon
$wp_customize->add_setting('aneeq_logo_image_url', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw',
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'aneeq_logo_image_url', array(
'label' => __( 'Image', 'aneeq' ),
'type' => 'image',
'description' => __('Select the image you want display as your site logo. NOTE : Upload Logo "272x45" size for Best Look.', 'aneeq'),
'section' => 'aneeq_header_option',
'settings' => 'aneeq_logo_image_url',
'priority' => 3,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'aneeq_logo_image' === $wp_customize->get_setting( 'logo_type_aneeq' )->value();
}, */
)
)
);
//Header Max Height
$wp_customize->add_setting('aneeq_header_height', array(
'default' => esc_html( '10', 'aneeq' ),
'sanitize_callback' => 'absint'
)
);
$wp_customize->add_control('aneeq_header_height', array(
'label' => __( 'Header Max Height (px)', 'aneeq' ),
'section' => 'aneeq_header_option',
'type' => 'number',
'description' => __('Header height in pixels. [default: 10]', 'aneeq'),
'priority' => 4
)
);
//Slider
$wp_customize->add_section( 'aneeq_slider_option' , array(
'title' => __( 'Slider Settings', 'aneeq' ),
'description' => __('You can add up to 5 images in the slider. ', 'aneeq'),
'priority' => 4,
'panel' => 'aneeq_theme_options',
)
);
//Enable Slider
$wp_customize->add_setting( 'aneeq_slider_section', array(
'default' => 'inactive',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_slider_section', array(
'type' => 'radio',
'label' => __('Slider Section', 'aneeq'),
'section' => 'aneeq_slider_option',
'priority' => 1,
'choices' => array(
'active' => __( 'Active', 'aneeq' ),
'inactive' => __( 'Inactive', 'aneeq' ),
),
)
);
//Slider Speed
$wp_customize->add_setting('aneeq_slider_speed', array(
'default' => esc_html('2500', 'aneeq'),
'sanitize_callback' => 'absint'
)
);
$wp_customize->add_control('aneeq_slider_speed', array(
'label' => __( 'Slider Speed', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'number',
'description' => __('Slider speed in miliseconds. [default: 2500]', 'aneeq'),
'priority' => 2,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Enable Slider
$wp_customize->add_setting( 'aneeq_slider_autoplay', array(
'default' => 'true',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_slider_autoplay', array(
'type' => 'radio',
'label' => __('Slider Autoplay', 'aneeq'),
'section' => 'aneeq_slider_option',
'priority' => 1,
'choices' => array(
'true' => __( 'Enable', 'aneeq' ),
'false' => __( 'Disable', 'aneeq' ),
),
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Slide One
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 's1', array(
'label' => __('Slide One', 'aneeq'),
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_title',
'priority' => 3,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
$wp_customize->add_setting('aneeq_slider_image_1', array(
'default' => get_template_directory_uri() . '/images/slider/slide_1.jpg',
'sanitize_callback' => 'esc_url_raw',
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'aneeq_slider_image_1', array(
'label' => __( 'Upload your image for the slide one', 'aneeq' ),
'type' => 'image',
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_slider_image_1',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
//Title
$wp_customize->add_setting('aneeq_slider_title_1', array(
'default' => esc_html('Aneeq is fully perfect for company & agency','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_title_1', array(
'label' => __( 'Title for the slide one', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 5,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_slider_desc_1', array(
'default' => esc_html('Aneeq have to satisfy real needs of real projects. We"ve got a pack of tools for that.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_desc_1', array(
'label' => __( 'Slider Description', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'textarea',
'priority' => 5,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Link
$wp_customize->add_setting('aneeq_slider_btn_link_1', array(
'default' => esc_html('#','aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_slider_btn_link_1', array(
'label' => __( 'Button Link', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'url',
'priority' => 6,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Text
$wp_customize->add_setting('aneeq_slider_btn_text_1', array(
'default' => esc_html('Read More','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_btn_text_1', array(
'label' => __( 'Button Text', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 7,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Slide Two
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 's2', array(
'label' => __('Slide Two', 'aneeq'),
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_title',
'priority' => 8,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
$wp_customize->add_setting('aneeq_slider_image_2', array(
'default' => get_template_directory_uri() . '/images/slider/slide_2.jpg',
'sanitize_callback' => 'esc_url_raw',
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'aneeq_slider_image_2', array(
'label' => __( 'Upload your image for the slide two', 'aneeq' ),
'type' => 'image',
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_slider_image_2',
'priority' => 9,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
//Title
$wp_customize->add_setting('aneeq_slider_title_2', array(
'default' => esc_html('We love Making Beautiful Themes','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_title_2', array(
'label' => __( 'Title for the slide two', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 10,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_slider_desc_2', array(
'default' => esc_html('Aneeq have to satisfy real needs of real projects. We"ve got a pack of tools for that.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_desc_2', array(
'label' => __( 'Slider Description', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'textarea',
'priority' => 11,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Link
$wp_customize->add_setting('aneeq_slider_btn_link_2', array(
'default' => esc_html('#','aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_slider_btn_link_2', array(
'label' => __( 'Button Link', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'url',
'priority' => 12,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Text
$wp_customize->add_setting('aneeq_slider_btn_text_2', array(
'default' => esc_html('Read More','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_btn_text_2', array(
'label' => __( 'Button Text', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 13,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Slide Three
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 's3', array(
'label' => __('Slide Three', 'aneeq'),
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_title',
'priority' => 14,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
$wp_customize->add_setting('aneeq_slider_image_3', array(
'default' => get_template_directory_uri() . '/images/slider/slide_3.jpg',
'sanitize_callback' => 'esc_url_raw',
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'aneeq_slider_image_3', array(
'label' => __( 'Upload your image for the slide three', 'aneeq' ),
'type' => 'image',
'section' => 'aneeq_slider_option',
'settings' => 'aneeq_slider_image_3',
'priority' => 15,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
)
);
//Title
$wp_customize->add_setting('aneeq_slider_title_3', array(
'default' => esc_html('The Way of Business Success','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_title_3', array(
'label' => __( 'Title for the slide three', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 16,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_slider_desc_3', array(
'default' => esc_html('Aneeq have to satisfy real needs of real projects. We"ve got a pack of tools for that.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_desc_3', array(
'label' => __( 'Slider Description', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'textarea',
'priority' => 17,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Link
$wp_customize->add_setting('aneeq_slider_btn_link_3', array(
'default' => esc_html('#','aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_slider_btn_link_3', array(
'label' => __( 'Button Link', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'url',
'priority' => 18,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Button Text
$wp_customize->add_setting('aneeq_slider_btn_text_3', array(
'default' => esc_html('Read More','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_slider_btn_text_3', array(
'label' => __( 'Button Text', 'aneeq' ),
'section' => 'aneeq_slider_option',
'type' => 'text',
'priority' => 19,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_slider_section' )->value();
}, */
)
);
//Service
$wp_customize->add_section( 'aneeq_service_option' , array(
'title' => __( 'Service Settings', 'aneeq' ),
'priority' => 5,
'panel' => 'aneeq_theme_options',
)
);
//Enable Service
$wp_customize->add_setting( 'aneeq_service_section', array(
'default' => 'inactive',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_service_section', array(
'type' => 'radio',
'label' => __('Service Section', 'aneeq'),
'section' => 'aneeq_service_option',
'priority' => 1,
'choices' => array(
'active' => __( 'Active', 'aneeq' ),
'inactive' => __( 'Inactive', 'aneeq' ),
),
)
);
//Service Layout
$wp_customize->add_setting( 'aneeq_service_layout', array(
'default' => 2,
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_service_layout', array(
'type' => 'radio',
'label' => __('Design Settings', 'aneeq'),
'section' => 'aneeq_service_option',
'priority' => 1,
'choices' => array(
2 => __( 'Layout 1', 'aneeq' ),
1 => __( 'Layout 2', 'aneeq' ),
),
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Service Column Layout
$wp_customize->add_setting( 'aneeq_service_column_layout', array(
'default' => 'col-md-3',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_service_column_layout', array(
'type' => 'radio',
'label' => __('Column Settings (Only For Desktop)', 'aneeq'),
'section' => 'aneeq_service_option',
'priority' => 1,
'choices' => array(
'col-md-3' => __( '4 Column', 'aneeq' ),
'col-md-6' => __( '2 Column', 'aneeq' ),
),
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Service One
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'service_one', array(
'label' => __('Service One', 'aneeq'),
'section' => 'aneeq_service_option',
'settings' => 'aneeq_title',
'priority' => 2,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
)
);
//Icon
$wp_customize->add_setting('aneeq_service_icon_1', array(
'default' => esc_html('fa-user-md','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_icon_1', array(
'label' => __( 'Service Icon', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 3,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Title
$wp_customize->add_setting('aneeq_service_title_1', array(
'default' => esc_html('Responsive Design','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_title_1', array(
'label' => __( 'Title', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_service_desc_1', array(
'default' => esc_html('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_desc_1', array(
'label' => __( 'Description', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 5,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Service Two
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'service_two', array(
'label' => __('Service Two', 'aneeq'),
'section' => 'aneeq_service_option',
'settings' => 'aneeq_title',
'priority' => 6,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
)
);
//Icon
$wp_customize->add_setting('aneeq_service_icon_2', array(
'default' => esc_html('fa-calculator','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_icon_2', array(
'label' => __( 'Service Icon', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 7,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Title
$wp_customize->add_setting('aneeq_service_title_2', array(
'default' => esc_html('Fast & Effective Solutions','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_title_2', array(
'label' => __( 'Title', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 8,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_service_desc_2', array(
'default' => esc_html('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_desc_2', array(
'label' => __( 'Description', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 9,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Service Three
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'service_three', array(
'label' => __('Service Three', 'aneeq'),
'section' => 'aneeq_service_option',
'settings' => 'aneeq_title',
'priority' => 10,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
)
);
//Icon
$wp_customize->add_setting('aneeq_service_icon_3', array(
'default' => esc_html('fa-calendar','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_icon_3', array(
'label' => __( 'Service Icon', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 11,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Title
$wp_customize->add_setting('aneeq_service_title_3', array(
'default' => esc_html('Flexible Pricing System','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_title_3', array(
'label' => __( 'Title', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 12,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_service_desc_3', array(
'default' => esc_html('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_desc_3', array(
'label' => __( 'Description', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 13,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Service Four
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'service_four', array(
'label' => __('Service Four', 'aneeq'),
'section' => 'aneeq_service_option',
'settings' => 'aneeq_title',
'priority' => 14,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
)
);
//Icon
$wp_customize->add_setting('aneeq_service_icon_4', array(
'default' => esc_html('fa-sort-amount-desc','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_icon_4', array(
'label' => __( 'Service Icon', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 15,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Title
$wp_customize->add_setting('aneeq_service_title_4', array(
'default' => esc_html('Clean & Clear Design','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_title_4', array(
'label' => __( 'Title', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 16,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Description
$wp_customize->add_setting('aneeq_service_desc_4', array(
'default' => esc_html('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s.','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_service_desc_4', array(
'label' => __( 'Description', 'aneeq' ),
'section' => 'aneeq_service_option',
'type' => 'text',
'priority' => 17,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_service_section' )->value();
}, */
)
);
//Blog Options
$wp_customize->add_section( 'aneeq_blog_option' , array(
'title' => __( 'Blog Settings', 'aneeq' ),
'description' => __( 'You can change blog page layout and single blog page layout from here.', 'aneeq' ),
'priority' => 6,
'panel' => 'aneeq_theme_options',
)
);
//Blog Page Layout
$wp_customize->add_setting( 'aneeq_page_layout_style', array(
'default' => 'fullwidth',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_page_layout_style', array(
'type' => 'radio',
'label' => __('Blog Page layout', 'aneeq'),
'section' => 'aneeq_blog_option',
'priority' => 1,
'choices' => array(
'leftsidebar' => __( 'Left Sidebar', 'aneeq' ),
'fullwidth' => __( 'Full width (no sidebar)', 'aneeq' ),
'rightsidebar' => __( 'Right Sidebar', 'aneeq' )
),
)
);
//Blog Single Page Layout
$wp_customize->add_setting( 'aneeq_blog_single_page_layout', array(
'default' => 'fullwidth',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_blog_single_page_layout', array(
'type' => 'radio',
'label' => __('Blog Single Page layout', 'aneeq'),
'section' => 'aneeq_blog_option',
'priority' => 2,
'choices' => array(
'leftsidebar' => __( 'Left Sidebar', 'aneeq' ),
'fullwidth' => __( 'Full width (no sidebar)', 'aneeq' ),
'rightsidebar' => __( 'Right Sidebar', 'aneeq' )
),
)
);
//Topbar Settings
$wp_customize->add_section( 'aneeq_topbar_settings' , array(
'title' => __( 'Topbar Settings', 'aneeq' ),
'priority' => 7,
'panel' => 'aneeq_theme_options',
'description' => 'Social Media icons will disappear if you leave it blank.'
)
);
//Enable Topbar
$wp_customize->add_setting( 'aneeq_topbar_section', array(
'default' => 'active',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_topbar_section', array(
'type' => 'radio',
'label' => __('Topbar Section', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 1,
'choices' => array(
'active' => __( 'Active', 'aneeq' ),
'inactive' => __( 'Inactive', 'aneeq' ),
),
)
);
//Contact Details
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'contact_detail', array(
'label' => __('Contact Details', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'settings' => 'aneeq_title',
'priority' => 2,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_topbar_section' )->value();
}, */
)
)
);
//Phone Detail
$wp_customize->add_setting('aneeq_phone_detail', array(
'default' => esc_html('','aneeq'),
'sanitize_callback' => 'wp_filter_nohtml_kses'
)
);
$wp_customize->add_control('aneeq_phone_detail', array(
'label' => __( 'Phone', 'aneeq' ),
'section' => 'aneeq_topbar_settings',
'type' => 'text',
'priority' => 2,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_topbar_section' )->value();
}, */
)
);
//Email Detail
$wp_customize->add_setting('aneeq_email_detaill', array(
'default' => esc_html('example@mymail.com','aneeq'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_email'
)
);
$wp_customize->add_control('aneeq_email_detaill', array(
'label' => __( 'Email', 'aneeq' ),
'section' => 'aneeq_topbar_settings',
'type' => 'text',
'priority' => 3,
/* 'active_callback' => function() use ( $wp_customize ) {
return 'active' === $wp_customize->get_setting( 'aneeq_topbar_section' )->value();
}, */
)
);
//Social Media
$wp_customize->add_setting('aneeq_title', array(
'type' => 'info_control',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_attr',
)
);
$wp_customize->add_control( new Aneeq_info( $wp_customize, 'social_media', array(
'label' => __('Social Media', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'settings' => 'aneeq_title',
'priority' => 4,
)
)
);
//Facebook link
$wp_customize->add_setting( 'aneeq_fb_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_fb_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable Facebook link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_facebook_url', array(
'default' => esc_html('', 'aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_facebook_url', array(
'description' => __('Enter your Facebook URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_fb_link_disable' )->value();
}, */
)
);
//Twitter URL
$wp_customize->add_setting( 'aneeq_tweet_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_tweet_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable Twitter link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_twitter_url', array(
'default' => esc_html('', 'aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_twitter_url', array(
'description' => __('Enter your Twitter URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_tweet_link_disable' )->value();
}, */
)
);
//GooglePlus URL
$wp_customize->add_setting( 'aneeq_gplus_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_gplus_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable Google+ link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_googleplus_url', array(
'default' => esc_html('', 'aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_googleplus_url', array(
'description' => __('Enter your Google+ URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_gplus_link_disable' )->value();
}, */
)
);
//Instagram URL
$wp_customize->add_setting( 'aneeq_insta_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_insta_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable Instagram link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_instagram_url', array(
'default' => esc_html('', 'aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_instagram_url', array(
'description' => __('Enter your Instagram URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_insta_link_disable' )->value();
}, */
)
);
//YouTube URL
$wp_customize->add_setting( 'aneeq_youtube_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_youtube_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable YouTube link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_youtube_url', array(
'default' => esc_html('','aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_youtube_url', array(
'description' => __('Enter your YouTube URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_youtube_link_disable' )->value();
}, */
)
);
//RSS URL
$wp_customize->add_setting( 'aneeq_rss_link_disable', array(
'default' => 1,
'sanitize_callback' => 'aneeq_sanitize_checkbox',
)
);
$wp_customize->add_control( 'aneeq_rss_link_disable', array(
'type' => 'checkbox',
'label' => __('Disable RSS link?', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'priority' => 4,
)
);
$wp_customize->add_setting('aneeq_rss_url', array(
'default' => esc_html('', 'aneeq'),
'sanitize_callback' => 'esc_url_raw'
)
);
$wp_customize->add_control('aneeq_rss_url', array(
'description' => __('Enter your RSS URL.', 'aneeq'),
'section' => 'aneeq_topbar_settings',
'type' => 'url',
'priority' => 4,
/* 'active_callback' => function() use ( $wp_customize ) {
return 0 === $wp_customize->get_setting( 'aneeq_rss_link_disable' )->value();
}, */
)
);
//Footer Settings
$wp_customize->add_section( 'aneeq_footer_settings' , array(
'title' => __( 'Footer Settings', 'aneeq' ),
'priority' => 8,
'panel' => 'aneeq_theme_options',
)
);
//Enable Topbar
$wp_customize->add_setting( 'aneeq_widgets_section', array(
'default' => 'active',
'sanitize_callback' => 'aneeq_sanitize_radio'
)
);
$wp_customize->add_control('aneeq_widgets_section', array(
'type' => 'radio',
'label' => __('Widgets Section', 'aneeq'),
'section' => 'aneeq_footer_settings',
'priority' => 1,
'choices' => array(
'active' => __( 'Active', 'aneeq' ),
'inactive' => __( 'Inactive', 'aneeq' ),
),
)
);
//Footer Social Icons
$wp_customize->add_setting( 'aneeq_footer_social_icons', array(
'default' => 'show',
'sanitize_callback' => 'aneeq_sanitize_radio',
)
);
$wp_customize->add_control('aneeq_footer_social_icons', array(
'type' => 'radio',
'label' => __('Footer Social Icons', 'aneeq'),
'section' => 'aneeq_footer_settings',
'priority' => 2,
'choices' => array(
'show' => __( 'Show', 'aneeq' ),
'hide' => __( 'Hide', 'aneeq' ),
),
)
);
//Footer Column Layout
$wp_customize->add_setting( 'aneeq_footer_column_layout', array(
'default' => '3',
'sanitize_callback' => 'aneeq_sanitize_radio',
)
);
$wp_customize->add_control('aneeq_footer_column_layout', array(
'type' => 'radio',
'label' => __('Footer Column Layout', 'aneeq'),
'section' => 'aneeq_footer_settings',
'priority' => 3,
'choices' => array(
'1' => __( 'One Column', 'aneeq' ),
'2' => __( 'Two Column', 'aneeq' ),
'3' => __( 'Three Column', 'aneeq' ),
'4' => __( 'Four Column', 'aneeq' ),
),
)
);
}
add_action( 'customize_register', 'aneeq_customize_register' );
/**
Sanitize
**/
//checkbox sanitization function
function aneeq_sanitize_checkbox( $input ) {
if ( $input == 1 ) {
return 1;
} else {
return 0;
}
}
//radio box sanitization function
function aneeq_sanitize_radio( $input, $setting ){
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible radio box options
$choices = $setting->manager->get_control( $setting->id )->choices;
//return input if valid or return default option
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}
//select sanitization function
function aneeq_sanitize_select( $input, $setting ){
//input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only
$input = sanitize_key($input);
//get the list of possible select options
$choices = $setting->manager->get_control( $setting->id )->choices;
//return input if valid or return default option
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}
?>