type ) {
case 'textarea':
?>
label ); ?>
label ); ?>
link(); ?>>
choices as $value => $label ) {
echo 'value(), $value, false ) . '>' . esc_attr( $label ) . 'px ';
}
?>
label ); ?>
choices as $value => $label ) :
//if get theme mod background image has a value then we need to set cyberchimps bg to none
$test_bg = $this->value();
$test_bg = ( get_theme_mod( 'background_image' ) ) ? 'none' : $test_bg;
$name = '_customize-radio-' . $this->id;
$selected = ( $test_bg == $value ) ? 'of-radio-img-selected' : '';
?>
label ); ?>
choices as $value => $label ) :
//if get theme mod background image has a value then we need to set cyberchimps bg to none
$test_skin = $this->value();
$name = '_customize-radio-' . $this->id;
$selected = ( $test_skin == $value ) ? 'of-radio-img-selected' : '';
?>
add_panel( 'header_id', array(
'priority' => 46,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Header', 'cyberchimps_core' ),
'description' => __( 'Several settings for Header', 'cyberchimps_core' ),
) );
$wp_customize->add_section( 'cyberchimps_header_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Header Option', 'cyberchimps_core' ),
'panel' => 'header_id',
) );
//custom logo url
$wp_customize->add_setting( 'custom_logo_url', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'custom_logo_url', array(
'label' => __( 'Custom Logo URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_header_section',
'settings' => 'custom_logo_url',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'custom_logo_url_link', array(
'default' => home_url(),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'custom_logo_url_link', array(
'label' => __( 'Enter Custom Logo URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_header_section',
'settings' => 'custom_logo_url_link',
'type' => 'text'
) );
//Disable search bar
$wp_customize->add_setting( 'searchbar', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'searchbar', array(
'label' => __( 'Display Searchbar?', 'cyberchimps_core' ),
'section' => 'cyberchimps_header_section',
'settings' => 'searchbar',
'type' => 'checkbox'
) );
/* --------------------------------------------------------------
// SOCIAL MEDIA SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_social_media', array(
'priority' => 15,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Social Option', 'cyberchimps_core' ),
'panel' => 'header_id',
) );
//Select social Icon Style
$social_choices = apply_filters( 'cyberchimps_social_icon_options', array(
'default' => $imagepath . 'social/thumbs/icons-default.png',
'legacy' => $imagepath . 'social/thumbs/icons-classic.png',
'round' => $imagepath . 'social/thumbs/icons-round.png'
) );
if ( count( $social_choices ) > 1 ) {
$wp_customize->add_setting( 'theme_backgrounds', array(
'default' => apply_filters( 'cyberchimps_social_icon_default', 'default' ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'theme_backgrounds', array(
'label' => __( 'Choose your icon style', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'theme_backgrounds',
'choices' => $social_choices,
) ) );
}
// Add Facebook Setting
$wp_customize->add_setting( 'social_facebook', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_facebook', array(
'label' => __( 'Display Facebook?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_facebook',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'facebook_url', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'facebook_url', array(
'label' => __( 'Facebook URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'facebook_url'
) ) );
// Add Twitter Setting
$wp_customize->add_setting( 'social_twitter', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_twitter', array(
'label' => __( 'Display Twitter?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_twitter',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'twitter_url', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'twitter_url', array(
'label' => __( 'Twitter URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'twitter_url'
) ) );
// Add Google+ Setting
$wp_customize->add_setting( 'social_google', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_google', array(
'label' => __( 'Display Google?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_google',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'google_url', array(
'default' => '#',
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'google_url', array(
'label' => __( 'Google+ URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'google_url'
) ) );
// Add LinkedIn Setting
$wp_customize->add_setting( 'social_linkedin', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_linkedin', array(
'label' => __( 'Display LinkedIn?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_linkedin',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'linkedin_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'linkedin_url', array(
'label' => __( 'LinkedIn URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'linkedin_url'
) ) );
// Add Youtube Setting
$wp_customize->add_setting( 'social_youtube', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_youtube', array(
'label' => __( 'Display Youtube?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_youtube',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'youtube_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'youtube_url', array(
'label' => __( 'Youtube URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'youtube_url'
) ) );
// Add Flickr Setting
$wp_customize->add_setting( 'social_flickr', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_flickr', array(
'label' => __( 'Display Flickr?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_flickr',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'flickr_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'flickr_url', array(
'label' => __( 'Flickr URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'flickr_url'
) ) );
// Add Pinterest Setting
$wp_customize->add_setting( 'social_pinterest', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_pinterest', array(
'label' => __( 'Display Pinterest?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_pinterest',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'pinterest_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'pinterest_url', array(
'label' => __( 'Pinterest URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'pinterest_url'
) ) );
// Add GoogleMap Setting
$wp_customize->add_setting( 'social_googlemaps', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_googlemaps', array(
'label' => __( 'Display Google Maps?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_googlemaps',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'googlemaps_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'googlemaps_url', array(
'label' => __( 'Google Maps URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'googlemaps_url'
) ) );
// Add Email Setting
$wp_customize->add_setting( 'social_email', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_email', array(
'label' => __( 'Display Email?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_email',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'email_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'email_url', array(
'label' => __( 'Email Address', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'email_url'
) ) );
// Add RSS Setting
$wp_customize->add_setting( 'social_rss', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_rss', array(
'label' => __( 'Display RSS?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_rss',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'rss_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'rss_url', array(
'label' => __( 'RSS URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'rss_url'
) ) );
// Add Instagram Setting
$wp_customize->add_setting( 'social_instagram', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'social_instagram', array(
'label' => __( 'Display Instagram?', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'social_instagram',
'type' => 'checkbox'
) ) );
$wp_customize->add_setting( 'instagram_url', array(
'sanitize_callback' => 'esc_url_raw',
) );
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'instagram_url', array(
'label' => __( 'Instagram URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_social_media',
'settings' => 'instagram_url'
) ) );
/* --------------------------------------------------------------
// BLOG SECTION
-------------------------------------------------------------- */
$wp_customize->add_panel( 'blog_id', array(
'priority' => 56,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Blog', 'cyberchimps_core' ),
'description' => __( 'Several settings for Blog', 'cyberchimps_core' ),
) );
$wp_customize->add_section( 'cyberchimps_blog_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Blog Option', 'cyberchimps_core' ),
'description' => __( 'Blog elements configuration', 'cyberchimps_core' ),
'panel' => 'blog_id',
) );
$sidebar_choices = apply_filters( 'sidebar_layout_options', array(
'full_width' => $imagepath . '1col.png',
'right_sidebar' => $imagepath . '2cr.png'
) );
if ( count( $sidebar_choices ) > 1 ) {
$wp_customize->add_setting( 'sidebar_images', array(
'default' => 'right_sidebar',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'sidebar_images', array(
'label' => __( 'Select Page Layout', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'sidebar_images',
'choices' => $sidebar_choices,
) ) );
}
$wp_customize->add_setting( 'blog_title', array(
'default' => 0,
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'blog_title', array(
'label' => __( 'Blog Title', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'blog_title',
'class' => 'blog_title_toggle',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'blog_title_text', array(
'default' => __( 'Blog', 'cyberchimps_core' ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'blog_title_text', array(
'label' => __( 'Blog Title Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'blog_title_text',
'type' => 'text'
) );
//Disable Post Format Icons
$wp_customize->add_setting( 'post_format_icons', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_format_icons', array(
'label' => __( 'Post Format Icons', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_format_icons',
'type' => 'checkbox'
) );
//Post Excerpts
$wp_customize->add_setting( 'post_excerpts', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_excerpts', array(
'label' => __( 'Post Excerpts', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_excerpts',
'type' => 'checkbox'
) );
//Post Excerpts Read More Text
$wp_customize->add_setting( 'blog_read_more_text', array(
'default' => __( 'Read More...','cyberchimps_core' ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'blog_read_more_text', array(
'label' => __( 'Read More Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'blog_read_more_text',
'type' => 'text'
) );
//Post Excerpts Length
$wp_customize->add_setting( 'blog_excerpt_length', array(
'default' => '55',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'blog_excerpt_length', array(
'label' => __( 'Excerpt Length', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'blog_excerpt_length',
'type' => 'text'
) );
//Disable Featured Images
$wp_customize->add_setting( 'post_featured_images', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_featured_images', array(
'label' => __( 'Featured Images', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_featured_images',
'type' => 'checkbox'
) );
//Disable Post Byline Author
$wp_customize->add_setting( 'post_byline_author', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_byline_author', array(
'label' => __( 'Post Byline Author', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_byline_author',
'type' => 'checkbox'
) );
//Disable Post Byline Categories
$wp_customize->add_setting( 'post_byline_categories', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_byline_categories', array(
'label' => __( 'Post Byline Categories', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_byline_categories',
'type' => 'checkbox'
) );
//Post Byline Date
$wp_customize->add_setting( 'post_byline_date', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_byline_date', array(
'label' => __( 'Post Byline Date', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_byline_date',
'type' => 'checkbox'
) );
//Post Byline Comments
$wp_customize->add_setting( 'post_byline_comments', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_byline_comments', array(
'label' => __( 'Post Byline Comments', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_byline_comments',
'type' => 'checkbox'
) );
//Post Byline Tags
$wp_customize->add_setting( 'post_byline_tags', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'post_byline_tags', array(
'label' => __( 'Post Byline Tags', 'cyberchimps_core' ),
'section' => 'cyberchimps_blog_section',
'settings' => 'post_byline_tags',
'type' => 'checkbox'
) );
$theme_options_main = get_option('theme_mods_'.get_template());
if(!isset($theme_options_main['cyberchimps_display_slider']))
{
set_theme_mod('cyberchimps_display_slider', '1');
}
if(!isset($theme_options_main['cyberchimps_display_portfolio']))
{
set_theme_mod('cyberchimps_display_portfolio', '1');
}
if(!isset($theme_options_main['cyberchimps_display_boxes']))
{
set_theme_mod('cyberchimps_display_boxes', '1');
}
//Choose to display Blog Slider on Blog page
$wp_customize->add_setting('cyberchimps_display_slider', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
));
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'cyberchimps_display_slider',
array(
'label' => __('Display Slider ?', 'cyberchimps_core'),
'section' => 'cyberchimps_blog_section',
'settings' => 'cyberchimps_display_slider',
'type' => 'checkbox',
)
)
);
//Choose to display Portfolio on Blog page
$wp_customize->add_setting('cyberchimps_display_portfolio', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
));
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'cyberchimps_display_portfolio',
array(
'label' => __('Display Portfolio ?', 'cyberchimps_core'),
'section' => 'cyberchimps_blog_section',
'settings' => 'cyberchimps_display_portfolio',
'type' => 'checkbox',
)
)
);
//Choose to display Boxes on Blog page
$wp_customize->add_setting('cyberchimps_display_boxes', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
));
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'cyberchimps_display_boxes',
array(
'label' => __('Display Boxes ?', 'cyberchimps_core'),
'section' => 'cyberchimps_blog_section',
'settings' => 'cyberchimps_display_boxes',
'type' => 'checkbox',
)
)
);
/* --------------------------------------------------------------
// BLOG SLIDER SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_blogslider_section', array(
'priority' => 15,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Blog Slider Lite', 'cyberchimps_core' ),
'description' => sprintf( __( 'Slider Lite limits you to a total of 3 images throughout your whole site. Upgrade to %1$s to be able to create more images. Categorize them and display each category on a different page.', 'cyberchimps_core' ), '' . apply_filters( 'cyberchimps_upgrade_pro_title', __( 'Pro', 'cyberchimps_core' ) ) . ' ' ),
'panel' => 'blog_id',
) );
//Slider image 1
$wp_customize->add_setting( 'image_one_slide', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_slider_lite_img1', '/images/branding/slide1.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_one_slide', array(
'label' => __( 'Upload Slider Image 1', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_one_slide',
'type' => 'image',
) ) );
//Slider image 1 url
$wp_customize->add_setting( 'image_one_slide_url', array(
'default' => apply_filters( 'cyberchimps_slide_lite_url1', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'image_one_slide_url', array(
'label' => __( 'Slide 1 URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_one_slide_url',
'type' => 'text'
) );
//Slider image 2
$wp_customize->add_setting( 'image_two_slide', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_slider_lite_img2', '/elements/lib/images/slider/slide1.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_two_slide', array(
'label' => __( 'Upload Slider Image 2', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_two_slide',
'type' => 'image',
) ) );
//Slider image 2 url
$wp_customize->add_setting( 'image_two_slide_url', array(
'default' => apply_filters( 'cyberchimps_slide_lite_url2', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'image_two_slide_url', array(
'label' => __( 'Slide 2 URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_two_slide_url',
'type' => 'text'
) );
//Slider image 3
$wp_customize->add_setting( 'image_three_slide', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_slider_lite_img3', '/elements/lib/images/slider/slide1.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'image_three_slide', array(
'label' => __( 'Upload Slider Image 3', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_three_slide',
'type' => 'image',
) ) );
//Slider image 3 url
$wp_customize->add_setting( 'image_three_slide_url', array(
'default' => apply_filters( 'cyberchimps_slide_lite_url3', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'image_three_slide_url', array(
'label' => __( 'Slide 3 URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogslider_section',
'settings' => 'image_three_slide_url',
'type' => 'text'
) );
/* --------------------------------------------------------------
// BLOG PORTFOLIO SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_blogportfolio_section', array(
'priority' => 15,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Portfolio Lite', 'cyberchimps_core' ),
'description' => sprintf( __( 'Portfolio Lite limits you to a total of 4 items throughout your whole site. Upgrade to %1$s to be able to create as many portfolio items as you like. Categorize them and display each category on a different page.', 'cyberchimps_core' ), '' . apply_filters( 'cyberchimps_upgrade_pro_title', __( 'Pro', 'cyberchimps_core' ) ) . ' ' ),
'panel' => 'blog_id',
) );
//Portfolio image 1
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_one', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_portfolio_lite_img_one', '/cyberchimps/lib/images/portfolio.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_portfolio_lite_image_one', array(
'label' => __( 'First Portfolio Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_one',
'type' => 'image',
) ) );
//Portfolio caption 1
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_one_caption', array(
'default' => apply_filters('cyberchimps_portfolio_lite_image_one_caption' , ''),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_lite_image_one_caption', array(
'label' => __( 'First Portfolio Image Caption', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'default' => apply_filters( 'cyberchimps_portfolio_lite_caption1', 'CyberChimps' ),
'settings' => 'cyberchimps_blog_portfolio_lite_image_one_caption',
'type' => 'text'
) );
//Portfolio link checkbox 1
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_toggle_one', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_toggle_one', array(
'label' => __( 'Show First Porfolio Link', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_toggle_one',
'type' => 'checkbox'
) );
//Portfolio link 1
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_url_one', array(
'default' => apply_filters( 'cyberchimps_portfolio_lite_url1', esc_url_raw( 'http://cyberchimps.com' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_url_one', array(
'label' => __( 'First Porfolio URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_url_one',
'type' => 'text'
) );
//Portfolio image 2
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_two', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_portfolio_lite_img_two', '/cyberchimps/lib/images/portfolio.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_portfolio_lite_image_two', array(
'label' => __( 'Second Portfolio Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_two',
'type' => 'image',
) ) );
//Portfolio caption 2
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_two_caption', array(
'default' => apply_filters('cyberchimps_portfolio_lite_image_two_caption' , ''),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_lite_image_two_caption', array(
'label' => __( 'Second Portfolio Image Caption', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_two_caption',
'type' => 'text'
) );
//Portfolio link checkbox 2
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_toggle_two', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_toggle_two', array(
'label' => __( 'Show Second Porfolio Link', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_toggle_two',
'type' => 'checkbox'
) );
//Portfolio link 2
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_url_two', array(
'default' => apply_filters( 'cyberchimps_portfolio_lite_url2', esc_url_raw( 'http://cyberchimps.com' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_url_two', array(
'label' => __( 'Second Porfolio URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_url_two',
'type' => 'text'
) );
//Portfolio image 3
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_three', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_portfolio_lite_img_three', '/cyberchimps/lib/images/portfolio.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_portfolio_lite_image_three', array(
'label' => __( 'Third Portfolio Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_three',
'type' => 'image',
) ) );
//Portfolio caption 3
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_three_caption', array(
'default' => apply_filters('cyberchimps_portfolio_lite_image_three_caption' , ''),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_lite_image_three_caption', array(
'label' => __( 'Third Portfolio Image Caption', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_three_caption',
'type' => 'text'
) );
//Portfolio link checkbox 3
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_toggle_three', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_toggle_three', array(
'label' => __( 'Show Third Porfolio Link', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_toggle_three',
'type' => 'checkbox'
) );
//Portfolio link 3
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_url_three', array(
'default' => apply_filters( 'cyberchimps_portfolio_lite_url3', esc_url_raw( 'http://cyberchimps.com' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_url_three', array(
'label' => __( 'Third Porfolio URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_url_three',
'type' => 'text'
) );
//Portfolio image 4
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_four', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_portfolio_lite_img_four', '/cyberchimps/lib/images/portfolio.jpg' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_portfolio_lite_image_four', array(
'label' => __( 'Fourth Portfolio Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_four',
'type' => 'image',
) ) );
//Portfolio caption 4
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_lite_image_four_caption', array(
'default' => apply_filters('cyberchimps_portfolio_lite_image_four_caption' , ''),
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_lite_image_four_caption', array(
'label' => __( 'Fourth Portfolio Image Caption', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_lite_image_four_caption',
'type' => 'text'
) );
//Portfolio link checkbox 4
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_toggle_four', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_toggle_four', array(
'label' => __( 'Show Fourth Porfolio Link', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_toggle_four',
'type' => 'checkbox'
) );
//Portfolio link 4
$wp_customize->add_setting( 'cyberchimps_blog_portfolio_link_url_four', array(
'default' => apply_filters( 'cyberchimps_portfolio_lite_url4', 'http://cyberchimps.com' ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_portfolio_link_url_four', array(
'label' => __( 'Fourth Porfolio URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogportfolio_section',
'settings' => 'cyberchimps_blog_portfolio_link_url_four',
'type' => 'text'
) );
/* --------------------------------------------------------------
// BOXES LITE SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_blogboxes_section', array(
'priority' => 15,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Boxes Lite', 'cyberchimps_core' ),
'description' => sprintf( __( 'Boxes Lite limits you to a total of 3 boxes throughout your whole site. Upgrade to %1$s to be able to create as many boxes as you like. Categorize them and display each category on a different page.', 'cyberchimps_core' ), '' . apply_filters( 'cyberchimps_upgrade_pro_title', __( 'Pro', 'cyberchimps_core' ) ) . ' ' ),
'panel' => 'blog_id',
) );
//Boxes image 1
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_one', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img1', '/elements/lib/images/boxes/slidericon.png' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_boxes_lite_image_one', array(
'label' => __( 'First Box Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_one',
'type' => 'image',
) ) );
//URL of Box link 1
$wp_customize->add_setting( 'cyberchimps_blog_boxes_link_url_one', array(
'default' => apply_filters( 'cyberchimps_boxes_lite_url1', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_link_url_one', array(
'label' => __( 'First Link URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_link_url_one',
'type' => 'text'
) );
//Box text 1
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_one_text', array(
'default' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit.
Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.',
'sanitize_callback' => 'cyberchimps_sanitize_textarea'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_lite_image_one_text', array(
'label' => __( 'First Box Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_one_text',
'type' => 'textarea'
) );
//Boxes image 2
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_two', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img2', '/elements/lib/images/boxes/blueprint.png' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_boxes_lite_image_two', array(
'label' => __( 'Second Box Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_two',
'type' => 'image',
) ) );
//URL of Box link 2
$wp_customize->add_setting( 'cyberchimps_blog_boxes_link_url_two', array(
'default' => apply_filters( 'cyberchimps_boxes_lite_url2', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_link_url_two', array(
'label' => __( 'Second Link URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_link_url_two',
'type' => 'text'
) );
//Box text 2
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_two_text', array(
'default' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit.
Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.',
'sanitize_callback' => 'cyberchimps_sanitize_textarea'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_lite_image_two_text', array(
'label' => __( 'Second Box Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_two_text',
'type' => 'textarea'
) );
//Boxes image 3
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_three', array(
'default' => get_template_directory_uri() . apply_filters( 'cyberchimps_boxes_lite_img3', '/elements/lib/images/boxes/docs.png' ),
'sanitize_callback' => 'cyberchimps_sanitize_upload'
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cyberchimps_blog_boxes_lite_image_three', array(
'label' => __( 'Third Box Image', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_three',
'type' => 'image',
) ) );
//URL of Box link 3
$wp_customize->add_setting( 'cyberchimps_blog_boxes_link_url_three', array(
'default' => apply_filters( 'cyberchimps_boxes_lite_url3', esc_url_raw( 'http://wordpress.org' ) ),
'sanitize_callback' => 'esc_url_raw'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_link_url_three', array(
'label' => __( 'Third Link URL', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_link_url_three',
'type' => 'text'
) );
//Box text 3
$wp_customize->add_setting( 'cyberchimps_blog_boxes_lite_image_three_text', array(
'default' => 'Alto ventos est coeptis utque fecit. Phoebe sine circumfuso arce. Tanto aliis. Matutinis cornua origo formaeque animal mundo. Chaos: fabricator. Natura mundo caesa addidit.
Cuncta habendum meis omni ille formaeque emicuit septemque et. Lege fecit aethere porrexerat gentes horrifer formas.',
'sanitize_callback' => 'cyberchimps_sanitize_textarea'
) );
$wp_customize->add_control( 'cyberchimps_blog_boxes_lite_image_three_text', array(
'label' => __( 'Third Box Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_blogboxes_section',
'settings' => 'cyberchimps_blog_boxes_lite_image_three_text',
'type' => 'textarea'
) );
/* --------------------------------------------------------------
// TEMPLATE SECTION
-------------------------------------------------------------- */
$wp_customize->add_panel( 'template_id', array(
'priority' => 58,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Template', 'cyberchimps_core' ),
'description' => __( 'Several settings for Template', 'cyberchimps_core' )
) );
/* * ******* Start Single Post Options ********** */
$wp_customize->add_section( 'cyberchimps_template_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Single Post', 'cyberchimps_core' ),
'panel' => 'template_id'
) );
if ( count( $sidebar_choices ) > 1 ) {
$wp_customize->add_setting( 'single_post_sidebar_options', array(
'default' => 'right_sidebar',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'single_post_sidebar_options', array(
'label' => __( 'Sidebar Options', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_sidebar_options',
'choices' => $sidebar_choices,
) ) );
}
//Disable Post Title
$wp_customize->add_setting( 'single_post_title', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_title', array(
'label' => __( 'Post Title', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_title',
'type' => 'checkbox'
) );
//Disable Featured Images
$wp_customize->add_setting( 'single_post_featured_images', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_featured_images', array(
'label' => __( 'Featured Images', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_featured_images',
'type' => 'checkbox'
) );
//Disable Post Format Icons
$wp_customize->add_setting( 'single_post_format_icons', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_format_icons', array(
'label' => __( 'Post Format Icons', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_format_icons',
'type' => 'checkbox'
) );
//Disable Post Byline Author
$wp_customize->add_setting( 'single_post_byline_author', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_byline_author', array(
'label' => __( 'Post Byline Author', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_byline_author',
'type' => 'checkbox'
) );
//Disable Post Byline Categories
$wp_customize->add_setting( 'single_post_byline_categories', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_byline_categories', array(
'label' => __( 'Post Byline Categories', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_byline_categories',
'type' => 'checkbox'
) );
//Post Byline Date
$wp_customize->add_setting( 'single_post_byline_date', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_byline_date', array(
'label' => __( 'Post Byline Date', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_byline_date',
'type' => 'checkbox'
) );
//Post Byline Comments
$wp_customize->add_setting( 'single_post_byline_comments', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_byline_comments', array(
'label' => __( 'Post Byline Comments', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_byline_comments',
'type' => 'checkbox'
) );
//Post Byline Tags
$wp_customize->add_setting( 'single_post_byline_tags', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'single_post_byline_tags', array(
'label' => __( 'Post Byline Tags', 'cyberchimps_core' ),
'section' => 'cyberchimps_template_section',
'settings' => 'single_post_byline_tags',
'type' => 'checkbox'
) );
/* * ******* End Single Post Options ********** */
/* * ******* Start Archive template Options ********** */
$wp_customize->add_section( 'cyberchimps_archive_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Archive', 'cyberchimps_core' ),
'panel' => 'template_id'
) );
if ( count( $sidebar_choices ) > 1 ) {
$wp_customize->add_setting( 'archive_sidebar_options', array(
'default' => 'right_sidebar',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'archive_sidebar_options', array(
'label' => __( 'Sidebar Options', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_sidebar_options',
'choices' => $sidebar_choices,
) ) );
}
//Post Format Icons
$wp_customize->add_setting( 'archive_format_icons', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_format_icons', array(
'label' => __( 'Post Format Icons', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_format_icons',
'type' => 'checkbox'
) );
//Post Excerpts
$wp_customize->add_setting( 'archive_post_excerpts', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_excerpts', array(
'label' => __( 'Post Excerpts', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_excerpts',
'type' => 'checkbox'
) );
//Disable Featured Images
$wp_customize->add_setting( 'archive_featured_images', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_featured_images', array(
'label' => __( 'Featured Images', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_featured_images',
'type' => 'checkbox'
) );
//Disable Post Byline Author
$wp_customize->add_setting( 'archive_post_byline_author', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_byline_author', array(
'label' => __( 'Post Byline Author', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_byline_author',
'type' => 'checkbox'
) );
//Disable Post Byline Categories
$wp_customize->add_setting( 'archive_post_byline_categories', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_byline_categories', array(
'label' => __( 'Post Byline Categories', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_byline_categories',
'type' => 'checkbox'
) );
//Post Byline Date
$wp_customize->add_setting( 'archive_post_byline_date', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_byline_date', array(
'label' => __( 'Post Byline Date', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_byline_date',
'type' => 'checkbox'
) );
//Post Byline Comments
$wp_customize->add_setting( 'archive_post_byline_comments', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_byline_comments', array(
'label' => __( 'Post Byline Comments', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_byline_comments',
'type' => 'checkbox'
) );
//Post Byline Tags
$wp_customize->add_setting( 'archive_post_byline_tags', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'archive_post_byline_tags', array(
'label' => __( 'Post Byline Tags', 'cyberchimps_core' ),
'section' => 'cyberchimps_archive_section',
'settings' => 'archive_post_byline_tags',
'type' => 'checkbox'
) );
/* * ******* End Archive template Options ********** */
/* * ******* Start Search template Options ********** */
$wp_customize->add_section( 'cyberchimps_search_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Search', 'cyberchimps_core' ),
'panel' => 'template_id'
) );
if ( count( $sidebar_choices ) > 1 ) {
$wp_customize->add_setting( 'search_sidebar_options', array(
'default' => 'right_sidebar',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'search_sidebar_options', array(
'label' => __( 'Sidebar Options', 'cyberchimps_core' ),
'section' => 'cyberchimps_search_section',
'settings' => 'search_sidebar_options',
'choices' => $sidebar_choices,
) ) );
}
//Post Excerpts
$wp_customize->add_setting( 'search_post_excerpts', array(
'default' => 'unchecked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'search_post_excerpts', array(
'label' => __( 'Post Excerpts', 'cyberchimps_core' ),
'section' => 'cyberchimps_search_section',
'default' => 55,
'settings' => 'search_post_excerpts',
'type' => 'checkbox'
) );
//Post Excerpts Read More Text
$wp_customize->add_setting( 'search_post_read_more', array(
'default' => 'Read More...',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'search_post_read_more', array(
'label' => __( 'Read More Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_search_section',
'default' => __( 'Read More...', 'cyberchimps_core' ),
'settings' => 'search_post_read_more',
'type' => 'text'
) );
//Post Excerpts Length
$wp_customize->add_setting( 'search_post_excerpt_length', array(
'default' => '55',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'search_post_excerpt_length', array(
'label' => __( 'Excerpt Length', 'cyberchimps_core' ),
'section' => 'cyberchimps_search_section',
'settings' => 'search_post_excerpt_length',
'type' => 'text'
) );
/* * ******* End Search template Options ********** */
/* * ******* Start 404 template Options ********** */
$wp_customize->add_section( 'cyberchimps_error_section', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( '404', 'cyberchimps_core' ),
'panel' => 'template_id'
) );
if ( count( $sidebar_choices ) > 1 ) {
$wp_customize->add_setting( 'error_sidebar_options', array(
'default' => 'full_width',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_skin_selector( $wp_customize, 'error_sidebar_options', array(
'label' => __( 'Sidebar Options', 'cyberchimps_core' ),
'section' => 'cyberchimps_error_section',
'settings' => 'error_sidebar_options',
'choices' => $sidebar_choices,
) ) );
}
//Custom 404 Title
$wp_customize->add_setting( 'error_custom_title', array(
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'error_custom_title', array(
'label' => __( 'Custom 404 Title', 'cyberchimps_core' ),
'section' => 'cyberchimps_error_section',
'settings' => 'error_custom_title',
'type' => 'text'
) );
//Custom 404 Content
$wp_customize->add_setting( 'error_custom_content', array(
'sanitize_callback' => 'cyberchimps_sanitize_textarea'
) );
$wp_customize->add_control( 'error_custom_content', array(
'label' => __( 'Custom 404 Content', 'cyberchimps_core' ),
'section' => 'cyberchimps_error_section',
'settings' => 'error_custom_content',
'type' => 'textarea'
) );
/* * ******* End 404 template Options ********** */
/* --------------------------------------------------------------
// FOOTER SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_footer_section', array(
'title' => __( 'Footer', 'cyberchimps_core' ),
'priority' => 60,
) );
$wp_customize->add_setting( 'footer_show_toggle', array(
'default' => 'checked',
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'footer_show_toggle', array(
'label' => __( 'Footer Widgets', 'cyberchimps_core' ),
'section' => 'cyberchimps_footer_section',
'settings' => 'footer_show_toggle',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'footer_copyright_text', array(
'default' => '© Wordpress',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'footer_copyright_text', array(
'label' => __( 'Footer Copyright Text', 'cyberchimps_core' ),
'section' => 'cyberchimps_footer_section',
'settings' => 'footer_copyright_text',
'type' => 'text'
) );
/* --------------------------------------------------------------
// LAYOUT SECTION
-------------------------------------------------------------- */
$wp_customize->add_section( 'cyberchimps_layout_section', array(
'title' => __( 'Layout', 'cyberchimps_core' ),
'priority' => 30,
) );
$wp_customize->add_setting( 'responsive_design', array(
'default' => apply_filters( 'responsive_design_default', 'checked' ),
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'responsive_design', array(
'label' => __( 'Responsive Design', 'cyberchimps_core' ),
'section' => 'cyberchimps_layout_section',
'settings' => 'responsive_design',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'responsive_videos', array(
'default' => apply_filters( 'responsive_videos_default', 'checked' ),
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'responsive_videos', array(
'label' => __( 'Responsive Videos', 'cyberchimps_core' ),
'section' => 'cyberchimps_layout_section',
'settings' => 'responsive_videos',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'gallery_lightbox', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'gallery_lightbox', array(
'label' => __( 'Gallery Lightbox', 'cyberchimps_core' ),
'section' => 'cyberchimps_layout_section',
'settings' => 'gallery_lightbox',
'type' => 'checkbox'
) );
$wp_customize->add_setting( 'wide_sidebar', array(
'sanitize_callback' => 'cyberchimps_sanitize_checkbox'
) );
$wp_customize->add_control( 'wide_sidebar', array(
'label' => __( 'Wide Sidebar', 'cyberchimps_core' ),
'section' => 'cyberchimps_layout_section',
'description' => __( 'Only works on layouts with 1 sidebar', 'cyberchimps_core' ),
'settings' => 'wide_sidebar',
'type' => 'checkbox'
) );
// website width
$wp_customize->add_setting( 'max_width', array(
'default' => apply_filters( 'max_width_default', '1020' ),
'sanitize_callback' => 'absint'
) );
$wp_customize->add_control( 'max_width', array(
'label' => __( 'Max Width', 'cyberchimps_core' ),
'section' => 'cyberchimps_layout_section',
'type' => 'text',
'settings' => 'max_width',
) );
//Design
$wp_customize->add_section( 'cyberchimps_design_section', array(
'title' => __( 'Design', 'cyberchimps_core' ),
'priority' => 35,
) );
// text color
$wp_customize->add_setting( 'text_colorpicker', array(
'default' => '',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_colorpicker', array(
'label' => __( 'Text Color', 'cyberchimps_core' ),
'section' => 'cyberchimps_design_section',
'settings' => 'text_colorpicker',
) ) );
// link color
$wp_customize->add_setting( 'link_colorpicker', array(
'default' => '',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_colorpicker', array(
'label' => __( 'Link Color', 'cyberchimps_core' ),
'section' => 'cyberchimps_design_section',
'settings' => 'link_colorpicker',
) ) );
// link hover color
$wp_customize->add_setting( 'link_hover_colorpicker', array(
'default' => '',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_hover_colorpicker', array(
'label' => __( 'Link Hover Color', 'cyberchimps_core' ),
'section' => 'cyberchimps_design_section',
'settings' => 'link_hover_colorpicker',
) ) );
// new typography section
$wp_customize->add_section( 'cyberchimps_typography_section', array(
'title' => __( 'Typography', 'cyberchimps_core' ),
'priority' => 40,
) );
// typography sizes
$wp_customize->add_setting( 'customize_options[typography_options][size]', array(
'default' => '14px',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_Typography_Size( $wp_customize, 'typography_size', array(
'label' => __( 'Typography Size', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'select',
'settings' => 'customize_options[typography_options][size]',
'choices' => apply_filters( 'cyberchimps_typography_sizes', '' )
) ) );
// typography style
$wp_customize->add_setting( 'customize_options[typography_options][style]', array(
'default' => 'normal',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'typography_style', array(
'label' => __( 'Typography Style', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'select',
'settings' => 'customize_options[typography_options][style]',
'choices' => apply_filters( 'cyberchimps_typography_styles', '' )
) );
// typography face
/* Default font faces */
$faces = array(
'Arial, Helvetica, sans-serif' => 'Arial',
'Arial Black, Gadget, sans-serif' => 'Arial Black',
'Comic Sans MS, cursive' => 'Comic Sans MS',
'Courier New, monospace' => 'Courier New',
'Georgia, serif' => 'Georgia',
'"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",Helvetica, Arial, "Lucida Grande", sans-serif' => 'Helvetica Neue',
'Impact, Charcoal, sans-serif' => 'Impact',
'Lucida Console, Monaco, monospace' => 'Lucida Console',
'Lucida Sans Unicode, Lucida Grande, sans-serif' => 'Lucida Sans Unicode',
'"Open Sans", sans-serif' => 'Open Sans',
'Palatino Linotype, Book Antiqua, Palatino, serif' => 'Palatino Linotype',
'Tahoma, Geneva, sans-serif' => 'Tahoma',
'Times New Roman, Times, serif' => 'Times New Roman',
'Trebuchet MS, sans-serif' => 'Trebuchet MS',
'Verdana, Geneva, sans-serif' => 'Verdana',
'Symbol' => 'Symbol',
'Webdings' => 'Webdings',
'Wingdings, Zapf Dingbats' => 'Wingdings',
'MS Sans Serif, Geneva, sans-serif' => 'MS Sans Serif',
'MS Serif, New York, serif' => 'MS Serif',
'Google Fonts' => 'Google Fonts'
);
// Font family for text
$wp_customize->add_setting( 'customize_options[typography_options][face]', array(
'default' => 'Arial Black, Gadget, sans-serif',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'typography_face', array(
'label' => __( 'Typography Face', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'select',
'settings' => 'customize_options[typography_options][face]',
'choices' => apply_filters( 'cyberchimps_typography_faces', $faces )
) );
// Google Font family for text
$wp_customize->add_setting( 'customize_options[google_font_field]', array(
'default' => 'Arial',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'google_font_field', array(
'label' => __( 'Enter Google font', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'text',
'settings' => 'customize_options[google_font_field]',
) );
// Font family for headings
$wp_customize->add_setting( 'customize_options[font_family_headings][face]', array(
'default' => 'Arial, Helvetica, sans-serif',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'font_family_headings', array(
'label' => __( 'Font Family for headings', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'select',
'settings' => 'customize_options[font_family_headings][face]',
'choices' => apply_filters( 'cyberchimps_typography_faces', $faces )
) );
// Google Font family for headings
$wp_customize->add_setting( 'customize_options[google_font_headings]', array(
'default' => 'Arial',
'sanitize_callback' => 'cyberchimps_text_sanitization'
) );
$wp_customize->add_control( 'google_font_headings', array(
'label' => __( 'Google font for headings', 'cyberchimps_core' ),
'section' => 'cyberchimps_typography_section',
'type' => 'text',
'settings' => 'customize_options[google_font_headings]',
) );
// background image
$wp_customize->add_setting( 'cyberchimps_background', array(
'default' => 'none',
'type' => 'theme_mod',
'sanitize_callback' => 'cyberchimps_file_sanitization'
) );
$wp_customize->add_control( new Cyberchimps_Background_Image( $wp_customize, 'cyberchimps_background', array(
'label' => 'CyberChimps ' . __( 'Background Image', 'cyberchimps_core' ),
'section' => 'background_image',
'settings' => 'cyberchimps_background',
'choices' => apply_filters( 'cyberchimps_background_image', '' ),
) ) );
}
// Add upgrade button to the free theme customizer.
function cc_add_upgrade_button() {
// Get the upgrade link.
$upgrade_link = apply_filters( 'cyberchimps_upgrade_link', esc_url_raw( 'http://cyberchimps.com' ) );
?>