' . esc_html__(' - only premium', 'boxed-wp') . ''; // slect categories $categories = get_categories(); $cats = array(); $i = 0; foreach($categories as $category){ if($i==0){ $default = $category->slug; $i++; } $cats[$category->slug] = $category->name; } //01 PREMIUM $wp_customize->add_section('upgrade-premium', array( 'title' => esc_html__('UPGRADE TO PREMIUM', 'boxed-wp'), 'priority' => 1, ) ); //03 GENERAL $wp_customize->get_section('title_tagline')->title = esc_html__('General Settings', 'boxed-wp'); $wp_customize->get_section('title_tagline')->priority = 3; //04 LAYOUT $wp_customize->add_section('layout-settings', array( 'title' => esc_html__('Layout settings', 'boxed-wp'), 'priority' => 4, )); // 05 STYLE $wp_customize->get_section('colors')->title = esc_html__('Style Settings', 'boxed-wp'); $wp_customize->get_section('colors')->priority = 5; // 06 FOOTER $wp_customize->add_section('footer-settings', array( 'title' => esc_html__('Footer Settings', 'boxed-wp'), 'priority' => 6, )); // 06 SOCIAL $wp_customize->add_section('social-settings', array( 'title' => esc_html__('Social Settings', 'boxed-wp'), 'priority' => 7, )); // 07 ADVANCED $wp_customize->add_section('advanced-settings', array( 'title' => esc_html__('Advanced Settings', 'boxed-wp'), 'priority' => 7, )); /***************************************************************** * PREMIUM ******************************************************************/ $wp_customize->add_setting($igthemes_option . '[upgrade_box]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', ) ); $wp_customize->add_control( new Html_Custom_Control( $wp_customize, 'upgrade_box', array( 'label' => esc_html__('', 'boxed-wp'), 'description' => '

' . esc_html__('If you like this theme, considering supporting development by purchasing the premium version.', 'boxed-wp'). '

' . '', 'type' => 'custom', 'section' => 'upgrade-premium', 'settings' => $igthemes_option . '[upgrade_box]', ))); /***************************************************************** * GENERAL SETTINGS ******************************************************************/ //blog name $wp_customize->add_setting('blogname', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_text', 'transport'=>'postMessage' )); $wp_customize->add_control('blogname', array( 'label' => esc_html__('Site Title', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => 'blogname', 'priority' => 1, )); //blog description $wp_customize->add_setting('blogdescription', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_text', 'transport'=>'postMessage' )); $wp_customize->add_control('blogdescription', array( 'label' => esc_html__('Tagline', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => 'blogdescription', 'priority' => 2, )); //logo $wp_customize->add_setting($igthemes_option . '[logo]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'logo', array( 'label' => esc_html__('Site Logo', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[logo]', ))); //favicon $wp_customize->add_setting($igthemes_option . '[favicon]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'favicon', array( 'label' => esc_html__('Site Favicon', 'boxed-wp'), 'description' => esc_html__('Upload your site favicon (16x16 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[favicon]', ))); //iphone icon $wp_customize->add_setting($igthemes_option . '[icon_iphone]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'iphone_icon', array( 'label' => esc_html__('IPhone Icon', 'boxed-wp'), 'description' => esc_html__('Apple touch icon iphone (57x57 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[icon_iphone]', ))); //ipad icon $wp_customize->add_setting($igthemes_option . '[icon_ipad]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'icon_ipad', array( 'label' => esc_html__('IPad Icon', 'boxed-wp'), 'description' => esc_html__('Apple touch icon ipad (76x76 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[icon_ipad]', ))); //iphone retina icon $wp_customize->add_setting($igthemes_option . '[icon_iphone_retina]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'icon_iphone_retina', array( 'label' => esc_html__('IPhone Retina Icon', 'boxed-wp'), 'description' => esc_html__('Apple touch icon iphone retina (120x120 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[icon_iphone_retina]', ))); //ipad retina icon $wp_customize->add_setting($igthemes_option . '[icon_ipad_retina]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'icon_ipad_retina', array( 'label' => esc_html__('IPad Retina Icon', 'boxed-wp'), 'description' => esc_html__('Apple touch icon ipad retina (152x152 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[icon_ipad_retina]', ))); //windows 8 icon $wp_customize->add_setting($igthemes_option . '[win_tile_image]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_upload', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'win_tile_image', array( 'label' => esc_html__('Windows 8 Icon', 'boxed-wp'), 'description' => esc_html__('Pinned site Windows 8 icon (144x144 px)', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[win_tile_image]', ))); //windows 8 icon color $wp_customize->add_setting($igthemes_option . '[win_tile_color]', array( 'default' => 'fff', 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_hex', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'win_tile_color', array( 'label' => esc_html__('Windows 8 Icon Color', 'boxed-wp'), 'description' => esc_html__('Windows 8 pinned image color', 'boxed-wp'), 'section' => 'title_tagline', 'settings' => $igthemes_option . '[win_tile_color]', ))); //lightbox $wp_customize->add_setting($igthemes_option . '[lightbox]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('lightbox', array( 'label' => esc_html__('Lightbox', 'boxed-wp'), 'description' => esc_html__('Enable image lightbox', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'title_tagline', 'settings' => $igthemes_option . '[lightbox]', )); //breadcrumb $wp_customize->add_setting($igthemes_option . '[breadcrumb]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('breadcrumb', array( 'label' => esc_html__('Breadcrumb', 'boxed-wp'), 'description' => esc_html__('Enable breadcrumb (it will use WordPress SEO breadcrumb if available)', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'title_tagline', 'settings' => $igthemes_option . '[breadcrumb]', )); //shortcodes $wp_customize->add_setting($igthemes_option . '[shortcodes]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,$igthemes_option . '[shortcodes', array( 'label' => esc_html__('Shortcodes', 'boxed-wp'), 'description' => esc_html__('Enable theme shortcodes', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'title_tagline', 'settings' => $igthemes_option . '[shortcodes]', ))); /***************************************************************** * LAYOUT SETTINGS ******************************************************************/ //sidebar main $wp_customize->add_setting($igthemes_option . '[sidebar_main]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'sidebar_main', array( 'label' => esc_html__('Main Layout', 'boxed-wp'), 'description' => esc_html__('Select the index page layout', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[sidebar_main]', ))); //post slide $wp_customize->add_setting($igthemes_option . '[post_slide]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_carousel', )); $wp_customize->add_control('post_slide', array( 'label' => esc_html__('Carousel', 'boxed-wp'), 'description' => esc_html__('To display projects and testimonials install ', 'boxed-wp').'IG Portolio'. esc_html__(' and ', 'boxed-wp') .'IG Testimonials', 'type' => 'radio', 'choices' => array( 'none' => 'None', 'post' => 'Posts', 'project' => 'Projects', 'testimonial' => 'Testimonials', ), 'section' => 'layout-settings', 'settings' => $igthemes_option . '[post_slide]', )); //main featured images $wp_customize->add_setting($igthemes_option . '[main_featured_images]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('main_featured_images', array( 'label' => esc_html__('Index featured image', 'boxed-wp'), 'description' => esc_html__('Show featured images in index page', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[main_featured_images]', )); //main numeric pagination $wp_customize->add_setting($igthemes_option . '[main_numeric_pagination]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('main_numeric_pagination', array( 'label' => esc_html__('Numeric pagination', 'boxed-wp'), 'description' => esc_html__('Use numeric pagination in index page', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[main_numeric_pagination]', )); //sidebar single $wp_customize->add_setting($igthemes_option . '[sidebar_single]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'sidebar_single', array( 'label' => esc_html__('Single Layout', 'boxed-wp'), 'description' => esc_html__('Select the single post layout', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[sidebar_single]', ))); //post featured image $wp_customize->add_setting($igthemes_option . '[post_featured_image]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('post_featured_image', array( 'label' => esc_html__('Post featured image', 'boxed-wp'), 'description' => esc_html__('Show featured image in post page', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[post_featured_image]', )); //post meta $wp_customize->add_setting($igthemes_option . '[post_meta]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'post_meta', array( 'label' => esc_html__('Meta Data', 'boxed-wp'), 'description' => esc_html__('Hide post meta data', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[post_meta]', ))); //sidebar shop $wp_customize->add_setting($igthemes_option . '[sidebar_shop]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'sidebar_shop', array( 'label' => esc_html__('Shop Layout', 'boxed-wp'), 'description' => esc_html__('Select the shop page layout', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[sidebar_shop]', ))); //shop product slider $wp_customize->add_setting($igthemes_option . '[shop_slide]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_checkbox', )); $wp_customize->add_control('shop_slide', array( 'label' => esc_html__('Products Slide', 'boxed-wp'), 'description' => esc_html__('', 'boxed-wp'), 'type' => 'checkbox', 'section' => 'layout-settings', 'settings' => $igthemes_option . '[shop_slide]', )); /***************************************************************** * STYLE SETTINGS ******************************************************************/ //header style $wp_customize->add_setting($igthemes_option . '[header_style]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'header_style', array( 'label' => esc_html__('Header Style', 'boxed-wp'), 'description' => esc_html__('Header custom colors', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'colors', 'settings' => $igthemes_option . '[header_style]', ))); //menu style $wp_customize->add_setting($igthemes_option . '[menu_style]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'menu_style', array( 'label' => esc_html__('Menu Style', 'boxed-wp'), 'description' => esc_html__('Menu custom colors', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'colors', 'settings' => $igthemes_option . '[menu_style]', ))); //link style $wp_customize->add_setting($igthemes_option . '[link_style]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'link_style', array( 'label' => esc_html__('Links Style', 'boxed-wp'), 'description' => esc_html__('Links custom colors', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'colors', 'settings' => $igthemes_option . '[link_style]', ))); //button style $wp_customize->add_setting($igthemes_option . '[button_style]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'button_style', array( 'label' => esc_html__('Buttons Style', 'boxed-wp'), 'description' => esc_html__('Buttons custom colors', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'colors', 'settings' => $igthemes_option . '[button_style]', ))); //footer style $wp_customize->add_setting($igthemes_option . '[footer_style]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize,'footer_style', array( 'label' => esc_html__('Footer Style', 'boxed-wp'), 'description' => esc_html__('Footer custom colors', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'colors', 'settings' => $igthemes_option . '[footer_style]', ))); /***************************************************************** * FOOTER SETTINGS ******************************************************************/ //footer text $wp_customize->add_setting($igthemes_option . '[footer_text]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize, 'footer_text', array( 'label' => esc_html__('Footer Text', 'boxed-wp'), 'description' => '' . esc_html__('Footer custom text', 'boxed-wp') . $upgrade_message . '', 'type' => 'custom', 'section' => 'footer-settings', 'settings' => $igthemes_option . '[footer_text]', ))); //footer credits $wp_customize->add_setting($igthemes_option . '[footer_credits]', array( 'sanitize_callback' => 'igthemes_sanitize_allowedtags', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize, 'footer_credits', array( 'label' => esc_html__('Credits Link', 'boxed-wp'), 'description' => esc_html__('Remove author credits', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'footer-settings', 'settings' => $igthemes_option . '[footer_credits]', ))); /***************************************************************** * SOCIAL SETTINGS ******************************************************************/ //facebook $wp_customize->add_setting($igthemes_option . '[facebook_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('facebook_url', array( 'label' => esc_html__('Facebook url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[facebook_url]', )); //twitter $wp_customize->add_setting($igthemes_option . '[twitter_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('twitter_url', array( 'label' => esc_html__('Twitter url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[twitter_url]', )); //google $wp_customize->add_setting($igthemes_option . '[google_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('google_url', array( 'label' => esc_html__('Google plus url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[google_url]', )); //pinterest $wp_customize->add_setting($igthemes_option . '[pinterest_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('pinterest_url', array( 'label' => esc_html__('Pinterest url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[pinterest_url]', )); //tumblr $wp_customize->add_setting($igthemes_option . '[tumblr_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('tumblr_url', array( 'label' => esc_html__('Tumblr url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[tumblr_url]', )); //instagram $wp_customize->add_setting($igthemes_option . '[instagram_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('instagram_url', array( 'label' => esc_html__('Instagram url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[instagram_url]', )); //linkedin $wp_customize->add_setting($igthemes_option . '[linkedin_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('linkedin_url', array( 'label' => esc_html__('Linkedin url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[linkedin_url]', )); //dribbble $wp_customize->add_setting($igthemes_option . '[dribbble_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('dribbble_url', array( 'label' => esc_html__('Dribble url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[dribbble_url]', )); //vimeo $wp_customize->add_setting($igthemes_option . '[vimeo_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('vimeo_url', array( 'label' => esc_html__('Vimeo url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[vimeo_url]', )); //youtube $wp_customize->add_setting($igthemes_option . '[youtube_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('youtube_url', array( 'label' => esc_html__('Youtube url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[youtube_url]', )); //rss $wp_customize->add_setting($igthemes_option . '[rss_url]', array( 'type' => 'option', 'sanitize_callback' => 'igthemes_sanitize_url', )); $wp_customize->add_control('rss_url', array( 'label' => esc_html__('RSS url', 'boxed-wp'), 'type' => 'url', 'section' => 'social-settings', 'settings' => $igthemes_option . '[rss_url]', )); /***************************************************************** * ADVANCED SETTINGS ******************************************************************/ //custom css $wp_customize->add_setting($igthemes_option . '[custom_css]', array( 'sanitize_callback' => 'igthemes_allowed_tag', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize, 'custom_css', array( 'label' => esc_html__('Custom CSS', 'boxed-wp'), 'description' => esc_html__('Add your custom css code', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'advanced-settings', 'settings' => $igthemes_option . '[custom_css]', ))); //custom js $wp_customize->add_setting($igthemes_option . '[custom_js]', array( 'sanitize_callback' => 'igthemes_allowed_tag', )); $wp_customize->add_control( new Html_Custom_Control( $wp_customize, 'custom_js', array( 'label' => esc_html__('Custom Javascript', 'boxed-wp'), 'description' => esc_html__('Add your custom js code', 'boxed-wp') . $upgrade_message, 'type' => 'custom', 'section' => 'advanced-settings', 'settings' => $igthemes_option . '[custom_js]', ))); //END } } // Setup the Theme Customizer settings and controls... add_action('customize_register' , array('IGthemes_Customizer' , 'igthemes_customize') ); //END OF CLASS