'001e2b', 'border' => 'ffffff', 'text' => 'ffffff', 'link' => 'ffffff', 'url' => 'ffffff', ); } // Add print stylesheet. add_theme_support( 'print-style' ); } add_action( 'after_setup_theme', 'cyanotype_wpcom_setup' ); /** * Enqueue wp.com-specific styles */ function cyanotype_wpcom_styles() { wp_enqueue_style( 'cyanotype-wpcom', get_template_directory_uri() . '/inc/style-wpcom.css', '20150302' ); } add_action( 'wp_enqueue_scripts', 'cyanotype_wpcom_styles' ); /** * De-queue Google fonts if custom fonts are being used instead. */ function cyanotype_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( 'cyanotype-fonts' ); } } } add_action( 'wp_enqueue_scripts', 'cyanotype_dequeue_fonts' ); /** * Remove the widont filter because of the limited space for post/page title in the design. */ function cyanotype_wido() { remove_filter( 'the_title', 'widont' ); } add_action( 'init', 'cyanotype_wido' ); /** * Reset a custom background arguments for WP.com to use the default callback. */ function cyanotype_wpcom_custom_background_args( $args ) { $args = array( 'default-color' => '001f2c', 'wp-head-callback' => '_custom_background_cb' ); return $args; } add_filter( 'cyanotype_custom_background_args', 'cyanotype_wpcom_custom_background_args' ); /** * Remove text shadow when you add a background image. */ function cyanotype_remove_text_shadow() { $css = ''; if ( ! get_background_image() ) { return; } else { $css .= '.entry-content a, .entry-footer .author-bio a, .page-content a, .taxonomy-description a, .logged-in-as a, .comment-content a, .pingback .comment-body > a, .textwidget a, .aboutme_widget a, .widget_gravatar a, .widget-grofile a, .image-navigation a:hover, .comment-navigation a:hover, .post-navigation a:hover .post-title, .entry-date a:hover, .entry-footer a:hover, .site-title a:hover, .entry-title a:hover, .comment-author a:hover, .comment-metadata a:hover, .pingback .edit-link a:hover, .site-info a:hover, #infinite-footer .blog-credits a:hover { text-shadow: none; }'; } wp_add_inline_style( 'cyanotype-style', $css ); } add_action( 'wp_enqueue_scripts', 'cyanotype_remove_text_shadow' ); /** * De-queue dotorg-customizer.js because we don't need it with Colors. */ function cyanotype_dequeue_dotorg_customizer() { wp_dequeue_script( 'cyanotype-dotorg-customizer' ); } add_action( 'wp_enqueue_scripts', 'cyanotype_dequeue_dotorg_customizer' ); /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function cyanotype_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', 'cyanotype_wpcom_body_classes' );