LLMS_Event::delete_meta( string $key = null, bool $save = false )

Delete meta data


Parameters Parameters

$key

(string) (Optional) Meta key, if omitted deletes *all* metadata.

Default value: null

$save

(bool) (Optional) If true, saves updated metadata to the database.

Default value: false


Top ↑

Return Return

(LLMS_Event)


Top ↑

Source Source

File: includes/models/class-llms-event.php

	public function delete_meta( $key = null, $save = false ) {

		if ( ! $key ) {
			return $this->set_unencoded_metas( array(), $save );
		}

		$all = $this->get_meta( null, false );
		unset( $all[ $key ] );
		return $this->set_unencoded_metas( $all, $save );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.