Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/27/2012 09:51:55 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Use trailingslashit() in bbp_locate_template() to prevent double slashes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-template-functions.php

    r3903 r3921  
    7272
    7373        // Check child theme first
    74         if ( file_exists( STYLESHEETPATH . '/' . $template_name ) ) {
    75             $located = STYLESHEETPATH . '/' . $template_name;
     74        if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_name ) ) {
     75            $located = trailingslashit( STYLESHEETPATH ) . $template_name;
    7676            break;
    7777
    7878        // Check parent theme next
    79         } elseif ( file_exists( TEMPLATEPATH . '/' . $template_name ) ) {
    80             $located = TEMPLATEPATH . '/' . $template_name;
     79        } elseif ( file_exists( trailingslashit( TEMPLATEPATH ) . $template_name ) ) {
     80            $located = trailingslashit( TEMPLATEPATH ) . $template_name;
    8181            break;
    8282
    8383        // Check theme compatibility last
    84         } elseif ( file_exists( bbp_get_theme_compat_dir() . '/' . $template_name ) ) {
    85             $located = bbp_get_theme_compat_dir() . '/' . $template_name;
     84        } elseif ( file_exists( trailingslashit( bbp_get_theme_compat_dir() ) . $template_name ) ) {
     85            $located = trailingslashit( bbp_get_theme_compat_dir() ) . $template_name;
    8686            break;
    8787        }
Note: See TracChangeset for help on using the changeset viewer.