[wp-trac] [WordPress Trac] #40969: RFE: get_template_part() to return something or warn when nothing found
    WordPress Trac 
    noreply at wordpress.org
       
    Fri Jun  9 19:41:48 UTC 2017
    
    
  
#40969: RFE: get_template_part() to return something or warn when nothing found
-------------------------+------------------------------
 Reporter:  sphakka      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  2nd-opinion  |     Focuses:
-------------------------+------------------------------
Changes (by johnbillion):
 * keywords:   => 2nd-opinion
Comment:
 Thanks for the ticket, @sphakka.
 You're right that `get_template_part()` doesn't return a value, but if it
 returned the value of `locate_template()` I'm not sure that this would
 tell you anything that you don't already know. If there's a typo in your
 file name then an empty string will be returned. If there's no typo but
 the file doesn't exist, it'll still return an empty string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40969#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list