public get_notices ( string $context = '' ) : array | ||
$context | string | The context that you'd like the messages for |
return | array | The array of notice messages |
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();
}