'ffffff',
'default-image' => '',
) ) );
// Enable support for Custom Logo.
add_theme_support( 'custom-logo', array(
'height' => 100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
'header-text' => array( 'Bloggerz', 'Best Theme for Blogs' ),
) );
// Enable support for HTML5.
add_theme_support( 'html5', array(
'comment-list',
'comment-form',
'search-form',
'gallery',
'caption',
) );
$header_img_args = array(
'flex-width' => true,
'width' => 1263,
'flex-height' => true,
'height' => 381,
'default-image' => get_template_directory_uri() . '/img/banner_img_home.jpg',
);
add_theme_support( 'custom-header', $header_img_args );
add_editor_style();
}
endif;
add_action( 'after_setup_theme', 'bloggerz_setup' );
if ( ! function_exists( 'bloggerz_home_banner' ) ) :
/**
* Display the Customize Banner content
*/
function bloggerz_home_banner() {
$home_banner = get_theme_mod( 'bloggerz_theme_header_image_1', get_template_directory_uri() . '/img/banner_img_home.jpg' );
$bannerh1 = get_theme_mod( 'bloggerz_theme_header_h1_1', __( 'WE DO STUFF & THINGS', 'bloggerz' ) );
$banner_desc = get_theme_mod( 'bloggerz_theme_header_p_1', __( 'Lorem Ipsum has been the industry\'s standard dummy text ever, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 'bloggerz' ) );
echo '
' . $bannerh1 . ' ' . $banner_desc . '
';
}
endif;
if ( ! function_exists( 'bloggerz_home_Image' ) ) :
/**
* Display the Customize Banner content
*/
function bloggerz_home_Image() {
$home_banner = null != get_header_image() ? get_header_image() : get_template_directory_uri() . '/img/banner_img_home.jpg';
$bannerh1 = null != get_bloginfo('name') ? get_bloginfo('name') : __( 'WE DO STUFF & THINGS', 'bloggerz' );
$banner_desc = null != get_bloginfo('description') ? get_bloginfo('description') : __( 'Lorem Ipsum has been the industry\'s standard dummy text ever, when an unknown printer took a galley of type and scrambled it to make a type specimen book.', 'bloggerz' );
echo '' . $bannerh1 . ' ' . $banner_desc . '
';
}
endif;
if ( ! function_exists( 'bloggerz_single_banner' ) ) :
/**
* Display the Customize Single Page Banner content
*/
function bloggerz_single_banner() {
$single_banner = get_theme_mod( 'bloggerz_theme_header_image_2', get_template_directory_uri() . '/img/banner_img_single_blog.jpg' );
$s_bannerh1 = get_theme_mod( 'bloggerz_theme_header_h1_2', __( 'Blogger', 'bloggerz' ) );
$s_banner_desc = get_theme_mod( 'bloggerz_theme_header_p_2', __( 'keep your memories alive', 'bloggerz' ) );
// if ( 1 === get_theme_mod( 'bloggerz_theme_post_default_header', 1 ) ) :
echo '' . $s_bannerh1 . ' ' . $s_banner_desc . '
';
// endif;
}
endif;
if ( ! function_exists( 'bloggerz_site_logo' ) ) :
/**
* Displays the site logo in the header area
*/
function bloggerz_site_logo() {
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
the_custom_logo();
} else {
?>
'. wp_list_pages( 'title_li=&echo=0' ) .'';
}
endif;
if ( ! function_exists( 'bloggerz_layout' ) ) :
/**
* Add full width content css
*/
function bloggerz_layout() {
'fullwidth' === get_theme_mod( 'bloggerz_theme_layout_style' ) ?
$bloggerz_layout = 'full-width-content' : $bloggerz_layout = '';
echo $bloggerz_layout;
}
endif;
if ( ! function_exists( 'bloggerz_sidebar' ) ) :
/**
* Add SideBar into Theme
*/
function bloggerz_sidebar() {
if ( 'sidebar' === get_theme_mod( 'bloggerz_theme_layout_style' , 'sidebar' ) ) :
echo get_sidebar();
endif;
}
endif;
if ( ! function_exists( 'bloggerz_post_meta_author' ) ) :
/**
* Displays the post author
*/
function bloggerz_post_meta_author() {
$author_string = sprintf( ' %3$s ',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'bloggerz' ), get_the_author() ) ),
esc_html( get_the_author() )
);
echo wp_kses( $author_string, array( 'a' => array( 'href' => array(), 'class' => array(), 'title' => array(), 'rel' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ) ) );
}
endif;
if ( ! function_exists( 'bloggerz_post_meta_date' ) ) :
/**
* Displays the post date
*/
function bloggerz_post_meta_date() {
$time_string = sprintf( '%4$s ',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
echo wp_kses( $time_string, array( 'span' => array( 'class' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ), 'time' => array( 'class' => array( 'entry-date', 'published', 'updated' ), 'datetime' => array() ), 'a' => array( 'href' => array() ) ) );
}
endif;
if ( ! function_exists( 'bloggerz_post_meta_category' ) ) :
/**
* Displays the category of posts
*/
function bloggerz_post_category() {
echo '' . get_the_category_list( ', ' ) . ' ';
}
endif;
if ( ! function_exists( 'bloggerz_post_meta_tag' ) ) :
/**
* Displays the category of posts
*/
function bloggerz_post_meta_tag() {
echo '' . get_the_tag_list( '', ', ' ) . ' ';
}
endif;
if ( ! function_exists( 'bloggerz_author_fullname' ) ) :
/**
* Display Author Full Name
*/
function bloggerz_author_fullname() {
$author_fname = strtoupper( get_the_author_meta( 'first_name' ) );
$author_lname = strtoupper( get_the_author_meta( 'last_name' ) );
if ( $author_fname and $author_lname ) {
$author_fullname = $author_fname . ' ' . $author_lname;
} else {
$author_fullname = strtoupper( get_the_author_meta( 'display_name' ) );
}
echo '' . $author_fullname . ' ';
}
endif;
if ( ! function_exists( 'bloggerz_author_bio' ) ) :
/**
* Display Author Avatar and Description
*/
function bloggerz_author_bio() {
$bloggerz_auth_avat = get_avatar( get_the_author_meta( 'user_email' ), 64 );
$bloggerz_auth_desc = get_the_author_meta( 'description' );
$bloggerz_auth_bio = '' . $bloggerz_auth_avat . '
';
if ( ! empty( $bloggerz_auth_desc ) ) :
$bloggerz_auth_bio .= ' ';
endif;
echo wp_kses( $bloggerz_auth_bio, array( 'div' => array( 'class' => array() ), 'p' => array( 'class' => array() ), 'h6' => array(), 'img' => array( 'src' => array(), 'srcset' => array(), 'class' => array(), 'alt' => array(), 'height' => array(), 'width' => array() ) ) );
}
endif;
if ( ! function_exists( 'bloggerz_short_about_author' ) ) :
/**
* Widget about Author on sidebar.
*
* @since 1.0
*/
function bloggerz_short_about_author() {
$author_fname = strtoupper( get_the_author_meta( 'first_name' ) );
$author_lname = strtoupper( get_the_author_meta( 'last_name' ) );
if ( $author_fname and $author_lname ) {
$author_fullname = $author_fname . ' ' . $author_lname;
} else {
$author_fullname = strtoupper( get_the_author_meta( 'display_name' ) );
}
$author_image = get_avatar( get_the_author_meta( 'user_email' ), 64 );
// echo the data
$author_facebook = get_the_author_meta( 'bloggerz_facebook_profile', get_current_user_id() );
$author_linkedin = get_the_author_meta( 'bloggerz_linkedin_profile', get_current_user_id() );
$author_twitter = get_the_author_meta( 'bloggerz_twitter_profile', get_current_user_id() );
$author_gplus = get_the_author_meta( 'bloggerz_google_profile', get_current_user_id() );
$author_shabout = get_the_author_meta( 'description' ) ? get_the_author_meta( 'description' ) : __( 'Add Short Descriptiop From Users > Your Profile > Biographical Info', 'bloggerz' );
if ( get_theme_mod( 'bloggerz_theme_admin_widget', true ) ||
checked( get_theme_mod( 'bloggerz_theme_admin_widget' ), true, false ) ) :
$author_about_wid = '';
echo wp_kses( $author_about_wid, array( 'div' => array( 'class' => array() ), 'h5' => array(), 'h3' => array(), 'ul' => array( 'class' => array() ), 'li' => array(), 'a' => array( 'href' => array(), 'class' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ), 'p' => array(), 'img' => array( 'src' => array(), 'srcset' => array(), 'class' => array(), 'alt' => array(), 'height' => array(), 'width' => array() ) ) );
endif;
}
endif;
if ( ! function_exists( 'bloggerz_read_more_link' ) ) :
/**
* Bloggerz Read More Link.
*
* @since 1.0
*/
function bloggerz_read_more_link() {
$bloggerz_postlink = '' . __( 'Read More', 'bloggerz' ) . ' ';
echo wp_kses( $bloggerz_postlink, array( 'a' => array( 'href' => array(), 'class' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ) ) );
}
endif;
if ( ! function_exists( 'bloggerz_post_thumbnail' ) ) :
/**
* [bloggerz_post_thumbnail description]
*
* @since 1.0
*/
function bloggerz_post_thumbnail() {
if ( has_post_thumbnail() ) :
the_post_thumbnail( 'bloggerz-thumbnail-medium' );
endif;
}
endif;
if ( ! function_exists( 'bloggerz_post_comment_count' ) ) :
/**
* Bloggerz Post Comments Count.
*
* @since 1.0
*/
function bloggerz_post_comment_count() {
echo comments_number( __( 'Be the First to comment.', 'bloggerz' ), __( 'One comment', 'bloggerz' ), __( '% comments', 'bloggerz' ) );
}
endif;
if ( ! function_exists( 'bloggerz_pagination' ) ) :
/**
* Bloggerz pagination function [Display the pagination]
*
* @since 1.0
**/
function bloggerz_pagination() {
global $wp_query;
$big = 999999999; // Need an unlikely integer.
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $wp_query->max_num_pages,
'next_text' => '»',
'prev_text' => '«',
'add_args' => false,
) );
// Display the pagination.
if ( $paginate_links ) : ?>
' . __( 'Developers By : ', 'bloggerz' ) . 'WPBrigade
';
$bloggerz_developed_by .= ' ' . __( 'Copyright © 2016 · All Rights Reserved : ', 'bloggerz' ) . '' . get_bloginfo( 'name' ) . '
';
echo wp_kses( $bloggerz_developed_by, array( 'div' => array( 'class' => array() ), 'p' => array( 'class' => array() ), 'a' => array( 'href' => array() ) ) );
}
add_action( 'bloggerz_footer_text', 'bloggerz_footer_text' );
if ( ! function_exists( 'bloggerz_widgets_init' ) ) :
/**
* Register widget areas and custom widgets.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function bloggerz_widgets_init() {
register_sidebar( array(
'name' => __( 'Bloggerz Sidebar', 'bloggerz' ),
'id' => 'bloggerz-sidebar',
'description' => __( 'Appears on posts and pages except the full width template.', 'bloggerz' ),
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => ' ',
));
}
endif;
add_action( 'widgets_init', 'bloggerz_widgets_init' );
// do_action( 'show_user_profile', $profileuser );
// do_action( 'edit_user_profile', $profileuser );
add_action( 'show_user_profile', 'add_extra_social_links' );
add_action( 'edit_user_profile', 'add_extra_social_links' );
function add_extra_social_links( $user )
{
?>
Bloggerz Social Links