| Server IP : 141.193.213.11 / Your IP : 216.73.216.190 Web Server : nginx System : Linux pod-400555 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64 User : fpm200079 ( 200079) PHP Version : 8.2.35 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nas/content/live/bartislaw/wp-content/themes/spk/includes/customizer/ |
Upload File : |
<?php
add_action('customize_register', 'spk_custom_customizer');
function spk_custom_customizer($wp_customize) {
/* ...................Remove Default Sections.................... */
$wp_customize->get_section('title_tagline')->active_callback = '__return_false';
$wp_customize->get_section('static_front_page')->active_callback = '__return_false';
//$wp_customize->get_section('custom_css')->active_callback = '__return_false';
/* ................Customizer Funcation..................... */
// Category Dropdown
$categories = get_categories(array(
'hide_empty' => 0,
'orderby' => 'name',
));
$Cats = array();
foreach ($categories as $category) {
$Cats[$category->term_id] = $category->name;
}
/* ---------------- */
/**
* Multiple select customize control class.
*/
class MYR_Customize_Control_Multiple_Select extends WP_Customize_Control {
public $type = 'multiple-select';
public function render_content() {
if (empty($this->choices))
return;
?>
<label>
<span class="customize-control-title"><?php echo esc_html($this->label); ?></span>
<select <?php $this->link(); ?> multiple="multiple" style="height: 100%;">
<?php
foreach ($this->choices as $value => $label) {
$selected = ( in_array($value, $this->value()) ) ? selected(1, 1, false) : '';
echo '<option value="' . esc_attr($value) . '"' . $selected . '>' . $label . '</option>';
}
?>
</select>
</label>
<?php
}
}
/* ................Add Section..................... */
$wp_customize->add_section('theme_settings_general', array(
'title' => 'Theme Layout Settings'
));
$wp_customize->add_section('theme_settings_header', array(
'title' => 'Theme Header Settings'
));
$wp_customize->add_section('theme_social_media', array(
'capability' => 'edit_theme_options',
'title' => __('Social Media Settings', 'spk'),
'description' => __('Insert Links Social Medias', 'spk'),
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_general_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Footer General Settings', 'spk'),
'description' => __('Footer General Settings', 'spk'),
'active_callback' => 'CheckFooterPanel1Allow',
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_address1_section', array(
'capability' => 'edit_theme_options',
'title' => __('Footer Address 1 Setting', 'spk'),
'description' => __('Footer Address Settings', 'spk'),
'active_callback' => 'CheckFooterPanel1Allow2',
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_address2_section', array(
'capability' => 'edit_theme_options',
'title' => __('Footer Address 2 Setting', 'spk'),
'description' => __('Footer Address Settings', 'spk'),
'active_callback' => 'CheckFooterPanel1Allow2',
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_address3_section', array(
'capability' => 'edit_theme_options',
'title' => __('Footer Address 3 Setting', 'spk'),
'description' => __('Footer Address Settings', 'spk'),
'active_callback' => 'CheckFooterPanel1Allow3',
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_address4_section', array(
'capability' => 'edit_theme_options',
'title' => __('Footer Address 4 Setting', 'spk'),
'description' => __('Footer Address Settings', 'spk'),
'active_callback' => 'CheckFooterPanel1Allow4',
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_footer_other_settings_section', array(
'capability' => 'edit_theme_options',
'title' => __('Footer Other Setting', 'spk'),
'description' => __('Footer Other Settings', 'spk'),
'panel' => 'theme_settings_footer',
));
$wp_customize->add_section('theme_author_box_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Author Box', 'spk'),
'description' => __('Author Box Settings', 'spk'),
'panel' => 'theme_settings_others',
));
$wp_customize->add_section('theme_AuthorBox_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Author Box', 'spk'),
'description' => __('Author Box Settings', 'spk'),
'panel' => 'theme_settings_others',
));
$wp_customize->add_section('theme_call_to_action_box_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Call To Action Box', 'spk'),
'description' => __('Call To Action Box Settings', 'spk'),
'panel' => 'theme_settings_others',
));
$wp_customize->add_section('theme_rarticals_box_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Related Articles/Topics Box', 'spk'),
'description' => __('Related Articles/Topics Box Settings', 'spk'),
'panel' => 'theme_settings_others',
));
$wp_customize->add_section('theme_blogs_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Blog Settings', 'spk'),
'description' => __('Blog Settings', 'spk'),
'panel' => 'theme_settings_others',
));
$wp_customize->add_section('theme_other_pages_settings', array(
'capability' => 'edit_theme_options',
'title' => __('Other Pages Settings', 'spk'),
'description' => __('Pages Settings', 'spk'),
'panel' => 'theme_settings_others',
));
/* ..................Add Panels................... */
$wp_customize->add_panel('theme_settings_footer', array(
'priority' => 200,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Footer Settings', 'spk'),
'description' => __('All Footer Settings', 'spk'),
));
$wp_customize->add_panel('theme_settings_others', array(
'priority' => 200,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Theme Other Settings', 'spk'),
'description' => __('Theme All Other Settings', 'spk'),
));
/* ..................Add Setting................... */
$wp_customize->add_setting('theme_color', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => '1',
));
$wp_customize->add_setting('theme_header', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => '1',
));
$wp_customize->add_setting('theme_footer', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => '1',
));
$wp_customize->add_setting('theme_logo', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_logo_alt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_logo_mtop', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_fav_ico', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_phone_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_address_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_phone', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_phone_btm_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_phone2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_address', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_address2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_envelope_icon_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_mapmarker_icon_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_gtm_code1', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_gtm_code2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_social_media_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_facebook_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_twitter_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_linkedin_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_avvo_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_yelp_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_youtube_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_instagram_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_blogger_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_address_section_heading', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => 'ADDRESS',
));
$wp_customize->add_setting('them_address_text', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_address_iframe', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('them_phone_section_heading', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => 'PHONE',
));
$wp_customize->add_setting('them_phone_number_text', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('them_fax_section_heading', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
'default' => 'FAX',
));
$wp_customize->add_setting('them_fax_number_text', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_address1', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_phone1', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_fax1', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_map_icon', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_phone_icon', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_office_pic', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_iframe1', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('theme_footer_address2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_phone2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_fax2', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_iframe2', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('theme_footer_address3', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_phone3', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_fax3', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_iframe3', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('theme_footer_address4', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_phone4', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_fax4', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_iframe4', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('theme_footer_other_get_direction_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_get_direction_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_get_help_now_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_get_help_now_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_copyright_img', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_copyright_img_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_copyright_img_alt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_footer_other_menu_top_txt', array(
'capability' => 'edit_theme_options',
));
$wp_customize->add_setting('theme_footer_other_copyright_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_author_box_hide', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_AuthorBox_link', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_AuthorBox_image', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_AuthorBox_image_alt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_AuthorBox_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_call_to_action_box_hide', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_call_to_action_box_image', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_call_to_action_box_image_alt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_call_to_action_box_txt', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_related_rarticals_page_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_related_topics_page_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_related_videos_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_category_dropdown', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_category_dropdown_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_user_meta_admin_name', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_user_meta_publish_date', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_exclude_category_dropwoen', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_show_number_posts', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_posts_words_limit', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_blog_share_this_box_hd', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_other_page_testimonial_box_show', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
$wp_customize->add_setting('theme_other_enable_browser_caching', array(
'capability' => 'edit_theme_options',
'transport' => 'postMessage',
));
/* ..................Add Control................... */
$wp_customize->add_control('theme_color', array(
'label' => 'Select Theme Color',
'section' => 'theme_settings_general',
'type' => 'select',
'choices' => array(
'1' => __('Redish Grey'),
'custom' => __('Custom Color'),
),
));
$wp_customize->add_control('theme_header', array(
'label' => 'Select Theme Header',
'section' => 'theme_settings_general',
'type' => 'select',
'choices' => array(
'1' => __('Header Phone'),
),
));
$wp_customize->add_control('theme_footer', array(
'label' => 'Select Theme Footer',
'section' => 'theme_settings_general',
'type' => 'select',
'choices' => array(
'1' => __('Footer 1 Address'),
),
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_logo', array(
'label' => __('Upload Logo', 'spk'),
'section' => 'theme_settings_header',
'settings' => 'theme_logo',
)));
$wp_customize->add_control('theme_logo_alt', array(
'label' => 'Logo Alt Text',
'section' => 'theme_settings_header',
'type' => 'text'
));
$wp_customize->add_control('theme_logo_mtop', array(
'label' => 'Logo Margin Top in PX',
'section' => 'theme_settings_header',
'type' => 'text'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_fav_ico', array(
'label' => __('Upload Fav icon', 'spk'),
'section' => 'theme_settings_header',
'settings' => 'theme_fav_ico',
)));
$wp_customize->add_control('theme_phone_hd', array(
'label' => 'Header Phone Number Heading',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_address_hd', array(
'label' => 'Header Address Text',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_phone', array(
'label' => 'Header Phone Number',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_phone_btm_txt', array(
'label' => 'Header Phone Bottom Text',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_phone2', array(
'label' => 'Header Phone Number 2',
'section' => 'theme_settings_header',
'type' => 'text',
'active_callback' => 'CheckPhone2Allow',
));
$wp_customize->add_control('theme_address', array(
'label' => 'Header Address',
'section' => 'theme_settings_header',
'type' => 'textarea',
'active_callback' => 'CheckAddressAllow',
));
$wp_customize->add_control('theme_address2', array(
'label' => 'Header Address 2',
'section' => 'theme_settings_header',
'type' => 'textarea',
'active_callback' => 'CheckAddress2Allow',
));
$wp_customize->add_control('theme_envelope_icon_link', array(
'label' => 'Header Responsive Envelope Icon link',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_mapmarker_icon_link', array(
'label' => 'Header Responsive Map Marker Icon link',
'section' => 'theme_settings_header',
'type' => 'text',
));
$wp_customize->add_control('theme_gtm_code1', array(
'label' => 'GTM Code For Header',
'section' => 'theme_settings_header',
'type' => 'textarea',
));
$wp_customize->add_control('theme_gtm_code2', array(
'label' => 'GTM Code For Body',
'section' => 'theme_settings_header',
'type' => 'textarea',
));
$wp_customize->add_control('them_social_media_hd', array(
'label' => 'Social Media Heading',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_facebook_link', array(
'label' => 'FaceBook Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_twitter_link', array(
'label' => 'Twitter Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_linkedin_link', array(
'label' => 'Linkedin Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_avvo_link', array(
'label' => 'Avvo Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_yelp_link', array(
'label' => 'Yelp Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_youtube_link', array(
'label' => 'YouTube Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_instagram_link', array(
'label' => 'Instagram Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_blogger_link', array(
'label' => 'Blogger Link',
'section' => 'theme_social_media',
'type' => 'text',
));
$wp_customize->add_control('them_address_section_heading', array(
'label' => 'Insert Address Heading',
'section' => 'theme_footer_general_settings',
'type' => 'text',
));
$wp_customize->add_control('them_address_text', array(
'label' => 'Insert Footer Text',
'section' => 'theme_footer_general_settings',
'type' => 'textarea',
));
$wp_customize->add_control('them_address_iframe', array(
'label' => 'Insert Address Iframe',
'section' => 'theme_footer_general_settings',
'type' => 'textarea',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_map_icon', array(
'label' => __('Upload Map Icon On Footer', 'spk'),
'section' => 'theme_footer_general_settings',
'settings' => 'theme_map_icon',
)));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_phone_icon', array(
'label' => __('Upload Phone Icon On Footer', 'spk'),
'section' => 'theme_footer_general_settings',
'settings' => 'theme_phone_icon',
)));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_office_pic', array(
'label' => __('Upload Office Picture Footer', 'spk'),
'section' => 'theme_footer_general_settings',
'settings' => 'theme_office_pic',
)));
$wp_customize->add_control('them_phone_section_heading', array(
'label' => 'Insert Phone Heading',
'section' => 'theme_footer_general_settings',
'type' => 'text',
));
$wp_customize->add_control('them_phone_number_text', array(
'label' => 'Insert Phone Number',
'section' => 'theme_footer_general_settings',
'type' => 'text',
));
$wp_customize->add_control('them_fax_section_heading', array(
'label' => 'Insert Fax Heading',
'section' => 'theme_footer_general_settings',
'type' => 'text',
));
$wp_customize->add_control('them_fax_number_text', array(
'label' => 'Insert Fax Number',
'section' => 'theme_footer_general_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_address1', array(
'label' => 'Insert Address 1',
'section' => 'theme_footer_address1_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_phone1', array(
'label' => 'Insert Phone 1',
'section' => 'theme_footer_address1_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_fax1', array(
'label' => 'Insert Fax 1',
'section' => 'theme_footer_address1_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_iframe1', array(
'label' => 'Insert Iframe 1',
'section' => 'theme_footer_address1_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_address2', array(
'label' => 'Insert Address 2',
'section' => 'theme_footer_address2_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_phone2', array(
'label' => 'Insert Phone 2',
'section' => 'theme_footer_address2_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_fax2', array(
'label' => 'Insert Fax 2',
'section' => 'theme_footer_address2_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_iframe2', array(
'label' => 'Insert Iframe 2',
'section' => 'theme_footer_address2_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_address3', array(
'label' => 'Insert Address 3',
'section' => 'theme_footer_address3_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_phone3', array(
'label' => 'Insert Phone 3',
'section' => 'theme_footer_address3_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_fax3', array(
'label' => 'Insert Fax 3',
'section' => 'theme_footer_address3_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_iframe3', array(
'label' => 'Insert Iframe 3',
'section' => 'theme_footer_address3_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_address4', array(
'label' => 'Insert Address 4',
'section' => 'theme_footer_address4_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_phone4', array(
'label' => 'Insert Phone 4',
'section' => 'theme_footer_address4_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_fax4', array(
'label' => 'Insert Fax 4',
'section' => 'theme_footer_address4_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_iframe4', array(
'label' => 'Insert Iframe 4',
'section' => 'theme_footer_address4_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_other_get_direction_txt', array(
'label' => 'Insert Get Direction Button Text',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_other_get_direction_link', array(
'label' => 'Insert Get Direction Button Link',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_other_get_help_now_txt', array(
'label' => 'Insert Get Help Now Button Text',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_other_get_help_now_link', array(
'label' => 'Insert Get Help Now Button Link',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_footer_other_copyright_img', array(
'label' => __('Upload VCard', 'spk'),
'section' => 'theme_footer_other_settings_section',
'settings' => 'theme_footer_other_copyright_img',
)));
$wp_customize->add_control('theme_footer_other_copyright_img_alt', array(
'label' => 'Insert VCard Alt',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_other_copyright_img_link', array(
'label' => 'Insert VCard Link',
'section' => 'theme_footer_other_settings_section',
'type' => 'text',
));
$wp_customize->add_control('theme_footer_other_menu_top_txt', array(
'label' => 'Insert Menu Top Text',
'section' => 'theme_footer_other_settings_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_footer_other_copyright_txt', array(
'label' => 'Insert CopyRight Text',
'section' => 'theme_footer_other_settings_section',
'type' => 'textarea',
));
$wp_customize->add_control('theme_blog_author_box_hide', array(
'label' => 'Hide Call To Action Box',
'section' => 'theme_AuthorBox_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_AuthorBox_link', array(
'label' => 'Author Box Image Link',
'section' => 'theme_AuthorBox_settings',
'type' => 'text',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_AuthorBox_image', array(
'label' => __('Author Box image Upload', 'spk'),
'section' => 'theme_AuthorBox_settings',
'settings' => 'theme_AuthorBox_image',
)));
$wp_customize->add_control('theme_AuthorBox_image_alt', array(
'label' => 'Author Box Image Alt Text',
'section' => 'theme_AuthorBox_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_AuthorBox_txt', array(
'label' => 'Author Box Text',
'section' => 'theme_AuthorBox_settings',
'type' => 'textarea',
));
$wp_customize->add_control('theme_call_to_action_box_hide', array(
'label' => 'Hide Call To Action Box',
'section' => 'theme_call_to_action_box_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_call_to_action_box_hide', array(
'label' => 'Hide Call To Action Box',
'section' => 'theme_call_to_action_box_settings',
'type' => 'checkbox',
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'theme_call_to_action_box_image', array(
'label' => __('Upload Call To Action Pic', 'spk'),
'section' => 'theme_call_to_action_box_settings',
'settings' => 'theme_call_to_action_box_image',
)));
$wp_customize->add_control('theme_call_to_action_box_image_alt', array(
'label' => 'Call To Action Pic Alt Text',
'section' => 'theme_call_to_action_box_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_call_to_action_box_txt', array(
'label' => 'Call To Action Box Text',
'section' => 'theme_call_to_action_box_settings',
'type' => 'textarea',
));
$wp_customize->add_control('theme_related_rarticals_page_hd', array(
'label' => 'Related Articles Page Section Heading',
'section' => 'theme_rarticals_box_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_related_topics_page_hd', array(
'label' => 'Related Topics Page Section Heading',
'section' => 'theme_rarticals_box_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_related_videos_hd', array(
'label' => 'Related Videos Page Section Heading',
'section' => 'theme_rarticals_box_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_blog_category_dropdown', array(
'label' => 'Show Dropdown Category',
'section' => 'theme_blogs_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_blog_category_dropdown_hd', array(
'label' => 'Dropdown Category Heading',
'section' => 'theme_blogs_settings',
'type' => 'text',
));
$wp_customize->add_control(
new MYR_Customize_Control_Multiple_Select(
$wp_customize, 'theme_blog_exclude_category_dropwoen', array(
'settings' => 'theme_blog_exclude_category_dropwoen',
'label' => 'Dropdown Exclude Category List',
'section' => 'theme_blogs_settings',
'type' => 'multiple-select',
'choices' => $Cats
)
)
);
$wp_customize->add_control('theme_blog_user_meta_admin_name', array(
'label' => 'Show User Meta Admin Name',
'section' => 'theme_blogs_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_blog_user_meta_publish_date', array(
'label' => 'Show User Meta Published Date',
'section' => 'theme_blogs_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_blog_show_number_posts', array(
'label' => 'Show Number of Posts (If empty show default 10 posts per pages)',
'section' => 'theme_blogs_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_blog_posts_words_limit', array(
'label' => 'Show number of Words blog post (If empty show default 100 Words)',
'section' => 'theme_blogs_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_blog_share_this_box_hd', array(
'label' => 'Insert Heading Share this Section',
'section' => 'theme_blogs_settings',
'type' => 'text',
));
$wp_customize->add_control('theme_other_page_testimonial_box_show', array(
'label' => 'Show Testimonial Form Box (Check if you want to show Testimonial form box)',
'section' => 'theme_other_pages_settings',
'type' => 'checkbox',
));
$wp_customize->add_control('theme_other_enable_browser_caching', array(
'label' => 'Check, If you want Enable Browser Caching)',
'section' => 'theme_other_pages_settings',
'type' => 'checkbox',
));
}
/* .......................Call Back Funcations............................. */
function CheckPhone2Allow() {
if (!empty(get_theme_mod('theme_header')) && get_theme_mod('theme_header') == 4) {
return True;
}
return FALSE;
}
function CheckAddressAllow() {
if (!empty(get_theme_mod('theme_header')) && get_theme_mod('theme_header') == 2 || get_theme_mod('theme_header') == 4) {
return TRUE;
}
return FALSE;
}
function CheckAddress2Allow() {
if (!empty(get_theme_mod('theme_header')) && get_theme_mod('theme_header') == 3) {
return True;
}
return FALSE;
}
function CheckFooterPanel1Allow() {
if (!empty(get_theme_mod('theme_footer')) && get_theme_mod('theme_footer') == 1) {
return TRUE;
}
return FALSE;
}
function CheckFooterPanel1Allow2() {
if (!empty(get_theme_mod('theme_footer')) && get_theme_mod('theme_footer') != 1) {
return TRUE;
}
return FALSE;
}
function CheckFooterPanel1Allow3() {
if (!empty(get_theme_mod('theme_footer')) && get_theme_mod('theme_footer') == 3) {
return TRUE;
}
return FALSE;
}
function CheckFooterPanel1Allow4() {
if (!empty(get_theme_mod('theme_footer')) && get_theme_mod('theme_footer') == 4) {
return TRUE;
}
return FALSE;
}
/**
* Bind JS handlers to instantly live-preview changes.
*/
function spk_customize_preview_js() {
wp_enqueue_script(
'spk-themecustomizer', //Give the script an ID
get_template_directory_uri() . '/js/customize-preview.js', //Point to file
array('jquery', 'customize-preview'), //Define dependencies
'', //Define a version (optional)
true //Put script in footer?
);
}
add_action('customize_preview_init', 'spk_customize_preview_js');