function _flagging_form_label in Flagging Form 7
Same name and namespace in other branches
- 7.3 flagging_form.module \_flagging_form_label()
Gets a label for use on a form.
It's a wrapper around $flag->get_label() that handles defaults.
2 calls to _flagging_form_label()
- flagging_form_flagging_delete_form in ./
flagging_form.module - Returns a form for deleting a flagging.
- flagging_form_flagging_form in ./
flagging_form.module - Returns a form for editing a flagging.
File
- ./
flagging_form.module, line 327 - Provides forms for editing and deleting a flagging.
Code
function _flagging_form_label($flag, $label, $content_id) {
static $defaults = array(
'form_flagging_button' => 'flag_short',
'form_flagging_delete_button' => 'unflag_short',
'form_unflagging_button' => 'unflag_short',
);
$label = 'form_' . $label;
if (empty($flag->{$label}) && isset($defaults[$label])) {
$label = $defaults[$label];
}
return $flag
->get_label($label, $content_id);
}