Habari\Comment::status_action PHP Method

status_action() public static method

Obtain the action name of the comment status
public static status_action ( integer | string $status ) : string
$status integer | string A comment status value, or name
return string A string of the status action, or null
    public static function status_action($status)
    {
        if (empty(self::$comment_status_actions)) {
            self::$comment_status_actions = array('unapproved' => _t('Unapprove'), 'approved' => _t('Approve'), 'spam' => _t('Spam'));
            self::$comment_status_actions = Plugins::filter('list_comment_actions', self::$comment_status_actions);
        }
        if (isset(self::$comment_status_actions[$status])) {
            return self::$comment_status_actions[$status];
        }
        if (isset(self::$comment_status_actions[Comment::status_name($status)])) {
            return self::$comment_status_actions[Comment::status_name($status)];
        }
        return '';
    }