You are here

function workbench_moderation_state_label in Workbench Moderation 7.3

Same name and namespace in other branches
  1. 7 workbench_moderation.module \workbench_moderation_state_label()

Get the label for a state based on its machine name.

Parameters

type $machine_name: The machine name of the state.

Return value

An unsanitized label or an empty string if the state does not exist.

11 calls to workbench_moderation_state_label()
workbench_moderation_admin_transitions_form in ./workbench_moderation.admin.inc
Administration form to create and delete moderation transitions.
workbench_moderation_admin_transitions_form_submit in ./workbench_moderation.admin.inc
Form submit handler for moderation transitions.
workbench_moderation_form_node_form_alter in ./workbench_moderation.module
Implements hook_form_BASE_FORM_ID_alter().
workbench_moderation_get_moderation_links in ./workbench_moderation.module
Generates a list of links to available moderation actions.
workbench_moderation_handler_field_state::render_name in includes/workbench_moderation_handler_field_state.inc
Render node type as human readable name, unless using machine_name option.

... See full list

File

./workbench_moderation.module, line 1464
Content moderation for Workbench.

Code

function workbench_moderation_state_label($machine_name) {
  $labels = workbench_moderation_state_labels();
  return isset($labels[$machine_name]) ? $labels[$machine_name] : '';
}