'1a1a1a', 'border' => 'ffffff', 'text' => 'ffffff', 'link' => 'ffffff', 'url' => 'ffffff', ); } // Add print stylesheet. add_theme_support( 'print-style' ); } add_action( 'after_setup_theme', 'afterlight_wpcom_setup' ); /** * Enqueue wp.com-specific styles */ function afterlight_wpcom_styles() { wp_enqueue_style( 'afterlight-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20150302' ); } add_action( 'wp_enqueue_scripts', 'afterlight_wpcom_styles' ); /** * De-queue Google fonts if custom fonts are being used instead. */ function afterlight_dequeue_fonts() { if ( class_exists( 'TypekitData' ) && class_exists( 'CustomDesign' ) && CustomDesign::is_upgrade_active() ) { $customfonts = TypekitData::get( 'families' ); if ( $customfonts['headings']['id'] && $customfonts['body-text']['id'] ) { wp_dequeue_style( 'afterlight-fonts' ); } } } add_action( 'wp_enqueue_scripts', 'afterlight_dequeue_fonts' ); /** * Reset a custom background arguments for WP.com to use the default callback. */ function afterlight_wpcom_custom_background_args( $args ) { $args = array( 'default-attachment' => 'fixed', 'default-color' => '1a1a1a', 'default-image' => get_template_directory_uri() . '/images/background.jpg', 'default-position' => 'center', 'default-repeat' => 'no-repeat', 'wp-head-callback' => '_custom_background_cb' ); return $args; } add_filter( 'afterlight_custom_background_args', 'afterlight_wpcom_custom_background_args' ); /** * De-queue dotorg-customizer.js because we don't need it with Colors. */ function afterlight_dequeue_dotorg_customizer() { wp_dequeue_script( 'afterlight-dotorg-customizer' ); } add_action( 'wp_enqueue_scripts', 'afterlight_dequeue_dotorg_customizer' ); /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function afterlight_wpcom_body_classes( $classes ) { //Add a class of widgets-hidden if the sidebar is active for Direct Manipulation if ( is_active_sidebar( 'sidebar-1' ) ) { $classes[] = 'widgets-hidden'; } return $classes; } add_filter( 'body_class', 'afterlight_wpcom_body_classes' );