protected function setup_instance() {
		switch ( $this->wp_type ) {
			case 'post':
				$wp_post = get_post( $this->get_id() );
				if ( ! is_null( $wp_post ) && get_post_type( $wp_post->ID ) === $this->object_type ) {
					$this->set_instance( $wp_post );
				}
				break;

			case 'term':
				$wp_term = get_term( $this->get_id(), $this->object_type );
				if ( ! is_null( $wp_term ) && ! is_wp_error( $wp_term ) ) {
					$this->set_instance( $wp_term );
				}
				break;
		}
	}
protected function setup_instance() {
		switch ( $this->wp_type ) {
			case 'post':
				$wp_post = get_post( $this->get_id() );
				if ( ! is_null( $wp_post ) && get_post_type( $wp_post->ID ) === $this->object_type ) {
					$this->set_instance( $wp_post );
				}
				break;

			case 'term':
				$wp_term = get_term( $this->get_id(), $this->object_type );
				if ( ! is_null( $wp_term ) && ! is_wp_error( $wp_term ) ) {
					$this->set_instance( $wp_term );
				}
				break;
		}
	}
protected function setup_instance ( ) { switch ( $ this -> wp_type ) { case 'post' : $ wp_post = get_post ( $ this -> get_id ( ) ) ; if ( ! is_null ( $ wp_post ) && get_post_type ( $ wp_post -> ID ) === $ this -> object_type ) { $ this -> set_instance ( $ wp_post ) ; } break ; case 'term' : $ wp_term = get_term ( $ this -> get_id ( ) , $ this -> object_type ) ; if ( ! is_null ( $ wp_term ) && ! is_wp_error ( $ wp_term ) ) { $ this -> set_instance ( $ wp_term ) ; } break ; } }
Setup WP Core Object based on ID and object-type.

@return void
Setup WP Core Object based on ID and object - type .