public function from_post( $object )
	{
		if ( is_array( $object ) ) {

			$this->attributes = $object;

		} else if ( is_a( $object, 'WP_Post' ) ) {

			$this->attributes = $object->to_array();

		}

		if ( ! empty( $this->attributes ) ) {

			$this->load_meta();
			
		}

		return $this;
	}
public function from_post( $object )
	{
		if ( is_array( $object ) ) {

			$this->attributes = $object;

		} else if ( is_a( $object, 'WP_Post' ) ) {

			$this->attributes = $object->to_array();

		}

		if ( ! empty( $this->attributes ) ) {

			$this->load_meta();
			
		}

		return $this;
	}
public function from_post ( $ object ) { if ( is_array ( $ object ) ) { $ this -> attributes = $ object ; } else if ( is_a ( $ object , 'WP_Post' ) ) { $ this -> attributes = $ object -> to_array ( ) ; } if ( ! empty ( $ this -> attributes ) ) { $ this -> load_meta ( ) ; } return $ this ; }
Constructs object based on passed object.
Should be an array of attributes or a WP_Post.

@param mixed $object Array of attributes or a WP_Post.
Constructs object based on passed object . Should be an array of attributes or a WP_Post .