post_parent ) && $image->post_parent != $id ) $url .= '#main'; return $url; } add_filter( 'attachment_link', 'bizpress_enhanced_image_navigation', 10, 2 ); /** * Filters wp_title to print a neat tag based on what is being viewed. */ function bizpress_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'bizpress' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'bizpress_wp_title', 10, 2 ); /* Display icon for blog post using * Post Format - get_post_format() function * * @since BizPress Lite 1.0 */ function bizpress_post_format_icon() { if(!is_single()) { ?> <?php $format = get_post_format(); ?> <span class="post_format"> <?php if ($format == 'video') { ?> <i class="fa fa-film"></i> <?php } elseif ($format == 'gallery') { ?> <i class="fa fa-picture-o"></i> <?php } elseif ($format == 'image') { ?> <i class="fa fa-user"></i> <?php } elseif ($format == 'quote') { ?> <i class="fa fa-quote-left"></i> <?php } elseif ($format == 'link') { ?> <i class="fa fa-link"></i> <?php } else { ?> <i class="fa fa-file-text"></i> <?php } ?> </span> <?php } } function html_tag_schema() { $schema = 'http://schema.org/'; // Is single post if(is_single()) { $type = "Article"; } if(is_home()) { $type = "BlogPage"; } // Is author page elseif( is_author() ) { $type = 'ProfilePage'; } // Is search results page elseif( is_search() ) { $type = 'SearchResultsPage'; } else { $type = 'WebPage'; } echo 'itemscope="itemscope" itemtype="' . $schema . $type . '"'; } /** * Prints HTML with meta information for current post: author and date * * @since Superb 1.0 * * @return void */ if ( ! function_exists( 'bizpress_posted_on' ) ) { function bizpress_posted_on() { $post_icon = ''; switch ( get_post_format() ) { case 'aside': $post_icon = 'fa-file-o'; break; case 'audio': $post_icon = 'fa-volume-up'; break; case 'chat': $post_icon = 'fa-comment'; break; case 'gallery': $post_icon = 'fa-camera'; break; case 'image': $post_icon = 'fa-picture-o'; break; case 'link': $post_icon = 'fa-link'; break; case 'quote': $post_icon = 'fa-quote-left'; break; case 'status': $post_icon = 'fa-user'; break; case 'video': $post_icon = 'fa-video-camera'; break; default: $post_icon = 'fa-calendar'; break; } // Translators: 1: Icon 2: Permalink 3: Post date and time 4: Publish date in ISO format 5: Post date $date = sprintf( '<i class="fa fa-calendar-o"></i> <a href="%2$s" title="Posted %3$s" rel="bookmark"><time class="entry-date" datetime="%4$s" itemprop="datePublished">%5$s</time></a>', $post_icon, esc_url( get_permalink() ), sprintf( esc_html__( '%1$s @ %2$s', 'bizpress' ), esc_html( get_the_date() ), esc_attr( get_the_time() ) ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); // Translators: 1: Date link 2: Author link 3: Categories 4: No. of Comments $author = sprintf( '<i class="fa fa-user"></i> <address class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></address>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( esc_html__( 'View all posts by %s', 'bizpress' ), get_the_author() ) ), get_the_author() ); // Return the Categories as a list $categories_list = '<i class="fa fa-folder-o"></i>'.get_the_category_list( esc_html__( ', ', 'bizpress' ) ); // Translators: 1: Permalink 2: Title 3: No. of Comments $comments = sprintf( '<span class="comments-link"><i class="fa fa-comment"></i> <a href="%1$s" title="%2$s">%3$s</a></span>', esc_url( get_comments_link() ), esc_attr( esc_html__( 'Comment on ' . the_title_attribute( 'echo=0' ) ) ), ( get_comments_number() > 0 ? sprintf( _n( '%1$s Comment', '%1$s Comments', get_comments_number() ), get_comments_number() ) : esc_html__( 'No Comments', 'bizpress' ) ) ); // Translators: 1: Date 2: Author 3: Categories 4: Comments printf( wp_kses( __( '<div class="header-meta">%1$s%2$s<span class="post-categories">%3$s</span>%4$s</div>', 'bizpress' ), array( 'div' => array ( 'class' => array() ), 'span' => array( 'class' => array() ) ) ), $author, $date, $categories_list, ( is_search() ? '' : $comments ) ); } } function bizpress_admin_notice(){ global $pagenow; if ( $pagenow == 'themes.php' ) { ?> <div class="updated"> <p>This theme comes with <a href="<?php echo admin_url('customize.php'); ?>">Live Theme Customizer</a> to configure settings and setup home page content. <br/> You can upgrade to <a href="http://ideaboxthemes.com/themes/wordpress-local-business-theme-bizpress/">Pro version</a> for more features like multiple slider images, testimonials, color schemes, support and upgrades.</p> </div> <?php } } add_action('admin_notices', 'bizpress_admin_notice');