[wp-trac] [WordPress Trac] #17805: "Child of a child" Theme: Convert include(functions.php) to include_once().
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 15 19:47:19 UTC 2011
#17805: "Child of a child" Theme: Convert include(functions.php) to include_once().
--------------------------+------------------------------
Reporter: 5ubliminal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.2
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Comment (by 5ubliminal):
You can not include the parent as it's already include with include(). The
inclusion is done before the include ends and PHP does not track it.
I know this error and it's how it should be. PHP marks a file as included
at the end of the call. But there are three themes involved:
1. Root
2. Parent
3. Child
Without include_once() Parent can not be activated. You can just use the
Original and last Child. Do some tests. So how include really works and
how it tracks the inclusion at the end. Including a file with include once
in the same include breaks: Double declaration.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17805#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list