[wp-trac] [WordPress Trac] #39368: .page-template-default body class in editor doesn't appear in initial post/page load.
WordPress Trac
noreply at wordpress.org
Wed Dec 21 21:29:03 UTC 2016
#39368: .page-template-default body class in editor doesn't appear in initial
post/page load.
--------------------------+-----------------------------
Reporter: timph | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.7
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The class .page-template-default isn't in tinymce editor body classes on
initial load if default template is used. It was causing some odd
behaviors when I was testing some themes out. This was because the themes
were adding specific styles for .page-template-default. This class seems
to only get added when you select a template from Page Attributes >
Default, and there were some major visual differences from initial page
load to what would be seen when selecting that template from page
attributes. I think for consistency it should be present if that's the
template in use.
1. Add a page template to the theme. Mine was page-home.php
2. Add a new page. This should use the default template.
3. Inspect the body classes of the editor, there's no class added to
designate this is the page-template-default at this point.
4. Under Page Attributes, select Home. Inspect the body classes, you'll
see page-template-page-home is applied.
5. Select the Default template, you'll see page-template-default is
applied and page-template-page-home is removed.
6. Select the home page template again.
7. Publish the page. Inspect the body class you'll see it's still there.
Refresh the page. It's still there.
8. Select the default template, then update the page and refresh. You'll
see that the class is no longer present.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39368>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list