false );
add_theme_support( 'custom-header', $defaults );
add_theme_support( 'custom-background' );
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', 'services' ), 'footer-menu' => esc_html__( 'Footer Menu', 'services' ) )
);
}
add_action( 'after_setup_theme', 'services_woocommerce_support' );
function services_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
require_once ( get_template_directory() . '/about.php' );
add_action( 'admin_notices', 'services_admin_notice' );
function services_admin_notice() {
$user_id = get_current_user_id();
if ( !get_user_meta( $user_id, 'services_notice_dismissed_2' ) && current_user_can( 'manage_options' ) )
echo '
' . __( 'Thank you for using Services. Need more features/support? Page Builder + Speed Optimization + Private Support Upgrade to Pro ', 'services' ) . 'Dismiss
';
}
add_action( 'admin_init', 'services_notice_dismissed' );
function services_notice_dismissed() {
$user_id = get_current_user_id();
if ( isset( $_GET['notice-dismiss'] ) )
add_user_meta( $user_id, 'services_notice_dismissed_2', 'true', true );
}
add_action( 'wp_enqueue_scripts', 'services_load_scripts' );
function services_load_scripts() {
wp_enqueue_style( 'services-style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery' );
wp_register_script( 'services-videos', get_template_directory_uri() . '/js/videos.js' );
wp_enqueue_script( 'services-videos' );
wp_add_inline_script( 'services-videos', 'jQuery(document).ready(function($){$("#wrapper").vids();});' );
}
add_action( 'wp_footer', 'services_footer_scripts' );
function services_footer_scripts() {
?>
' . esc_html__( 'Skip to the content', 'services' ) . '';
}
function services_read_more_link() {
if ( !is_admin() ) {
return ' ... ';
}
}
add_filter( 'the_content_more_link', 'services_read_more_link' );
function services_excerpt_read_more_link( $more ) {
if ( !is_admin() ) {
global $post;
return ' ... ';
}
}
add_filter( 'excerpt_more', 'services_excerpt_read_more_link' );
add_action( 'widgets_init', 'services_widgets_init' );
function services_widgets_init()
{
register_sidebar( array (
'name' => esc_html__( 'Header Widget Area', 'services' ),
'id' => 'header-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
register_sidebar( array (
'name' => esc_html__( 'Footer Widget Area', 'services' ),
'id' => 'footer-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
register_sidebar( array (
'name' => esc_html__( 'Sidebar Widget Area', 'services' ),
'description' => esc_html__( 'Does not display for single posts.', 'services' ),
'id' => 'primary-widget-area',
'before_widget' => '',
'after_widget' => " ",
'before_title' => '',
) );
}
add_action( 'wp_head', 'services_pingback_header' );
function services_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( ' ' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'comment_form_before', 'services_enqueue_comment_reply_script' );
function services_enqueue_comment_reply_script() {
if ( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); }
}
function services_custom_pings( $comment ) {
?>
id="li-comment-">
add_setting(
'services_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', 'services' ),
'section' => 'colors',
'settings' => 'services_accent_color'
)
)
);
$wp_customize->add_setting(
'services_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', 'services' ),
'section' => 'colors',
'settings' => 'services_link_color'
)
)
);
$wp_customize->add_setting(
'services_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__( 'Header Text Color', 'services' ),
'section' => 'colors',
'settings' => 'services_header_color'
)
)
);
$wp_customize->add_section(
'services_fonts',
array(
'title' => 'Fonts',
'priority' => 25
)
);
$wp_customize->add_setting(
'services_header_font',
array(
'default' => 'Helvetica',
'sanitize_callback' => 'sanitize_text_field',
'transport' => 'postMessage'
)
);
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'header_font',
array(
'label' => esc_html__( 'Header Text Font', 'services' ),
'description' => esc_html__( 'If adding a Google font, make sure to capitalize all words, save, and then refresh to preview.', 'services' ),
'section' => 'services_fonts',
'settings' => 'services_header_font'
)
)
);
}
add_action( 'customize_register', 'services_customizer', 20 );
function services_customizer_css() {
?>