mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
Restore page-template-default body class. props peterwilsoncc, fixes #18018 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
08c6f34a11
commit
6a073f6d47
@ -489,6 +489,8 @@ function get_body_class( $class = '' ) {
|
|||||||
if ( is_page_template() ) {
|
if ( is_page_template() ) {
|
||||||
$classes[] = 'page-template';
|
$classes[] = 'page-template';
|
||||||
$classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $page_id, '_wp_page_template', true ) ), '' );
|
$classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $page_id, '_wp_page_template', true ) ), '' );
|
||||||
|
} else {
|
||||||
|
$classes[] = 'page-template-default';
|
||||||
}
|
}
|
||||||
} elseif ( is_search() ) {
|
} elseif ( is_search() ) {
|
||||||
if ( !empty( $wp_query->posts ) )
|
if ( !empty( $wp_query->posts ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user