__( 'Primary Navigation', 'spectrum' ), ) ); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status' ) ); add_theme_support( 'custom-header', apply_filters( 'spectrum_custom_header_args', array( 'default-image' => '', 'default-text-color' => '', 'width' => 938, 'height' => 150, 'flex-height' => true, 'header-text' => false, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ) ) ); add_theme_support( 'custom-background' ); } endif; // spectrum_setup add_action( 'after_setup_theme', 'spectrum_setup' ); // Allow custom colors to clear the background image function spectrum_custom_background_color() { if ( get_background_image() == '' && get_background_color() != '' ) { ?> add_data( 'spectrum-ie', 'conditional', 'IE' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_enqueue_script( 'spectrum-min', get_template_directory_uri() . '/js/spectrum-min.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'spectrum_script_init' ); /** * Register widget areas. */ function spectrum_widgets_init() { register_sidebar( array( 'name' => __( 'Primary Widget Area', 'spectrum' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'spectrum' ), 'before_widget' => '', 'before_title' => '' )); } add_action( 'widgets_init', 'spectrum_widgets_init' ); // fallback for primary navigation function spectrum_page_menu() { ?> 'green', ) ); } /** * Returns the current Spectrum color scheme as selected in the theme options. */ function spectrum_current_ribbon_color() { $options = spectrum_get_theme_options(); return $options['ribbon_color'] ?? null; } /** * Register our color scheme and add them to the queue. */ function spectrum_color_registrar() { $ribbon_color = spectrum_current_ribbon_color(); if ( 'green' == $ribbon_color ) return; wp_enqueue_style( $ribbon_color, get_template_directory_uri() . '/colors/' . $ribbon_color . '.css', null, null ); } add_action( 'wp_enqueue_scripts', 'spectrum_color_registrar' ); /** * Date formats for Spectrum's title banner. */ function spectrum_date() { $date_format = get_option( 'date_format' ); if ( 'd/m/Y' == $date_format ) : ?> ]*?href=[\'"](.+?)[\'"]/is', $the_content, $matches ) ) return false; return esc_url_raw( $matches[1] ); } } // if ( ! function_exists( 'spectrum_url_grabber' ) ) function spectrum_comments( $comment, $args, $depth ) { $GLOBALS[ 'comment' ] = $comment; ?>
  • id="comment-">
    id="div-comment-">
    %s said:', 'spectrum' ), get_comment_author_link() ); ?>
    comment_approved == '0' ) : ?>

    tag based on what is being viewed. * * @since Spectrum 1.0.2 */ function spectrum_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'spectrum' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'spectrum_wp_title', 10, 2 ); /** * Get the Spectrum theme options */ require get_template_directory() . '/theme-options.php'; /** * Load Jetpack compatibility file. */ if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) ) require get_template_directory() . '/inc/jetpack.php';