You are here

function sharebar_machine_name_load in ShareBar 7

Same name and namespace in other branches
  1. 6 sharebar.admin.inc \sharebar_machine_name_load()
  2. 7.2 sharebar.admin.inc \sharebar_machine_name_load()

Callback to load existing machine name.

1 string reference to 'sharebar_machine_name_load'
sharebar_addbutton in ./sharebar.admin.inc
Form builder: create buttons.

File

./sharebar.admin.inc, line 213
Admin page callbacks for the block module.

Code

function sharebar_machine_name_load($name) {
  $buttons = unserialize(variable_get('sharebar_buttons', sharebar_buttons_def()));
  if (array_key_exists($name, $buttons)) {
    $button[] = $buttons[$name]->machine_name;
    return reset($button);
  }
}