tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'blog_info_custom_background_args', array( 'default-color' => 'f3f3f3', 'default-image' => '', ) ) ); add_theme_support( 'custom-header', apply_filters( 'blog_info_custom_header_args', array( 'default-image' => '', 'default-text-color' => '000000', 'width' => 1000, 'height' => 250, 'flex-height' => true, 'wp-head-callback' => 'blog_info_header_style', ) ) ); // Make theme available for translation // Translations can be filed in the /languages/ directory load_theme_textdomain( 'blog-info', get_template_directory_uri() . '/languages' ); $locale = get_locale(); $locale_file = get_template_directory_uri() . "/languages/$locale.php"; if ( is_readable( $locale_file ) ) require_once( $locale_file ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary Navigation', 'blog-info' ), ) ); // Don't support text inside the header image. //define( 'NO_HEADER_TEXT', true ); // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array( 'berries' => array( 'url' => '%s/images/headers/sample1.jpg', 'thumbnail_url' => '%s/images/headers/sample1-thumbnail.jpg', 'description' => esc_html__( 'Berries', 'blog-info' ) ), 'cherryblossom' => array( 'url' => '%s/images/headers/sample2.jpg', 'thumbnail_url' => '%s/images/headers/sample2-thumbnail.jpg', 'description' => esc_html__( 'Cherry Blossoms', 'blog-info' ) ), 'concave' => array( 'url' => '%s/images/headers/sample3.jpg', 'thumbnail_url' => '%s/images/headers/sample3-thumbnail.jpg', 'description' => esc_html__( 'Concave', 'blog-info' ) ), 'fern' => array( 'url' => '%s/images/headers/sample4.jpg', 'thumbnail_url' => '%s/images/headers/sample4-thumbnail.jpg', 'description' => esc_html__( 'Fern', 'blog-info' ) ), 'forestfloor' => array( 'url' => '%s/images/headers/sample5.jpg', 'thumbnail_url' => '%s/images/headers/sample5-thumbnail.jpg', 'description' => esc_html__( 'Forest Floor', 'blog-info' ) ), 'inkwell' => array( 'url' => '%s/images/headers/sample6.jpg', 'thumbnail_url' => '%s/images/headers/sample6-thumbnail.jpg', 'description' => esc_html__( 'Inkwell', 'blog-info' ) ), 'path' => array( 'url' => '%s/images/headers/sample7.jpg', 'thumbnail_url' => '%s/images/headers/sample7-thumbnail.jpg', 'description' => esc_html__( 'Path', 'blog-info' ) ), 'sunset' => array( 'url' => '%s/images/headers/sample8.jpg', 'thumbnail_url' => '%s/images/headers/sample8-thumbnail.jpg', 'description' => esc_html__( 'Sunset', 'blog-info' ) ) ) ); } endif; if ( ! function_exists( 'blog_info_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see blog_info_custom_header_setup(). */ function blog_info_header_style() { $header_text_color = get_header_textcolor(); // If we get this far, we have custom styles. Let's do this. ?> comment_type ) : case '' : ?>
  • id="li-comment-">
    says:', 'blog-info' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
  • esc_html__( 'Primary Widget Area', 'blog-info' ), 'id' => 'primary-widget-area', 'description' => esc_html__( 'The primary widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 2, located below the Primary Widget Area in the sidebar. Empty by default. register_sidebar( array( 'name' => esc_html__( 'Secondary Widget Area', 'blog-info' ), 'id' => 'secondary-widget-area', 'description' => esc_html__( 'The secondary widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 3, located in the footer. Empty by default. register_sidebar( array( 'name' => esc_html__( 'First Footer Widget Area', 'blog-info' ), 'id' => 'first-footer-widget-area', 'description' => esc_html__( 'The first footer widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 4, located in the footer. Empty by default. register_sidebar( array( 'name' => esc_html__( 'Second Footer Widget Area', 'blog-info' ), 'id' => 'second-footer-widget-area', 'description' => esc_html__( 'The second footer widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 5, located in the footer. Empty by default. register_sidebar( array( 'name' => esc_html__( 'Third Footer Widget Area', 'blog-info' ), 'id' => 'third-footer-widget-area', 'description' => esc_html__( 'The third footer widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 6, located in the footer. Empty by default. register_sidebar( array( 'name' => esc_html__( 'Fourth Footer Widget Area', 'blog-info' ), 'id' => 'fourth-footer-widget-area', 'description' => esc_html__( 'The fourth footer widget area', 'blog-info' ), 'before_widget' => '
  • ', 'after_widget' => '
  • ', 'before_title' => '

    ', 'after_title' => '

    ', ) ); } /** Register sidebars by running blog_info_widgets_init() on the widgets_init hook. */ add_action( 'widgets_init', 'blog_info_widgets_init' ); /** * Removes the default styles that are packaged with the Recent Comments widget. * * To override this in a child theme, remove the filter and optionally add your own * function tied to the widgets_init action hook. * * @since Blog info 1.0 */ function blog_info_remove_recent_comments_style() { global $wp_widget_factory; remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); } add_action( 'widgets_init', 'blog_info_remove_recent_comments_style' ); if ( ! function_exists( 'blog_info_posted_on' ) ) : /** * Prints HTML with meta information for the current post—date/time and author. * * @since Blog info 1.0 */ function blog_info_posted_on() { printf( __( 'Posted on %2$s by %3$s', 'blog-info' ), 'meta-prep meta-prep-author', sprintf( '%3$s', esc_url( get_permalink() ), esc_attr( get_the_time() ), get_the_date() ), sprintf( '%3$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), sprintf( esc_attr__( 'View all posts by %s', 'blog-info' ), get_the_author() ), get_the_author() ) ); } endif; if ( ! function_exists( 'blog_info_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since Blog info 1.0 */ function blog_info_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_tag_list( '', ', ' ); if ( $tag_list ) { $posted_in = esc_html__( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'blog-info' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) { $posted_in = esc_html__( 'This entry was posted in %1$s. Bookmark the permalink.', 'blog-info' ); } else { $posted_in = esc_html__( 'Bookmark the permalink.', 'blog-info' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_category_list( esc_html__( ', ', 'blog-info' ) ), $tag_list, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) ); } endif; if ( ! isset( $content_width ) ) $content_width = 900; /** * Enqueue scripts and styles. */ function blog_info_scripts() { wp_enqueue_style( 'blog_info-style', get_stylesheet_uri() ); $fonts_url='http://fonts.googleapis.com/css?family=Arimo|Armata'; if(!empty($fonts_url)){ wp_enqueue_style('blog_info-font-name',esc_url_raw($fonts_url),array(),null); } } add_action( 'wp_enqueue_scripts', 'blog_info_scripts' );