Ticket #32096: 32096.3.diff
| File 32096.3.diff, 2.0 KB (added by , 11 years ago) |
|---|
-
src/wp-content/themes/twentyfifteen/functions.php
353 353 * @since Twenty Fifteen 1.0 354 354 */ 355 355 require get_template_directory() . '/inc/customizer.php'; 356 357 /** 358 * Prevents author-bio.php from being accessed directly if user_nicename is `bio` 359 * 360 * @since Twenty Fifteen 1.2 361 * 362 * @param string @template Template file 363 * @return string Replacement template file 364 */ 365 function author_bio_template( $template ) { 366 if ( get_the_author_meta( 'user_nicename' ) === 'bio' ) { 367 $new_template = locate_template( array( 'archive.php' ) ); 368 if ( '' != $new_template ) { 369 return $new_template ; 370 } 371 } 372 return $template; 373 } 374 add_filter( 'template_include', 'author_bio_template' ); 375 No newline at end of file -
src/wp-content/themes/twentythirteen/functions.php
550 550 wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true ); 551 551 } 552 552 add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' ); 553 554 /** 555 * Prevents author-bio.php from being accessed directly if user_nicename is `bio` 556 * 557 * @since Twenty Thirteen 1.6 558 * 559 * @param string @template Template file 560 * @return string Replacement template file 561 */ 562 function author_bio_template( $template ) { 563 if ( get_the_author_meta( 'user_nicename' ) === 'bio' ) { 564 $new_template = locate_template( array( 'author.php' ) ); 565 if ( '' != $new_template ) { 566 return $new_template ; 567 } 568 } 569 return $template; 570 } 571 add_filter( 'template_include', 'author_bio_template' ); 572 No newline at end of file