WordPress.org

Make WordPress Core

Changeset 17471


Ignore:
Timestamp:
02/21/11 18:57:09 (4 years ago)
Author:
nacin
Message:

Ensure we're matching the complete theme directory when excluding parent templates from the theme editor. props chrisbliss18, fixes #16607 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r17047 r17471  
    181181    foreach ( $themes[$theme]['Template Files'] as $template_file ) { 
    182182        // Don't show parent templates. 
    183         if ( $is_child_theme && strpos( $template_file, $themes[$theme]['Template Dir'] ) === 0 ) 
     183        if ( $is_child_theme && strpos( $template_file, trailingslashit( $template_dir ) ) === 0 ) 
    184184            continue; 
    185185 
     
    203203    foreach ( $themes[$theme]['Stylesheet Files'] as $style_file ) { 
    204204        // Don't show parent styles. 
    205         if ( $is_child_theme && strpos( $style_file, $themes[$theme]['Template Dir'] ) === 0 ) 
     205        if ( $is_child_theme && strpos( $style_file, trailingslashit( $template_dir ) ) === 0 ) 
    206206            continue; 
    207207 
Note: See TracChangeset for help on using the changeset viewer.