Make WordPress Core

Changeset 12187


Ignore:
Timestamp:
11/13/2009 10:40:40 PM (14 years ago)
Author:
westi
Message:

Ensure that page templates in a subdir of a theme work correctly. Fixes #10959 based on patch from scribu.

File:
1 edited

Legend:

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

    r12063 r12187  
    118118
    119119/**
    120  * {@internal Missing Short Description}}
     120 * Get the Page Templates available in this theme
    121121 *
    122122 * @since unknown
    123123 *
    124  * @return unknown
     124 * @return array Key is template name, Value is path within the theme folder
    125125 */
    126126function get_page_templates() {
     
    139139
    140140            if ( !empty( $name ) ) {
    141                 $page_templates[trim( $name )] = basename( $template );
     141                $page_templates[trim( $name )] = str_replace(get_template_directory(), '', $template);
    142142            }
    143143        }
Note: See TracChangeset for help on using the changeset viewer.