Make WordPress Core


Ignore:
Timestamp:
10/20/2005 08:48:32 PM (21 years ago)
Author:
ryan
Message:

Image fu from Andy. fixes #1776

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2956 r2958  
    13851385}
    13861386
     1387function is_subpost () {
     1388    global $wp_query;
     1389
     1390    return $wp_query->is_subpost;
     1391}
     1392
    13871393function is_archive () {
    13881394    global $wp_query;
     
    18701876}
    18711877
     1878function get_subpost_template() {
     1879    global $posts;
     1880    $type = explode('/', $posts[0]->post_type);
     1881    if ( $template = get_query_template($type[0]) )
     1882        return $template;
     1883    elseif ( $template = get_query_template($type[1]) )
     1884        return $template;
     1885    elseif ( $template = get_query_template("$type[0]_$type[1]") )
     1886        return $template;
     1887    else
     1888        return get_query_template('subpost');
     1889}
     1890
    18721891function get_comments_popup_template() {
    18731892    if ( file_exists( TEMPLATEPATH . '/comments-popup.php') )
Note: See TracChangeset for help on using the changeset viewer.