public function save()
	{
		if ( ! $this->is_loaded() ) return false;

		$this->fill_defaults();

		$error = null;

		$id = wp_insert_post( $this->attributes, $error );

		if ( ! empty( $id ) ) {

			$this->attributes['ID'] = $id;

			$this->save_meta_all();

		}

		return $error === false ? true : $error;
	}
public function save()
	{
		if ( ! $this->is_loaded() ) return false;

		$this->fill_defaults();

		$error = null;

		$id = wp_insert_post( $this->attributes, $error );

		if ( ! empty( $id ) ) {

			$this->attributes['ID'] = $id;

			$this->save_meta_all();

		}

		return $error === false ? true : $error;
	}
public function save ( ) { if ( ! $ this -> is_loaded ( ) ) return false ; $ this -> fill_defaults ( ) ; $ error = null ; $ id = wp_insert_post ( $ this -> attributes , $ error ) ; if ( ! empty ( $ id ) ) { $ this -> attributes [ 'ID' ] = $ id ; $ this -> save_meta_all ( ) ; } return $ error === false ? true : $ error ; }
Saves current model in the db.

@return mixed.
Saves current model in the db .