Make WordPress Core


Ignore:
Timestamp:
12/12/2007 11:45:55 AM (17 years ago)
Author:
ryan
Message:

Query page attachments from page requests so that they can both use the same set of rewrite rules. see #3614

File:
1 edited

Legend:

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

    r6364 r6377  
    842842                $q['name'] = $q['pagename'];
    843843                $where .= " AND (ID = '$reqpage')";
     844                $reqpage_obj = get_page($reqpage);
     845                if ( 'attachment' == $reqpage_obj->post_type ) {
     846                    $this->is_attachment = true;
     847                    $this->is_page = false;
     848                    $q['attachment_id'] = $reqpage;
     849                }
    844850            }
    845851        } elseif ('' != $q['attachment']) {
Note: See TracChangeset for help on using the changeset viewer.