[wp-trac] [WordPress Trac] #53541: Arguments passed to load_template() should be extracted

WordPress Trac noreply at wordpress.org
Mon Jun 28 16:24:51 UTC 2021


#53541: Arguments passed to load_template() should be extracted
--------------------------------------+------------------------------
 Reporter:  caseymilne                |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  General                   |     Version:  trunk
 Severity:  minor                     |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |     Focuses:
--------------------------------------+------------------------------

Comment (by joyously):

 If the author of the template expects the argument to be passed, they can
 certainly extract it themselves. Since the argument is optional, it makes
 sense for backward compatibility for core to not touch it, because the
 template file doesn't control where it is invoked.
 It would be more flexible if the template calls functions to get the data
 needed, and those functions are filtered.
 ''(Yes, I was opposed to adding the argument, because it makes it more
 difficult to write a backward compatible template.)
 ''

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


More information about the wp-trac mailing list