'ffffff', )); add_image_size( 'barbershop-nail-salon-featured-image', 2000, 1200, true ); add_image_size( 'barbershop-nail-salon-thumbnail-avatar', 100, 100, true ); $GLOBALS['content_width'] = 525; register_nav_menus( array( 'primary' => __( 'Primary Menu', 'barbershop-nail-salon' ), ) ); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, 'flex-height' => true, ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', beauty_salon_spa_fonts_url() ) ); if ( ! defined( 'BEAUTY_SALON_SPA_SUPPORT' ) ) { define('BEAUTY_SALON_SPA_SUPPORT',__('https://wordpress.org/support/theme/barbershop-nail-salon','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_REVIEW' ) ) { define('BEAUTY_SALON_SPA_REVIEW',__('https://wordpress.org/support/theme/barbershop-nail-salon/reviews/#new-post','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_LIVE_DEMO' ) ) { define('BEAUTY_SALON_SPA_LIVE_DEMO',__('https://trial.ovationthemes.com/barbershop-nail-salon/','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_BUY_PRO' ) ) { define('BEAUTY_SALON_SPA_BUY_PRO',__('https://www.ovationthemes.com/products/nail-salon-wordpress-theme','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_PRO_DOC' ) ) { define('BEAUTY_SALON_SPA_PRO_DOC',__('https://trial.ovationthemes.com/docs/ot-barbershop-nail-salon-pro-doc/','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_FREE_DOC' ) ) { define('BEAUTY_SALON_SPA_FREE_DOC',__('https://trial.ovationthemes.com/docs/ot-barbershop-nail-salon-free-doc/','barbershop-nail-salon')); } if ( ! defined( 'BEAUTY_SALON_SPA_THEME_NAME' ) ) { define('BEAUTY_SALON_SPA_THEME_NAME',__('Premium Barbershop Theme','barbershop-nail-salon')); } } add_action( 'after_setup_theme', 'barbershop_nail_salon_setup' ); // custom header setup function barbershop_nail_salon_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'barbershop_nail_salon_custom_header_args', array( 'default-image' => get_parent_theme_file_uri( '/assets/images/header-img-2.png' ), 'default-text-color' => 'fff', 'header-text' => false, 'width' => 1600, 'height' => 100, 'flex-width' => true, 'flex-height' => true, 'wp-head-callback' => 'beauty_salon_spa_header_style', ) ) ); } add_action( 'after_setup_theme', 'barbershop_nail_salon_custom_header_setup' ); // widgets function barbershop_nail_salon_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'barbershop-nail-salon' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'barbershop-nail-salon' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your pages and posts', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar 3', 'barbershop-nail-salon' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'barbershop-nail-salon' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'barbershop-nail-salon' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'barbershop-nail-salon' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'barbershop-nail-salon' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'barbershop-nail-salon' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'barbershop_nail_salon_widgets_init' ); //remove section function barbershop_nail_salon_customize_register() { global $wp_customize; $wp_customize->remove_section( 'beauty_salon_spa_pro' ); $wp_customize->remove_setting('beauty_salon_spa_slider_content_alignment'); $wp_customize->remove_control('beauty_salon_spa_slider_content_alignment'); $wp_customize->remove_setting('beauty_salon_spa_footer_text'); $wp_customize->remove_control('beauty_salon_spa_footer_text'); $wp_customize->remove_setting('beauty_salon_spa_primary_color'); $wp_customize->remove_control('beauty_salon_spa_primary_color'); $wp_customize->remove_setting('beauty_salon_spa_text_color'); $wp_customize->remove_control('beauty_salon_spa_text_color'); $wp_customize->remove_setting('beauty_salon_spa_primary_fade'); $wp_customize->remove_control('beauty_salon_spa_primary_fade'); $wp_customize->remove_setting('beauty_salon_spa_footer_bg'); $wp_customize->remove_control('beauty_salon_spa_footer_bg'); $wp_customize->remove_setting('beauty_salon_spa_slider_opacity'); $wp_customize->remove_control('beauty_salon_spa_slider_opacity'); $wp_customize->remove_setting('beauty_salon_spa_slider_overlay'); $wp_customize->remove_control('beauty_salon_spa_slider_overlay'); $wp_customize->remove_setting('beauty_salon_spa_slider_excerpt_color'); $wp_customize->remove_control('beauty_salon_spa_slider_excerpt_color'); } add_action( 'customize_register', 'barbershop_nail_salon_customize_register', 11 ); // customizer function barbershop_nail_salon_customize( $wp_customize ) { wp_enqueue_style('customizercustom_css',get_stylesheet_directory_uri(). '/assets/css/customizer.css'); // pro section $wp_customize->add_section('barbershop_nail_salon_pro', array( 'title' => __('UPGRADE NAIL SALON PREMIUM', 'barbershop-nail-salon'), 'priority' => 1, )); $wp_customize->add_setting('barbershop_nail_salon_pro', array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control(new Barbershop_Nail_Salon_Pro_Control($wp_customize, 'barbershop_nail_salon_pro', array( 'label' => __('NAIL SALON PREMIUM', 'barbershop-nail-salon'), 'section' => 'barbershop_nail_salon_pro', 'settings' => 'barbershop_nail_salon_pro', 'priority' => 1, ))); // slider content alignment $wp_customize->add_setting('barbershop_nail_salon_slider_content_alignment',array( 'default' => 'CENTER-ALIGN', 'sanitize_callback' => 'beauty_salon_spa_sanitize_choices' )); $wp_customize->add_control('barbershop_nail_salon_slider_content_alignment',array( 'type' => 'radio', 'label' => __('Slider Content Alignment', 'barbershop-nail-salon'), 'section' => 'beauty_salon_spa_slider_section', 'type' => 'select', 'choices' => array( 'LEFT-ALIGN' => __('LEFT','barbershop-nail-salon'), 'CENTER-ALIGN' => __('CENTER','barbershop-nail-salon'), 'RIGHT-ALIGN' => __('RIGHT','barbershop-nail-salon'), ), 'priority' => 6, ) ); $wp_customize->add_setting('barbershop_nail_salon_slider_heading_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_slider_heading_color', array( 'section' => 'beauty_salon_spa_slider_section', 'label' => esc_html__('Slider Title Color', 'beauty-salon-spa'), 'priority' => 2, ))); $wp_customize->add_setting('barbershop_nail_salon_slider_excerpt_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_slider_excerpt_color', array( 'section' => 'beauty_salon_spa_slider_section', 'label' => esc_html__('Slider Excerpt Color', 'beauty-salon-spa'), 'priority' => 4, ))); $wp_customize->add_setting('barbershop_nail_salon_slider_overlay', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_slider_overlay', array( 'section' => 'beauty_salon_spa_slider_section', 'label' => esc_html__('Slider Overlay Color', 'barbershop-nail-salon'), 'priority' => 7, ))); $wp_customize->add_setting('barbershop_nail_salon_slider_opacity',array( 'default' => '0.5', 'sanitize_callback' => 'beauty_salon_spa_sanitize_choices' )); $wp_customize->add_control('barbershop_nail_salon_slider_opacity',array( 'type' => 'radio', 'label' => __('Slider Opacity', 'barbershop-nail-salon'), 'section' => 'beauty_salon_spa_slider_section', 'type' => 'select', 'choices' => array( '0' => __('0','barbershop-nail-salon'), '0.1' => __('0.1','barbershop-nail-salon'), '0.2' => __('0.2','barbershop-nail-salon'), '0.3' => __('0.3','barbershop-nail-salon'), '0.4' => __('0.4','barbershop-nail-salon'), '0.5' => __('0.5','barbershop-nail-salon'), '0.6' => __('0.6','barbershop-nail-salon'), '0.7' => __('0.7','barbershop-nail-salon'), '0.8' => __('0.8','barbershop-nail-salon'), '0.9' => __('0.9','barbershop-nail-salon'), '1' => __('1','barbershop-nail-salon') ), ) ); $wp_customize->add_setting('barbershop_nail_salon_footer_text',array( 'default' => 'Barbershop Nail Salon WordPress Theme', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('barbershop_nail_salon_footer_text',array( 'label' => esc_html__('Copyright Text','barbershop-nail-salon'), 'section' => 'beauty_salon_spa_footer_copyright', 'type' => 'textarea' )); //colors $wp_customize->add_setting('barbershop_nail_salon_primary_color', array( 'default' => '#541f5c', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_primary_color', array( 'section' => 'colors', 'label' => esc_html__('Theme Color', 'barbershop-nail-salon'), ))); $wp_customize->add_setting('barbershop_nail_salon_text_color', array( 'default' => '#696969', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_text_color', array( 'section' => 'colors', 'label' => esc_html__('Theme Text Color', 'barbershop-nail-salon'), ))); $wp_customize->add_setting('barbershop_nail_salon_secondary', array( 'default' => '#e782a0', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_secondary', array( 'section' => 'colors', 'label' => esc_html__('theme Secondary Color', 'barbershop-nail-salon'), ))); $wp_customize->add_setting('barbershop_nail_salon_primary_fade', array( 'default' => '#ffeff4', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_primary_fade', array( 'section' => 'colors', 'label' => esc_html__('theme Color Fade', 'barbershop-nail-salon'), ))); $wp_customize->add_setting('barbershop_nail_salon_footer_bg', array( 'default' => '#541f5c', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'barbershop_nail_salon_footer_bg', array( 'section' => 'colors', 'label' => esc_html__('Footer Bg color', 'barbershop-nail-salon'), ))); } add_action( 'customize_register', 'barbershop_nail_salon_customize' ); function barbershop_nail_salon_enqueue_comments_reply() { if( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) { // Load comment-reply.js (into footer) wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); } } add_action( 'wp_enqueue_scripts', 'barbershop_nail_salon_enqueue_comments_reply' ); // Footer Text function barbershop_nail_salon_copyright_link() { $barbershop_nail_salon_footer_text = get_theme_mod('barbershop_nail_salon_footer_text', esc_html__('Barbershop Nail Salon WordPress Theme', 'barbershop-nail-salon')); $barbershop_nail_salon_credit_link = esc_url('https://www.ovationthemes.com/products/free-barbershop-wordpress-theme'); echo '' . esc_html($barbershop_nail_salon_footer_text) . '' . esc_html__(' By Ovation Themes', 'barbershop-nail-salon') . ''; } /* Pro control */ if (class_exists('WP_Customize_Control') && !class_exists('Barbershop_Nail_Salon_Pro_Control')): class Barbershop_Nail_Salon_Pro_Control extends WP_Customize_Control{ public function render_content(){?>