';
}
}
add_action( 'wp_head', 'book_author_blog_pingback_header' );
if ( ! function_exists( 'book_author_blog_comment_list' ) ) :
/**
* Template for comments and pingbacks.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since Shape 1.0
*/
function book_author_blog_comment_list( $comment, $args, $depth ) {
extract( $args, EXTR_SKIP );
if ( 'div' == $args['style'] ) {
$tag = 'div';
$add_below = 'comment';
} else {
$tag = 'li';
$add_below = 'div-comment';
}
?>
< id="comment-">
1 ) {
$numberingtext = 'posts';
} else {
$numberingtext = 'post';
}
$userposts = esc_html__( 'The author has %1$s %2$s', 'book-author-blog' );
printf( $userposts, $userpost_count, $numberingtext );
?>
get( 'AuthorURI' );
}
/**
* Masonry Layout Control
*/
function book_author_blog_masonry_layout_control(){
$get_masonry_layout = get_theme_mod('active_masonry_layout', true);
if (true === $get_masonry_layout) {
return ' masonry_active';
}
return '';
}
/**
* Limit Excerpt length
*/
function book_author_blog_post_excerpt_limit( $length ) {
$length = get_theme_mod('post_loop_excerpt_limit', 42);
return $length;
}
add_filter( 'excerpt_length', 'book_author_blog_post_excerpt_limit', 999 );
/**
* Social Links
*/
function book_author_blog_social_links(){
$social_media_fields = array(
'facebook' => 'Facebook',
'twitter' => 'Twitter',
'instagram' => 'Instagram',
'tiktok' => 'Tiktok',
'linkedin' => 'Linkedin',
'pinterest' => 'Pinterest',
'line' => 'Line',
'github' => 'Github',
'discord' => 'Discord',
'youtube' => 'Youtube',
'wordpress' => 'WordPress',
'slack' => 'Slack',
'apple' => 'Apple',
'stack-overflow' => 'Stack-overflow',
'kickstarter' => 'kickstarter',
'dribbble' => 'Dribbble',
'codepen' => 'Codepen',
'whatsapp' => 'Whatsapp',
'medium' => 'Medium',
'goodreads' => 'Goodreads'
);
foreach ( $social_media_fields as $field => $label ) {
$value = get_theme_mod( $field, '#' );
if ( ! empty( $value ) && '#' != $value) {
echo '';
}
}
wp_reset_query();
}
function book_author_blog_get_books_layout(){
$getBooksLayout = get_theme_mod('books_layout', 'product');
return $getBooksLayout;
}
function book_author_blog_template_chooser($template){
global $wp_query;
$post_type = get_query_var('post_type');
if( $wp_query->is_search && $post_type == 'books-gallery' )
{
return locate_template('search-books.php'); // redirect to archive-search.php
}
return $template;
}
add_filter('template_include', 'book_author_blog_template_chooser');
add_action('admin_menu', 'book_author_blog_personalize');
function book_author_blog_personalize(){
remove_submenu_page( 'sb-instagram-feed', 'sb-instagram-feed-about' );
}
add_action('sbi_before_feed', 'book_author_blog_sbi_before_feed');
function book_author_blog_sbi_before_feed(){
?>