Explorar o código

implement the jetpack author bio

Ben Dwyer %!s(int64=4) %!d(string=hai) anos
pai
achega
e67ff5c9df
Modificáronse 2 ficheiros con 16 adicións e 3 borrados
  1. 15 0
      seedlet/functions.php
  2. 1 3
      seedlet/template-parts/content/content-single.php

+ 15 - 0
seedlet/functions.php

@@ -422,6 +422,21 @@ function seedlet_skip_link_focus_fix() {
 }
 add_action( 'wp_print_footer_scripts', 'seedlet_skip_link_focus_fix' );
 
+if ( ! function_exists( 'seedlet_author_bio' ) ) {
+	/**
+	 * Implements the Jetpack Author bio
+	 */
+	function seedlet_author_bio() {
+		if ( ! function_exists( 'jetpack_author_bio' ) ) {
+			if ( ! is_singular( 'attachment' ) ) {
+				get_template_part( 'template-parts/post/author-bio' );
+			}
+		} else {
+			jetpack_author_bio();
+		}
+	}
+}
+
 /**
  * SVG Icons class.
  */

+ 1 - 3
seedlet/template-parts/content/content-single.php

@@ -53,8 +53,6 @@
 		<?php seedlet_entry_meta_footer(); ?>
 	</footer><!-- .entry-footer -->
 
-	<?php if ( ! is_singular( 'attachment' ) ) : ?>
-		<?php get_template_part( 'template-parts/post/author-bio' ); ?>
-	<?php endif; ?>
+	<?php seedlet_author_bio(); ?>
 
 </article><!-- #post-${ID} -->