1669 | | if ( '' != $qv['pagename'] ) { |
1670 | | $this->queried_object = get_page_by_path($qv['pagename']); |
1671 | | if ( !empty($this->queried_object) ) |
1672 | | $this->queried_object_id = (int) $this->queried_object->ID; |
1673 | | else |
1674 | | unset($this->queried_object); |
1675 | | |
1676 | | if ( 'page' == get_option('show_on_front') && isset($this->queried_object_id) && $this->queried_object_id == get_option('page_for_posts') ) { |
| 1669 | // we have a slug and need to retrieve the id |
| 1670 | if ( '' != $qv['pagename'] ) { |
| 1671 | $this->get_queried_object(); |
| 1672 | if ( 'page' == get_option( 'show_on_front' ) && isset( $this->queried_object_id ) && $this->queried_object_id == get_option( 'page_for_posts' ) ) { |
3697 | | } elseif ( $this->is_singular && !is_null($this->post) ) { |
3698 | | $this->queried_object = $this->post; |
3699 | | $this->queried_object_id = (int) $this->post->ID; |
| 3693 | } elseif ( $this->is_singular ) { |
| 3694 | if ( isset( $this->post ) ) { |
| 3695 | $this->queried_object = $this->post; |
| 3696 | $this->queried_object_id = (int) $this->post->ID; |
| 3697 | } elseif ( $this->get( 'p' ) ) { |
| 3698 | $this->queried_object = get_post( $this->get( 'p' ) ); |
| 3699 | $this->queried_object_id = (int) $this->get( 'p' ); |
| 3700 | } elseif ( $this->get( 'page_id' ) ) { |
| 3701 | $this->queried_object = get_post( $this->get( 'page_id' ) ); |
| 3702 | $this->queried_object_id = (int) $this->get( 'page_id' ); |
| 3703 | } elseif ( $this->get( 'pagename' ) || $this->get( 'name' ) ) { |
| 3704 | $name = $this->get( 'pagename', false ) ? $this->get( 'pagename' ) : $this->get( 'name' ); |
| 3705 | $this->queried_object = $this->post = get_page_by_path( |
| 3706 | $name, |
| 3707 | OBJECT, |
| 3708 | $this->get( 'post_type' ) ? $this->get( 'post_type' ) : ( !empty( $this->is_single ) ? 'post' : 'page' ) |
| 3709 | ); |
| 3710 | $this->queried_object_id = (int) $this->post->ID; |
| 3711 | } |
3701 | | $this->queried_object_id = (int) $this->get('author'); |
3702 | | $this->queried_object = get_userdata( $this->queried_object_id ); |
| 3713 | if ( $this->get( 'author' ) ) { |
| 3714 | $this->queried_object_id = (int) $this->get( 'author' ); |
| 3715 | $this->queried_object = get_userdata( $this->queried_object_id ); |
| 3716 | } elseif ( $this->get( 'author_name' ) ) { |
| 3717 | $this->queried_object = get_user_by( 'login', $this->get( 'author_name' ) ); |
| 3718 | $this->queried_object_id = (int) $this->queried_object->ID; |
| 3719 | } |