Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment the flag status is not included:
if ($variables['after_flagging']) {
$inverse_action = ($action == 'flag' ? 'unflag' : 'flag');
$variables['message_text'] = $flag->get_label($inverse_action . '_message', $content_id);
$variables['flag_classes_array'][] = $variables['status'];
}
But I can't find any documentation about "after_flagging" ... can't we just have the flag status by default?
Comments
Comment #1
quicksketchYes that does seem a bit odd. I'll need to check what the value of $variables['status'] is. Regarding "after_flagging", that variable is set to TRUE if the template is being printed as the return value of an AJAX flagging.
Comment #2
joachim CreditAttribution: joachim commentedSeems a reasonable request, upping version.