diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-22 18:31:50 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-22 18:31:50 +0000 |
commit | d48e85e0ac5e675ca33fac173f30c75403d1033f (patch) | |
tree | 1164430fa3b83a4d9283961b09c1576f2885e6b2 /wp-includes/template-loader.php | |
parent | 086dcde66603301531efc6d8087bd06d0546f148 (diff) | |
download | wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.tar.gz wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.tar.xz wordpress-mu-d48e85e0ac5e675ca33fac173f30c75403d1033f.zip |
Moved everything in wp-inst down a directory.
Uses's Ryan Boren's htaccess rules and mods
If you're upgrading, try this on a test server first!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@591 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/template-loader.php')
-rw-r--r-- | wp-includes/template-loader.php | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php new file mode 100644 index 0000000..8b44d89 --- /dev/null +++ b/wp-includes/template-loader.php @@ -0,0 +1,73 @@ +<?php +if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) { + do_action('template_redirect'); + if ( is_robots() ) { + do_action('do_robots'); + exit; + } else if ( is_feed() ) { + do_feed(); + exit; + } else if ( is_trackback() ) { + include(ABSPATH . '/wp-trackback.php'); + exit; + } else if ( is_404() && $template = get_404_template() ) { + include($template); + exit; + } else if ( is_search() && $template = get_search_template() ) { + include($template); + exit; + } else if ( is_home() && $template = get_home_template() ) { + include($template); + exit; + } else if ( is_attachment() && $template = get_attachment_template() ) { + include($template); + exit; + } else if ( is_single() && $template = get_single_template() ) { + if ( is_attachment() ) + add_filter('the_content', 'prepend_attachment'); + include($template); + exit; + } else if ( is_page() && $template = get_page_template() ) { + if ( is_attachment() ) + add_filter('the_content', 'prepend_attachment'); + include($template); + exit; + } else if ( is_category() && $template = get_category_template()) { + include($template); + exit; + } else if ( is_author() && $template = get_author_template() ) { + include($template); + exit; + } else if ( is_date() && $template = get_date_template() ) { + include($template); + exit; + } else if ( is_archive() && $template = get_archive_template() ) { + include($template); + exit; + } else if ( is_comments_popup() && $template = get_comments_popup_template() ) { + include($template); + exit; + } else if ( is_paged() && $template = get_paged_template() ) { + include($template); + exit; + } else if ( file_exists(TEMPLATEPATH . "/index.php") ) { + if ( is_attachment() ) + add_filter('the_content', 'prepend_attachment'); + include(TEMPLATEPATH . "/index.php"); + exit; + } +} else { + // Process feeds and trackbacks even if not using themes. + if ( is_robots() ) { + do_action('do_robots'); + exit; + } else if ( is_feed() ) { + do_feed(); + exit; + } else if ( is_trackback() ) { + include(ABSPATH . '/wp-trackback.php'); + exit; + } +} + +?> |