diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-12 11:27:54 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-07-12 11:27:54 +0000 |
| commit | 4f3bce79bfb5851cef9e7bc655c91bb3093cc401 (patch) | |
| tree | 10a0991fddeb0e075d7fa46e2b40e5dbc64d1e88 /wp-inst/wp-includes/template-loader.php | |
| download | wordpress-mu-4f3bce79bfb5851cef9e7bc655c91bb3093cc401.tar.gz wordpress-mu-4f3bce79bfb5851cef9e7bc655c91bb3093cc401.tar.xz wordpress-mu-4f3bce79bfb5851cef9e7bc655c91bb3093cc401.zip | |
Initial Import
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/template-loader.php')
| -rw-r--r-- | wp-inst/wp-includes/template-loader.php | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/wp-inst/wp-includes/template-loader.php b/wp-inst/wp-includes/template-loader.php new file mode 100644 index 0000000..07bda7c --- /dev/null +++ b/wp-inst/wp-includes/template-loader.php @@ -0,0 +1,59 @@ +<?php + +if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) { + do_action('template_redirect'); + if ( is_feed() ) { + include(ABSPATH . '/wp-feed.php'); + exit; + } else if ( is_trackback() ) { + include(ABSPATH . '/wp-trackback.php'); + exit; + } else if ( is_404() && get_404_template() ) { + include(get_404_template()); + exit; + } else if ( is_search() && get_search_template() ) { + include(get_search_template()); + exit; + } else if ( is_home() && get_home_template() ) { + include(get_home_template()); + exit; + } else if ( is_single() && get_single_template() ) { + include(get_single_template()); + exit; + } else if ( is_page() && get_page_template() ) { + include(get_page_template()); + exit; + } else if ( is_category() && get_category_template()) { + include(get_category_template()); + exit; + } else if ( is_author() && get_author_template() ) { + include(get_author_template()); + exit; + } else if ( is_date() && get_date_template() ) { + include(get_date_template()); + exit; + } else if ( is_archive() && get_archive_template() ) { + include(get_archive_template()); + exit; + } else if ( is_comments_popup() && get_comments_popup_template() ) { + include(get_comments_popup_template()); + exit; + } else if ( is_paged() && get_paged_template() ) { + include(get_paged_template()); + exit; + } else if ( file_exists(TEMPLATEPATH . "/index.php") ) { + include(TEMPLATEPATH . "/index.php"); + exit; + } +} else { + // Process feeds and trackbacks even if not using themes. + if ( is_feed() ) { + include(ABSPATH . '/wp-feed.php'); + exit; + } else if ( is_trackback() ) { + include(ABSPATH . '/wp-trackback.php'); + exit; + } +} + +?>
\ No newline at end of file |
