summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-includes/functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-10-24 14:21:13 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-10-24 14:21:13 +0000
commit797aff459d87aa09fe0c0c9a7aaf288752b5bd15 (patch)
tree9903b14c48e73bf9d77dd0d6a32e81a0deda3bea /wp-inst/wp-includes/functions.php
parent8a9ee3b40641ff572b10c53e9aae1a148e1e8a38 (diff)
downloadwordpress-mu-797aff459d87aa09fe0c0c9a7aaf288752b5bd15.tar.gz
wordpress-mu-797aff459d87aa09fe0c0c9a7aaf288752b5bd15.tar.xz
wordpress-mu-797aff459d87aa09fe0c0c9a7aaf288752b5bd15.zip
Massive WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@407 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/functions.php')
-rw-r--r--wp-inst/wp-includes/functions.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index b9a046b..3a07002 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -1386,6 +1386,12 @@ function is_page ($page = '') {
return false;
}
+function is_subpost () {
+ global $wp_query;
+
+ return $wp_query->is_subpost;
+}
+
function is_archive () {
global $wp_query;
@@ -1871,6 +1877,19 @@ function get_single_template() {
return get_query_template('single');
}
+function get_subpost_template() {
+ global $posts;
+ $type = explode('/', $posts[0]->post_type);
+ if ( $template = get_query_template($type[0]) )
+ return $template;
+ elseif ( $template = get_query_template($type[1]) )
+ return $template;
+ elseif ( $template = get_query_template("$type[0]_$type[1]") )
+ return $template;
+ else
+ return get_query_template('subpost');
+}
+
function get_comments_popup_template() {
if ( file_exists( TEMPLATEPATH . '/comments-popup.php') )
$template = TEMPLATEPATH . '/comments-popup.php';