summaryrefslogtreecommitdiffstats
path: root/wp-includes/template-loader.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
commit7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch)
treec6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-includes/template-loader.php
parentf650f48c048bfbbb2ae702b6425d87e39358d748 (diff)
downloadwordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/template-loader.php')
-rw-r--r--wp-includes/template-loader.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/wp-includes/template-loader.php b/wp-includes/template-loader.php
index cc218e7..eb44f68 100644
--- a/wp-includes/template-loader.php
+++ b/wp-includes/template-loader.php
@@ -1,4 +1,8 @@
<?php
+/**
+ * Loads the correct template based on the visitor's url
+ * @package WordPress
+ */
if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
do_action('template_redirect');
if ( is_robots() ) {
@@ -20,16 +24,13 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
include($template);
return;
} else if ( is_attachment() && $template = get_attachment_template() ) {
+ remove_filter('the_content', 'prepend_attachment');
include($template);
return;
} else if ( is_single() && $template = get_single_template() ) {
- if ( is_attachment() )
- add_filter('the_content', 'prepend_attachment');
include($template);
return;
} else if ( is_page() && $template = get_page_template() ) {
- if ( is_attachment() )
- add_filter('the_content', 'prepend_attachment');
include($template);
return;
} else if ( is_category() && $template = get_category_template()) {
@@ -38,6 +39,9 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
} else if ( is_tag() && $template = get_tag_template()) {
include($template);
return;
+ } else if ( is_tax() && $template = get_taxonomy_template()) {
+ include($template);
+ return;
} else if ( is_author() && $template = get_author_template() ) {
include($template);
return;
@@ -54,8 +58,6 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
include($template);
return;
} else if ( file_exists(TEMPLATEPATH . "/index.php") ) {
- if ( is_attachment() )
- add_filter('the_content', 'prepend_attachment');
include(TEMPLATEPATH . "/index.php");
return;
}