Make WordPress Core


Ignore:
Timestamp:
05/23/2014 08:11:08 PM (12 years ago)
Author:
wonderboymusic
Message:

Replaces all uses of TEMPLATEPATH and STYLESHEETPATH in core with get_template_directory() and get_stylesheet_directory().

Add @deprecated annotations to TEMPLATEPATH and STYLESHEETPATH definitions.

Props obenland, aaroncampbell.
Fixes #18298.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r28558 r28563  
    10501050 *
    10511051 * The $file path is passed through a filter hook called, 'comments_template'
    1052  * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path
     1052 * which includes the template path and $file combined. Tries the $filtered path
    10531053 * first and if it fails it will require the default comment template from the
    10541054 * default theme. If either does not exist, then the WordPress process will be
     
    11351135                define('COMMENTS_TEMPLATE', true);
    11361136
    1137         $theme_template = STYLESHEETPATH . $file;
     1137        $theme_template = get_stylesheet_directory() . $file;
    11381138        /**
    11391139         * Filter the path to the theme template file used for the comments template.
     
    11461146        if ( file_exists( $include ) )
    11471147                require( $include );
    1148         elseif ( file_exists( TEMPLATEPATH . $file ) )
    1149                 require( TEMPLATEPATH . $file );
     1148        elseif ( file_exists( get_template_directory() . $file ) )
     1149                require( get_template_directory() . $file );
    11501150        else // Backward compat code will be removed in a future release
    11511151                require( ABSPATH . WPINC . '/theme-compat/comments.php');
Note: See TracChangeset for help on using the changeset viewer.