Changeset 6989 for sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php
- Timestamp:
- 03/30/2018 10:53:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wp15.wordpress.net/public_html/content/themes/twentyseventeen-wp15/functions.php
r6985 r6989 5 5 defined( 'WPINC' ) || die(); 6 6 7 add_filter( 'template_include', __NAMESPACE__ . '\get_front_page_template' ); 7 8 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_scripts' ); 8 9 add_filter( 'get_custom_logo', __NAMESPACE__ . '\set_custom_logo' ); 9 10 add_filter( 'body_class', __NAMESPACE__ . '\add_body_classes' ); 11 12 13 /** 14 * Bypass TwentySeventeen's front-page template. 15 * 16 * When a static front page is configured, its corresponding template should be used to render the page, not 17 * TwentySeventeen's generic front-page template. 18 * 19 * @param string $template 20 * 21 * @return string 22 */ 23 function get_front_page_template( $template ) { 24 if ( false !== strpos( $template, 'twentyseventeen/front-page.php' ) ) { 25 $template = get_page_template(); 26 } 27 28 return $template; 29 } 10 30 11 31 /**
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)