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',
) ) );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Navigation', 'blog-info' ),
'social' => __( 'Social Links Menu', '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-">
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' => '',
) );
}
/** 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 2.2
*/
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 2.2
*/
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 2.2
*/
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() );
// Theme block stylesheet.
wp_enqueue_style( 'blog-info-block-style', get_template_directory_uri() . '/blocks.css');
// Theme block stylesheet.
//wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181230' );
$fonts_url='https://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' );