__( 'Primary Menu', 'bold_headline' ), ) ); add_theme_support( 'custom-background', array( 'default-color' => 'fff', ) ); } endif; // bold_headline_setup add_action( 'after_setup_theme', 'bold_headline_setup' ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Register widgetized area and update sidebar with default widgets * The first widget is not needed, but the default widgets are here.. so :( * If I update the options then switching theme will result in a loss of customization. * This solution is not very elegant. */ function bold_headline_widgets_init() { register_sidebar( array( 'name' => __( 'Inactive Sidebar', 'bold_headline' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'First Footer Area', 'bold_headline' ), 'id' => 'footer-left', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Middle Footer Area', 'bold_headline' ), 'id' => 'footer-center', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Last Footer Area', 'bold_headline' ), 'id' => 'footer-right', 'before_widget' => '', 'after_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'bold_headline_widgets_init' ); /** * Remove excerpt ellipses and let's add a read more link instead */ function bold_headline_custom_excerpt_more($more) { return '...
' . __( 'Read more ', 'bold_headline' ) . ''; } add_filter('excerpt_more', 'bold_headline_custom_excerpt_more'); /** * Enqueue scripts and styles */ function bold_headline_scripts() { wp_enqueue_style( 'Bold Headline-style', get_stylesheet_uri() ); wp_enqueue_style('googleFonts', 'http://fonts.googleapis.com/css?family=Lato|Playfair+Display'); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'fittext', get_template_directory_uri() . '/js/jquery.fittext.js' ); wp_enqueue_script( 'function', get_template_directory_uri() . '/js/function.js' ); wp_enqueue_script( 'Bold Headline-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'Bold Headline-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'Bold Headline-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } } add_action( 'wp_enqueue_scripts', 'bold_headline_scripts' ); /* Theme Options which use the customizer are set below ----------------------------------------------------------*/ /* * Add Theme Options through the customizer * */ function bold_headline_theme_customizer( $wp_customize ) { $wp_customize->add_setting( 'bold_headline_link_color', array( 'default' => '#57ad68', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bold_headline_link_color', array( 'label' => 'Link Color', 'section' => 'colors', 'settings' => 'bold_headline_link_color', ) ) ); $wp_customize->add_setting( 'bold_headline_link_rollover_color', array( 'default' => '#e2a872', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bold_headline_link_rollover_color', array( 'label' => 'Link Rollover Color', 'section' => 'colors', 'settings' => 'bold_headline_link_rollover_color', ) ) ); } add_action('customize_register', 'bold_headline_theme_customizer'); /* * Add custom CSS to * */ function bold_headline_add_customizer_css() { ?>