[wp-trac] [WordPress Trac] #36091: Resolve location of files in template and stylesheet directories

WordPress Trac noreply at wordpress.org
Sat Mar 5 19:23:15 UTC 2016


#36091: Resolve location of files in template and stylesheet directories
-------------------------------------------+------------------------------
 Reporter:  screamingdev                   |       Owner:
     Type:  feature request                |      Status:  closed
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Themes                         |     Version:
 Severity:  normal                         |  Resolution:  invalid
 Keywords:  needs-patch reporter-feedback  |     Focuses:  template
-------------------------------------------+------------------------------
Changes (by screamingdev):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Gosh, it acutally is almost like locate_template. You are right
 @SergeyBiryukov .

 Here is a case @johnbillion :

 - Parent-Theme has plenty of files.
 - Child-Theme inherits only the ones it likes.

 Problem:

 - Usually the parent themes would use `get_template_directory()`
 - This causes that the ones from child themes won't be loaded
 automatically.
 - Inheritance is broken

 Solution:

 - Parent themes use another function to resolve files.

 Now that I see that there is `locate_template` it is quite obvious that
 themes could already have better inheritance for child-themes. I guess
 someone just have to use it :/

 I have to blog about this and spread the words. Sorry for this issue.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36091#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list