__('Main Sidebar', 'educate'),
'id' => 'sidebar-1',
'description' => __('Main sidebar that appears on the right.', 'educate'),
'before_widget' => '
',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 1', 'educate'),
'id' => 'footer-1',
'description' => __('Footer First that appears on the bottom.', 'educate'),
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 2', 'educate'),
'id' => 'footer-2',
'description' => __('Footer Second that appears on the bottom.', 'educate'),
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 3', 'educate'),
'id' => 'footer-3',
'description' => __('Footer Third that appears on the bottom.', 'educate'),
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 4', 'educate'),
'id' => 'footer-4',
'description' => __('Footer Forth that appears on the bottom.', 'educate'),
'before_widget' => '',
'before_title' => '',
));
}
add_action('widgets_init', 'educate_widgets_init');
/*
* educate Set up post entry meta.
*
* Meta information for current post: categories, tags, permalink, author, and date.
*/
function educate_entry_meta() {
$educate_category_list = get_the_category_list(', ', ' ');
$educate_tag_list = get_the_tag_list(' ', ', ');
$educate_author = sprintf(/* translators: 1 is author , 2 is author url. */'%3$s', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'educate'), get_the_author())), get_the_author());
$educate_utility_text = '';
if ($educate_category_list) {
$educate_utility_text .= '- %1$s
';
}
if ($educate_tag_list) {
$educate_utility_text .= '- %2$s
';
}
$educate_utility_text .= '- %3$s
- ' . educate_comment_number_custom() . '
';
printf(
$educate_utility_text, $educate_category_list, $educate_tag_list, $educate_author
);
}
function educate_comment_number_custom() {
$educate_num_comments = get_comments_number(); // get_comments_number returns only a numeric value
$educate_comments = __('No Comments', 'educate');
if (comments_open()) {
if ($educate_num_comments == 0) {
$educate_comments = __('No Comments', 'educate');
} elseif ($educate_num_comments > 1) {
$educate_comments = $educate_num_comments . __(' Comments', 'educate');
} else {
$educate_comments = __('1 Comment', 'educate');
}
}
return $educate_comments;
}
function educate_entry_meta_date() {
$educate_date = sprintf(' %2$s %3$s', esc_attr(get_the_date('c')), esc_html(get_the_date('d')), esc_html(get_the_date('M' . ' ' . 'Y'))
);
printf($educate_date);
}
/*
* Comments placeholder function
*
* */
add_filter('comment_form_default_fields', 'educate_comment_placeholders');
function educate_comment_placeholders($fields) {
$fields['author'] = str_replace(
'