false );
add_theme_support( 'custom-header', $defaults );
$defaults = array( 'default-color' => 'ffffff' );
add_theme_support( 'custom-background', $defaults );
add_theme_support( 'html5', array( 'search-form' ) );
global $content_width;
if ( ! isset( $content_width ) ) $content_width = 1920;
register_nav_menus(
array( 'main-menu' => esc_html__( 'Main Menu', 'bands' ), 'footer-menu' => esc_html__( 'Footer Menu', 'bands' ) )
);
}
add_action( 'after_setup_theme', 'bands_woocommerce_support' );
function bands_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
require_once ( get_template_directory() . '/about.php' );
add_action( 'admin_notices', 'bands_admin_notice' );
function bands_admin_notice() {
$user_id = get_current_user_id();
if ( !get_user_meta( $user_id, 'bands_notice_dismissed_1' ) && current_user_can( 'manage_options' ) )
echo '
' . __( 'Thank you for using Bands. Need more features? Page Builder + Speed Optimization Upgrade to Pro (limited offer: use code HALFOFF for 50% off) ', 'bands' ) . 'Dismiss
';
}
add_action( 'admin_init', 'bands_notice_dismissed' );
function bands_notice_dismissed() {
$user_id = get_current_user_id();
if ( isset( $_GET['notice-dismiss'] ) )
add_user_meta( $user_id, 'bands_notice_dismissed_1', 'true', true );
}
add_action( 'wp_enqueue_scripts', 'bands_load_scripts' );
function bands_load_scripts() {
wp_enqueue_style( 'bands-style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery' );
wp_register_script( 'bands-videos', get_template_directory_uri() . '/js/videos.js' );
wp_enqueue_script( 'bands-videos' );
wp_add_inline_script( 'bands-videos', 'jQuery(document).ready(function($){$("#wrapper").vids();});' );
}
add_action( 'wp_footer', 'bands_footer_scripts' );
function bands_footer_scripts() {
?>
' . esc_html__( 'Skip to the content', 'bands' ) . '';
}
function bands_read_more_link() {
if ( ! is_admin() ) {
return ' ... ';
}
}
add_filter( 'the_content_more_link', 'bands_read_more_link' );
function bands_excerpt_read_more_link( $more ) {
if ( ! is_admin() ) {
global $post;
return ' ... ';
}
}
add_filter( 'excerpt_more', 'bands_excerpt_read_more_link' );
add_action( 'widgets_init', 'bands_widgets_init' );
function bands_widgets_init() {
register_sidebar( array (
'name' => esc_html__( 'Header Widget Area', 'bands' ),
'id' => 'header-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
register_sidebar( array (
'name' => esc_html__( 'Footer Widget Area', 'bands' ),
'id' => 'footer-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
register_sidebar( array (
'name' => esc_html__( 'Sidebar Widget Area', 'bands' ),
'description' => esc_html__( 'Does not display for single posts.', 'bands' ),
'id' => 'primary-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
}
add_action( 'wp_head', 'bands_pingback_header' );
function bands_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( ' ' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'comment_form_before', 'bands_enqueue_comment_reply_script' );
function bands_enqueue_comment_reply_script() {
if ( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); }
}
function bands_custom_pings( $comment ) {
?>
id="li-comment-">
add_setting(
'bands_accent_color',
array(
'default' => '#00b4ff',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'accent_color',
array(
'label' => esc_html__( 'Theme Accent Color', 'bands' ),
'section' => 'colors',
'settings' => 'bands_accent_color'
)
)
);
$wp_customize->add_setting(
'bands_link_color',
array(
'default' => '#00b4ff',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'link_color',
array(
'label' => esc_html__( 'Link Color', 'bands' ),
'section' => 'colors',
'settings' => 'bands_link_color'
)
)
);
$wp_customize->add_setting(
'bands_header_color',
array(
'default' => '#00b4ff',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize,
'header_color',
array(
'label' => esc_html__( 'Content Headers Color', 'bands' ),
'section' => 'colors',
'settings' => 'bands_header_color'
)
)
);
$wp_customize->add_section(
'bands_fonts',
array(
'title' => 'Fonts',
'priority' => 25
)
);
$wp_customize->add_setting(
'bands_header_font',
array(
'default' => 'Roboto',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'header_font',
array(
'label' => esc_html__( 'Content Headers Font', 'bands' ),
'description' => esc_html__( 'If adding a Google font, make sure to capitalize all words, save, and then refresh to preview.', 'bands' ),
'section' => 'bands_fonts',
'settings' => 'bands_header_font'
)
)
);
}
add_action( 'customize_register', 'bands_customizer', 20 );
function bands_customizer_css() {
?>