[wp-trac] [WordPress Trac] #41152: New Function to Require a file
WordPress Trac
noreply at wordpress.org
Sat Jun 24 17:59:21 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):
> wp_require_parent_theme_file will be more user friendly and dedicated if
it adds.
> Seems developer uses get_template_part() function to add part of
template instead part of functions.php file. Expecting a dedicated
function to require a file (part of functions.php).
You missed the point about the variables available when `require` is used
inside a function. It is better without the function, because the
environment is as expected instead of limited to that function.
The new functions added in 4.7 check the child first and then the parent,
so no new functions are needed. They make it easier for the child to
replace individual files of the parent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41152#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list