<?php
/*
* Register Source Sans Pro Google font for eminent
*/
function eminent_font_url() {
   $eminent_font_url = '';
   if ('off' !== _x('on', 'Raleway-Regular font: on or off', 'eminent')) {
       $eminent_font_url = add_query_arg('family', urlencode('Source Sans Pro'), "//fonts.googleapis.com/css?family=Source+Sans+Pro");
   }
   return $eminent_font_url;
}
/*
 * eminent Main Sidebar
*/
function eminent_widgets_init() {
	register_sidebar( array(
		'name'          => __( 'Main Sidebar', 'eminent' ),
		'id'            => 'sidebar-1',
		'description'   => __( 'Main sidebar that appears on the right.', 'eminent' ),
		'before_widget' => '<div class="sidebar-widget widget_categories"  >',
		'after_widget'  => '</div>',
		'before_title'  => '<h3 class="widget-title">',
		'after_title'   => '</h3>',
	) );
	 register_sidebar(array(
       'name' => __('Footer Area One', 'eminent'),
       'id' => 'footer-1',
       'description' => __('Footer Area One that appears on the footer.', 'eminent'),
       'before_widget' => '<div class="footer-widget">',
       'after_widget' => '</div>',
       'before_title' => '<h3 class="widget-title">',
       'after_title' => '</h3>',
   ));
   register_sidebar(array(
       'name' => __('Footer Area Two', 'eminent'),
       'id' => 'footer-2',
       'description' => __('Footer Area Two that appears on the footer.', 'eminent'),
       'before_widget' => '<div class="footer-widget">',
       'after_widget' => '</div>',
       'before_title' => '<h3 class="widget-title">',
       'after_title' => '</h3>',
   ));
   register_sidebar(array(
       'name' => __('Footer Area Three', 'eminent'),
       'id' => 'footer-3',
       'description' => __('Footer Area Three that appears on the footer.', 'eminent'),
       'before_widget' => '<div class="footer-widget">',
       'after_widget' => '</div>',
       'before_title' => '<h3 class="widget-title">',
       'after_title' => '</h3>',
   ));
   register_sidebar(array(
       'name' => __('Footer Area Four', 'eminent'),
       'id' => 'footer-4',
       'description' => __('Footer Area Four that appears on the footer.', 'eminent'),
       'before_widget' => '<div class="footer-widget">',
       'after_widget' => '</div>',
       'before_title' => '<h3 class="widget-title">',
       'after_title' => '</h3>',
   ));
}
add_action( 'widgets_init', 'eminent_widgets_init' );
/*
 * eminent Set up post entry meta.
 *
 * Meta information for current post: categories, tags, permalink, author, and date.
 */
function eminent_entry_meta() { ?>
	
	<div class="post-meta">
	<ul>
        <li><i class="fa fa-user"></i><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html(ucfirst(get_the_author())); ?></a></li>
        <?php if(get_the_category('',',') && is_single()):?>
        <li><i class="fa fa-folder-open"></i>
            <?php echo sprintf('%s',wp_kses_post(get_the_category_list(', ', ' '))); ?> 
        </li>
        <?php endif;
         if(get_the_tags('',',') && is_single()):?>
        <li><i class="fa fa-link"></i><?php echo sprintf('%s',wp_kses_post(get_the_tag_list('', ', ' ))); ?></li>
        <?php endif; ?>
        <li><i class="fa fa-comments"></i><a href="<?php echo esc_url(comments_link()); ?>"><?php echo sprintf('%s',esc_html(get_comments_number())); esc_html_e(' Comments','eminent'); ?></a></li>
    </ul> 
</div>
    <?php 
}

/*
 * Comments placeholder function
 * 
**/
add_filter( 'comment_form_default_fields', 'eminent_comment_placeholders' );
function eminent_comment_placeholders( $fields )
{	
	return $fields;
}
add_filter( 'comment_form_defaults', 'eminent_textarea_insert' );
	function eminent_textarea_insert( $fields ) {		
	return $fields;
	} ?>