Changeset 35679 for trunk/src/wp-includes/query.php
- Timestamp:
- 11/18/2015 07:58:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r35285 r35679 1834 1834 1835 1835 if ( '' != $qv['pagename'] ) { 1836 $this->queried_object = get_page_by_path($qv['pagename']); 1837 if ( !empty($this->queried_object) ) 1836 $this->queried_object = get_page_by_path( $qv['pagename'] ); 1837 1838 if ( $this->queried_object && 'attachment' == $this->queried_object->post_type ) { 1839 if ( preg_match( "/^[^%]*%(?:postname)%/", get_option( 'permalink_structure' ) ) ) { 1840 // See if we also have a post with the same slug 1841 $post = get_page_by_path( $qv['pagename'], OBJECT, 'post' ); 1842 if ( $post ) { 1843 $this->queried_object = $post; 1844 $this->is_page = false; 1845 $this->is_single = true; 1846 } 1847 } 1848 } 1849 1850 if ( ! empty( $this->queried_object ) ) { 1838 1851 $this->queried_object_id = (int) $this->queried_object->ID; 1839 else 1840 unset($this->queried_object); 1852 } else { 1853 unset( $this->queried_object ); 1854 } 1841 1855 1842 1856 if ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) {
Note: See TracChangeset
for help on using the changeset viewer.