src/Axolotl/Model.php
private function override_wp_object( $value ) {
		if ( is_object( $value ) ) {
			$this->attributes[ self::OBJECT_KEY ] = $this->set_wp_object_constants( $value );
		} else {
			$this->attributes[ self::OBJECT_KEY ] = null;

			if ( $this->uses_wp_object() ) {
				$this->create_wp_object();
			}
		}

		return $this;
	}
private function override_wp_object( $value ) {
		if ( is_object( $value ) ) {
			$this->attributes[ self::OBJECT_KEY ] = $this->set_wp_object_constants( $value );
		} else {
			$this->attributes[ self::OBJECT_KEY ] = null;

			if ( $this->uses_wp_object() ) {
				$this->create_wp_object();
			}
		}

		return $this;
	}
private function override_wp_object ( $ value ) { if ( is_object ( $ value ) ) { $ this -> attributes [ self :: OBJECT_KEY ] = $ this -> set_wp_object_constants ( $ value ) ; } else { $ this -> attributes [ self :: OBJECT_KEY ] = null ; if ( $ this -> uses_wp_object ( ) ) { $ this -> create_wp_object ( ) ; } } return $ this ; }
Overrides the current WordPress object with a provided one.

Resets the post's default values and stores it in the attributes.

@param WP_Post|WP_Term|null $value

@return $this
Overrides the current WordPress object with a provided one .