mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Always add page-template-default
class to the editor body when the template is not specified. This matches the behavior on the front-end.
Props timph (for the detailed bug report), azaozz. Merges [39678] to the 4.7 branch. Fixes #39368. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39679 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a428ffc53d
commit
b8ee9d17c1
@ -681,8 +681,10 @@ final class _WP_Editors {
|
||||
$body_class .= ' post-format-standard';
|
||||
}
|
||||
|
||||
if ( $page_template = get_page_template_slug( $post ) ) {
|
||||
$page_template = str_replace( '.', '-', basename( $page_template, '.php' ) );
|
||||
$page_template = get_page_template_slug( $post );
|
||||
|
||||
if ( $page_template !== false ) {
|
||||
$page_template = empty( $page_template ) ? 'default' : str_replace( '.', '-', basename( $page_template, '.php' ) );
|
||||
$body_class .= ' page-template-' . sanitize_html_class( $page_template );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user