Changeset 30100 for trunk/src/wp-includes/post-template.php
- Timestamp:
- 10/29/2014 10:19:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r30036 r30100 616 616 if ( is_page_template() ) { 617 617 $classes[] = 'page-template'; 618 $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_page_template_slug( $page_id ) ) ); 618 619 $template_slug = get_page_template_slug( $page_id ); 620 $template_parts = explode( '/', $template_slug ); 621 622 foreach ( $template_parts as $part ) { 623 $classes[] = 'page-template-' . sanitize_html_class( str_replace( array( '.', '/' ), '-', basename( $part, '.php' ) ) ); 624 } 625 $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', $template_slug ) ); 619 626 } else { 620 627 $classes[] = 'page-template-default';
Note: See TracChangeset
for help on using the changeset viewer.