LLMS_Notification::get( string $key,  $skip_cache = false )

Get notification properties


Description Description


Parameters Parameters

$key

(string) (Required) key to retrieve


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/models/model.llms.notification.php

	public function get( $key, $skip_cache = false ) {

		// id will always be accessed from the object
		if ( 'id' === $key ) {
			return $this->id;
		}

		// return cached values if they exist
		if ( ! is_null( $this->$key ) && ! $skip_cache ) {
			return $this->$key;
		}

		// get the value from the database
		global $wpdb;
		return $wpdb->get_var( $wpdb->prepare( "SELECT {$key} FROM {$this->get_table()} WHERE id = %d", $this->id ) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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