Make WordPress Core

Ticket #13239: 13239.c2c.diff

File 13239.c2c.diff, 852 bytes (added by coffee2code, 14 years ago)
  • wp-includes/theme.php

     
    10451045        if ( !is_array($template_names) )
    10461046                return '';
    10471047
     1048        $template_names = apply_filters( 'locate_template', $template_names, $load, $require_once );
     1049
    10481050        $located = '';
    10491051        foreach ( $template_names as $template_name ) {
     1052                $template_name = apply_filters( "locate_template-$template_name", $template_name, $load, $require_once );
    10501053                if ( !$template_name )
    10511054                        continue;
    10521055                if ( file_exists(STYLESHEETPATH . '/' . $template_name)) {
     
    10581061                }
    10591062        }
    10601063
     1064        $located = apply_filters( 'locate_template_located', $located, $template_names, $load, $require_once );
     1065
    10611066        if ( $load && '' != $located )
    10621067                load_template( $located, $require_once );
    10631068