'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() ) );
}
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' => '',
'before_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' => '',
'before_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' => '',
'before_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' => '',
'before_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' => '',
'before_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' => '',
'before_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' => '',
'before_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');
}
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');
require get_theme_file_path( 'inc/custom-control.php' );
// 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',
'transport' => 'refresh',
'sanitize_callback' => 'beauty_salon_spa_sanitize_choices'
)
);
$wp_customize->add_control( new Barbershop_Nail_Salon_Text_Radio_Button_Custom_Control( $wp_customize, 'barbershop_nail_salon_slider_content_alignment',
array(
'type' => 'select',
'label' => esc_html__( 'Slider Content Alignment', 'barbershop-nail-salon' ),
'section' => 'beauty_salon_spa_slider_section',
'choices' => array(
'LEFT-ALIGN' => __('LEFT','barbershop-nail-salon'),
'CENTER-ALIGN' => __('CENTER','barbershop-nail-salon'),
'RIGHT-ALIGN' => __('RIGHT','barbershop-nail-salon'),
),
'active_callback' => 'beauty_salon_spa_slider_dropdown',
)
) );
$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'
));
}
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) . '';
}
if ( ! defined( 'BARBERSHOP_NAIL_SALON_PRO_LINK' ) ) {
define('BARBERSHOP_NAIL_SALON_PRO_LINK',__('https://www.ovationthemes.com/products/nail-salon-wordpress-theme','barbershop-nail-salon'));
}
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'));
}
/* 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(){?>