[wp-trac] [WordPress Trac] #18018: body_class page-template-default removed

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 7 00:52:45 UTC 2011


#18018: body_class page-template-default removed
---------------------------+-----------------------------
 Reporter:  peterwilsoncc  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Template       |    Version:  3.2
 Severity:  normal         |   Keywords:  has-patch
---------------------------+-----------------------------
 Changes to is_page_template() have inadvertently removed the body classes
 page-template and page-template-default from pages using the default
 template.

 The class first appeared as a bug a few versions ago ( #17458 ) but has is
 now expected by theme authors.

 Previous output[[BR]]

 {{{
 <body class="page page-id-2 page-template page-template-default [...]
 }}}
 [[BR]]
 3.2 output[[BR]]

 {{{
 <body class="page page-id-2 [...]
 }}}


 I have attached two .diff files:[[BR]]
 a. outputs .page-template-default only for default page templates[[BR]]
 a. outputs .page-template and .page-template-default for default page
 templates (previous behaviour)

 I'm inclined to go with version (a) as (b) has .page-template doubling up
 for .page but it may affect existing themes.

 Cheers,
 Pete

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18018>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list