[wp-trac] [WordPress Trac] #41152: New Function to Require a file
WordPress Trac
noreply at wordpress.org
Sat Jun 24 17:13:01 UTC 2017
#41152: New Function to Require a file
-----------------------------+------------------------------
Reporter: rinkuyadav999 | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: close | Focuses:
-----------------------------+------------------------------
Comment (by joyously):
No new function is needed. Several useful functions were added in 4.7.
One is here:
https://developer.wordpress.org/reference/functions/get_theme_file_uri/
The reason we don't need another function to do a `require` is that files
included/required inside of a function have that function as its
namespace. This is good for template files, but not much else.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41152#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list