Changeset 45719
- Timestamp:
- 08/02/2019 02:32:58 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentythirteen/functions.php
r45675 r45719 785 785 add_filter( 'widget_tag_cloud_args', 'twentythirteen_widget_tag_cloud_args' ); 786 786 787 /** 788 * Prevents `author-bio.php` partial template from interfering with rendering 789 * an author archive of a user with the `bio` username. 790 * 791 * @since Twenty Thirteen 3.0 792 * 793 * @param string $template Template file. 794 * @return string Replacement template file. 795 */ 796 function twentythirteen_author_bio_template( $template ) { 797 if ( is_author() ) { 798 $author = get_queried_object(); 799 if ( $author instanceof WP_User && 'bio' === $author->user_nicename ) { 800 return locate_template( array( 'archive.php', 'index.php' ) ); 801 } 802 } 803 804 return $template; 805 } 806 add_filter( 'template_include', 'twentythirteen_author_bio_template' ); 807 787 808 if ( ! function_exists( 'wp_body_open' ) ) : 788 809 /**
Note: See TracChangeset
for help on using the changeset viewer.