public function get_notices($context = '') { $notices = $this->get_all_notices(); if (!empty($notices)) { if (!empty($context)) { return isset($notices[$context]) ? $notices[$context] : array(); } return $notices; } return array(); }