',
) );
}
/** 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() );
$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' );
/**
* Function for blog info page in admin side
*/
function blog_add_theme_menu_item()
{
add_theme_page("Blog Info Panel", "Blog Info Panel", "manage_options", "blog-info-panel", "blog_theme_settings_page", null, 99);
}
add_action("admin_menu", "blog_add_theme_menu_item");
/**
* Function for blog info page
*/
function blog_theme_settings_page()
{
?>