Automator_Notifications::get_option( bool $cache = true )

Get option value.


Parameters Parameters

$cache

(Optional) Reference property cache if available.

Default value: true


Top ↑

Return Return

(array)


Source Source

File: src/core/admin/notifications/notifications.php

	public function get_option( $cache = true ) {
		if ( $this->option && $cache ) {
			return $this->option;
		}
		$option = get_option( $this->option_name, array() );
		$this->option = array(
			'update'    => ! empty( $option['update'] ) ? $option['update'] : 0,
			'events'    => ! empty( $option['events'] ) ? $option['events'] : array(),
			'feed'      => ! empty( $option['feed'] ) ? $option['feed'] : array(),
			'dismissed' => ! empty( $option['dismissed'] ) ? $option['dismissed'] : array(),
		);
		return $this->option;
	}


Top ↑

Changelog Changelog

Changelog
VersionDescription
{VERSION}Introduced.