'',
'height' =>'55',
'width' =>'150',
'custom_css' =>'',
'slider_category' => 'default',
'service_category' => 'default',
'portfolio_category' => 'default',
// Footer Call-Out
'fc_home' =>'1',
'fc_title' => '',
'fc_btn_txt' => '',
'fc_btn_link' =>'',
'fc_radio' =>'bottom',
//Social media links
'header_social_media_in_enabled' =>'1',
'footer_section_social_media_enbled' =>'1',
'twitter_link' =>"",
'fb_link' =>"",
'linkedin_link' =>"",
'youtube_link' =>"",
'instagram' =>"",
'gplus' =>"",
'email_id' => '',
'phone_no' => '',
'footer_customizations' => __(' © 2015 Code Themes', 'bhumi' ),
'developed_by_text' => __('Theme Developed By', 'bhumi' ),
'developed_by_bhumi_text' => __('Code Themes', 'bhumi' ),
'developed_by_link' => 'https://codethemes.co/',
'home_service_heading' => '',
//Portfolio Settings:
'portfolio_home' =>'1',
'port_heading' => '',
//BLOG Settings
'show_blog' => '1',
'blog_title' => '',
);
return apply_filters( 'bhumi_options', $cpm_theme_options );
}
function bhumi_get_options() {
// Options API
return wp_parse_args(
get_option( 'bhumi_options', array() ),
bhumi_default_settings()
);
}
/*After Theme Setup*/
add_action( 'after_setup_theme', 'bhumi_head_setup' );
function bhumi_head_setup()
{
global $content_width;
//content width
if ( ! isset( $content_width ) ) $content_width = 550; //px
//Blog Thumb Image Sizes
add_image_size('bhumi_home_post_thumb',340,210,true);
//Blogs thumbs
add_image_size('bhumi_cpm_page_thumb',730,350,true);
add_image_size('bhumi_blog_2c_thumb',570,350,true);
add_image_size( 'bhumi_portfolio',524,364,array( 'center', 'center' ) );
add_theme_support( 'title-tag' );
// Load text domain for translation-ready
load_theme_textdomain( 'bhumi' . get_template_directory() . '/core/lang');
register_nav_menu( 'primary', __( 'Primary Menu', 'bhumi' ) );
// theme support
add_theme_support( 'post-thumbnails' ); //supports featured image
$args = array('default-color' => '000000',);
add_theme_support( 'custom-background', $args);
add_theme_support( 'automatic-feed-links');
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
) );
add_theme_support( 'custom-logo', array(
'height' => 80,
'width' => 200,
'flex-height' => true,
'flex-width' => true,
) );
}
// Read more tag to formatting in blog page
function bhumi_content_more($more)
{
return '
';
}
add_filter( 'the_content_more_link', 'bhumi_content_more' );
// Replaces the excerpt "more" text by a link
function bhumi_excerpt_more($more) {
return esc_html__('…','bhumi');
}
add_filter('excerpt_more', 'bhumi_excerpt_more');
/*
* bhumi widget area
*/
add_action( 'widgets_init', 'bhumi_widgets_init');
function bhumi_widgets_init() {
/*sidebar*/
register_sidebar( array(
'name' => __( 'Sidebar', 'bhumi' ),
'id' => 'sidebar-primary',
'description' => __( 'The primary widget area', 'bhumi' ),
'before_widget' => '',
'before_title' => ''
) );
register_sidebar( array(
'name' => __( 'Footer Widget Area', 'bhumi' ),
'id' => 'footer-widget-area',
'description' => __( 'Footer widget area', 'bhumi' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
) );
}
/* Breadcrumbs */
function bhumi_breadcrumbs() {
$delimiter = '';
$home = __('Home', 'bhumi' ); // text for the 'Home' link
$before = ''; // tag before the current crumb
$after = ''; // tag after the current crumb
echo '';
global $post;
$homeLink = home_url();
echo '- ' . $home . '
' . $delimiter . ' ';
if (is_category()) {
global $wp_query;
$cat_obj = $wp_query->get_queried_object();
$thisCat = $cat_obj->term_id;
$thisCat = get_category($thisCat);
$parentCat = get_category($thisCat->parent);
if ($thisCat->parent != 0)
echo(get_category_parents($parentCat, TRUE, ' ' . $delimiter . ' '));
echo $before . ' esc_html__("Archive by category","bhumi") "' . single_cat_title('', false) . '"' . $after;
} elseif (is_day()) {
echo '- ' . get_the_time('Y') . '
' . $delimiter . ' ';
echo '- ' . get_the_time('F') . '
' . $delimiter . ' ';
echo $before . get_the_time('d') . $after;
} elseif (is_month()) {
echo '- ' . get_the_time('Y') . '
' . $delimiter . ' ';
echo $before . get_the_time('F') . $after;
} elseif (is_year()) {
echo $before . get_the_time('Y') . $after;
} elseif (is_single() && !is_attachment()) {
if (get_post_type() != 'post') {
$post_type = get_post_type_object(get_post_type());
$bhumi_post_type_archive = get_post_type_archive_link($post_type->name);
if(!empty($bhumi_post_type_archive)):
echo '- ' . $post_type->labels->singular_name . '
' . $delimiter . ' ';
endif;
echo $before . get_the_title() . $after;
} else {
$cat = get_the_category();
$cat = $cat[0];
echo $before . get_the_title() . $after;
}
} elseif (!is_single() && !is_page() && get_post_type() != 'post') {
$post_type = get_post_type_object(get_post_type());
echo $before . $post_type->labels->singular_name . $after;
} elseif (is_attachment()) {
$parent = get_post($post->post_parent);
$cat = get_the_category($parent->ID);
$cat = $cat[0];
echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' ');
echo '- ' . $parent->post_title . '
' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} elseif (is_page() && !$post->post_parent) {
echo $before . get_the_title() . $after;
} elseif (is_page() && $post->post_parent) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = '- ' . get_the_title($page->ID) . '
';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
foreach ($breadcrumbs as $crumb)
echo $crumb . ' ' . $delimiter . ' ';
echo $before . get_the_title() . $after;
} elseif (is_search()) {
echo $before . esc_html__("Search results for","bhumi") . get_search_query() . '"' . $after;
} elseif (is_tag()) {
echo $before . esc_html__('Tag','bhumi') . single_tag_title(' ', false) . $after;
} elseif (is_author()) {
global $author;
$userdata = get_userdata($author);
echo $before . esc_html__("Articles posted by","bhumi") . $userdata->display_name . $after;
} elseif (is_404()) {
echo $before . esc_html__("Error 404","bhumi") . $after;
}
echo '
';
}
/*===================================================================================
* Add Class Gravtar
* =================================================================================*/
add_filter('get_avatar','bhumi_gravatar_class');
function bhumi_gravatar_class($class) {
$class = str_replace("class='avatar", "class='author_detail_img", $class);
return $class;
}
/****--- Navigation for Author, Category , Tag , Archive ---***/
function bhumi_navigation() { ?>