Make WordPress Core


Ignore:
Timestamp:
11/15/2005 10:55:24 PM (20 years ago)
Author:
ryan
Message:

Renaming. object and subpost are now attachment. post_type is post_mime_type.

File:
1 edited

Legend:

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

    r3071 r3092  
    13981398}
    13991399
    1400 function is_subpost () {
    1401     global $wp_query;
    1402 
    1403     return $wp_query->is_subpost;
     1400function is_attachment () {
     1401    global $wp_query;
     1402
     1403    return $wp_query->is_attachment;
    14041404}
    14051405
     
    18951895}
    18961896
    1897 function get_subpost_template() {
     1897function get_attachment_template() {
    18981898    global $posts;
    1899     $type = explode('/', $posts[0]->post_type);
     1899    $type = explode('/', $posts[0]->post_mime_type);
    19001900    if ( $template = get_query_template($type[0]) )
    19011901        return $template;
     
    19051905        return $template;
    19061906    else
    1907         return get_query_template('subpost');
     1907        return get_query_template('attachment');
    19081908}
    19091909
Note: See TracChangeset for help on using the changeset viewer.