Make WordPress Core

Changeset 14365


Ignore:
Timestamp:
05/03/2010 09:57:24 AM (14 years ago)
Author:
westi
Message:

First pass of compatibility code for old themes which relied on using templates from the default theme without expressly identifying it as the parent theme.
Fixes #12425 and #13009.
The fallback to these template files is now depreceated and will be removed in a future version.

Location:
trunk/wp-includes
Files:
6 added
3 edited

Legend:

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

    r14347 r14365  
    890890    elseif ( file_exists( TEMPLATEPATH . $file ) )
    891891        require( TEMPLATEPATH .  $file );
    892     else
    893         require( get_theme_root() . '/'.WP_FALLBACK_THEME.'/comments.php');
     892    else // Backward compat code will be removed in a future release
     893        require( WPINC . '/theme-compat/comments.php');
    894894}
    895895
  • trunk/wp-includes/general-template.php

    r14360 r14365  
    1111 *
    1212 * Includes the header template for a theme or if a name is specified then a
    13  * specialised header will be included. If the theme contains no header.php file
    14  * then the header from the WP_FALLBACK_THEME theme will be included.
     13 * specialised header will be included.
    1514 *
    1615 * For the parameter, if the file is called "header-special.php" then specify
     
    3231    $templates[] = "header.php";
    3332
     33    // Backward compat code will be removed in a future release
    3434    if ('' == locate_template($templates, true))
    35         load_template( get_theme_root() . '/'. WP_FALLBACK_THEME. '/header.php');
     35        load_template( WPINC . '/theme-compat/header.php');
    3636}
    3737
     
    4040 *
    4141 * Includes the footer template for a theme or if a name is specified then a
    42  * specialised footer will be included. If the theme contains no footer.php file
    43  * then the footer from the default theme will be included.
     42 * specialised footer will be included.
    4443 *
    4544 * For the parameter, if the file is called "footer-special.php" then specify
     
    6160    $templates[] = "footer.php";
    6261
     62    // Backward compat code will be removed in a future release
    6363    if ('' == locate_template($templates, true))
    64         load_template( get_theme_root() . '/' . WP_FALLBACK_THEME . '/footer.php');
     64        load_template( WPINC . '/theme-compat/footer.php');
    6565}
    6666
     
    6969 *
    7070 * Includes the sidebar template for a theme or if a name is specified then a
    71  * specialised sidebar will be included. If the theme contains no sidebar.php
    72  * file then the sidebar from the default theme will be included.
     71 * specialised sidebar will be included.
    7372 *
    7473 * For the parameter, if the file is called "sidebar-special.php" then specify
     
    9089    $templates[] = "sidebar.php";
    9190
     91    // Backward compat code will be removed in a future release
    9292    if ('' == locate_template($templates, true))
    93         load_template( get_theme_root() . '/' . WP_FALLBACK_THEME . '/sidebar.php');
     93        load_template( WPINC . '/theme-compat/sidebar.php');
    9494}
    9595
  • trunk/wp-includes/theme.php

    r14360 r14365  
    984984 *
    985985 * Checks for comment popup template in current template, if it exists or in the
    986  * parent template. If it doesn't exist, then it retrieves the comment-popup.php
    987  * file from the WP_FALLBACK_THEME theme. The WP_FALLBACK_THEME theme must then exist for it to
    988  * work.
     986 * parent template.
    989987 *
    990988 * @since 1.5.0
     
    995993function get_comments_popup_template() {
    996994    $template = locate_template(array("comments-popup.php"));
     995
     996    // Backward compat code will be removed in a future release
    997997    if ('' == $template)
    998         $template = get_theme_root() . '/' . WP_FALLBACK_THEME . '/comments-popup.php';
     998        $template = WPINC . '/theme-compat/comments-popup.php';
    999999
    10001000    return apply_filters('comments_popup_template', $template);
Note: See TracChangeset for help on using the changeset viewer.