Make WordPress Core

Changeset 17470


Ignore:
Timestamp:
02/21/2011 06:55:48 PM (14 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 the 3.1 branch.

File:
1 edited

Legend:

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

    r17047 r17470  
    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.