[wp-trac] [WordPress Trac] #16607: Theme Editor fails to list child theme files if the child theme dir starts with the parent theme dir name
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 21 16:18:34 UTC 2011
#16607: Theme Editor fails to list child theme files if the child theme dir starts
with the parent theme dir name
--------------------------+-----------------------------
Reporter: chrisbliss18 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.1
Severity: major | Keywords: has-patch
--------------------------+-----------------------------
r16714 introduced a new bug. The following line of code (used for both
template and style files) fails when compared against child themes that
start with the same name as their parent (such as Theme and ThemeChild):
`if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template
Dir'] ) === 0 )`
This results in no files being listed for the child theme.
The fix-child-theme-editor.diff patch addresses this issue by using
trailingslashit on the template directory string, thus allowing a proper
check to be done:
`if ( $is_child_theme && strpos( $style_file, trailingslashit(
$themes[$theme]['Template Dir'] ) ) === 0 )`
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16607>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list