Changeset 45718 for trunk/src/wp-content/themes/twentyfifteen/functions.php
- Timestamp:
- 08/02/2019 02:32:35 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfifteen/functions.php
r45675 r45718 537 537 add_filter( 'widget_tag_cloud_args', 'twentyfifteen_widget_tag_cloud_args' ); 538 538 539 /** 540 * Prevents `author-bio.php` partial template from interfering with rendering 541 * an author archive of a user with the `bio` username. 542 * 543 * @since Twenty Fifteen 2.6 544 * 545 * @param string $template Template file. 546 * @return string Replacement template file. 547 */ 548 function twentyfifteen_author_bio_template( $template ) { 549 if ( is_author() ) { 550 $author = get_queried_object(); 551 if ( $author instanceof WP_User && 'bio' === $author->user_nicename ) { 552 return locate_template( array( 'archive.php', 'index.php' ) ); 553 } 554 } 555 556 return $template; 557 } 558 add_filter( 'template_include', 'twentyfifteen_author_bio_template' ); 559 539 560 540 561 /**
Note: See TracChangeset
for help on using the changeset viewer.