'c15b8b', ) ) ); add_theme_support( 'custom-header', apply_filters( 'stay_custom_header_args', array( 'default-text-color' => 'fff', 'width' => 950, 'height' => 200, 'flex-width' => true, 'wp-head-callback' => 'strange_little_town_header_style', 'admin-head-callback' => 'strange_little_town_admin_header_style', ) ) ); register_nav_menu( 'primary-menu', __( 'Primary', 'strange-little-town' ) ); load_theme_textdomain( 'strange-little-town', get_template_directory() . '/languages' ); add_action( 'widgets_init', 'strange_little_town_register_sidebar' ); } } add_action( 'after_setup_theme', 'strange_little_town_setup' ); if ( ! function_exists( 'strange_little_town_header_style' ) ) { /** * Public styles for the header image and text. * * @since StrangeLittleTown 1.0 */ function strange_little_town_header_style() { if ( HEADER_TEXTCOLOR == get_header_textcolor() && '' == get_header_image() ) return; ?> Header admin screen. * * Referenced via add_theme_support( 'custom-header' ) in strange_little_town_setup(). * * @since StrangeLittleTown 1.0 */ function strange_little_town_admin_header_style() { $text_color = get_header_textcolor(); $header = get_header_image(); $background_image = get_background_image(); $background_color = get_background_color(); $image = ''; if ( ! empty( $header ) ) $image = $header; else if ( ! empty( $background_image ) ) $image = $background_image; else if ( BACKGROUND_COLOR == $background_color || empty( $background_color ) ) $image = get_template_directory_uri() . '/img/stars.png'; ?> comment_type ) : case 'pingback' : case 'trackback' : ?>
>
  • id="li-comment-">
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply ↓', 'strange-little-town' ), ) ) ); ?>
    __( 'Main Sidebar', 'strange-little-town' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /** * Body Classes. * * Hooks into the 'body_class' filter. * * @param array $classes List of classes to be applied to the body element. * @return array Modified classes for the body element. * * @access private * @since StrangeLittleTown 1.0 */ function strange_little_town_body_class( $classes ) { if ( ! is_active_sidebar( 'sidebar-1' ) ) $classes[] = 'single-column'; else if ( is_attachment() && 0 === strpos( get_post_field( 'post_mime_type', get_the_ID() ), 'image' ) ) $classes[] = 'single-column'; return $classes; } add_filter( 'body_class', 'strange_little_town_body_class' ); /** * Hide the Town. * * In it's natural state, this theme will displays a background * image in the main footer element. In the event that a user has * uploaded their own custom background image or has defined a * custom background color, the default image will be hidden. * * Hooks into the 'wp_head' action. * * @access private * @since StrangeLittleTown 1.0 */ function strange_little_town_hide_town() { $hide_town = false; $image = get_background_image(); $color = get_background_color(); if ( empty( $color ) ) $color = BACKGROUND_COLOR; if ( BACKGROUND_COLOR == $color && empty( $image ) ) return; ?> tag based on what is being viewed. * * @since Strange Little Town 1.0 */ function strange_little_town_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', 'strange-little-town' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'strange_little_town_wp_title', 10, 2 ); /** * Load Jetpack compatibility file. */ if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) ) require get_template_directory() . '/inc/jetpack.php';