You are here

function theme_shoutbox_links in Shoutbox 6.2

Same name and namespace in other branches
  1. 5 shoutbox.module \theme_shoutbox_links()
  2. 6 shoutbox.module \theme_shoutbox_links()
  3. 7.2 shoutbox.theme.inc \theme_shoutbox_links()
  4. 7 shoutbox.theme.inc \theme_shoutbox_links()

Theme function of shoutbox actions. Actions are edit, delete, promote and demote. NOTE: Function does not return html but rather an array with the actions as keys. See code.

1 theme call to theme_shoutbox_links()
_shoutbox_get_links in ./shoutbox.module
Returns an array containing the possible actions for the current user based on permissions and shout. The actions are edit, delete, moderate.

File

./shoutbox.theme.inc, line 22
Theme callbacks for the shoutbox module.

Code

function theme_shoutbox_links() {
  $links['edit']['action'] = 'edit';
  $links['edit']['title'] = 'Edit Shout';
  $links['edit']['img'] = base_path() . drupal_get_path('module', 'shoutbox') . '/images/icon_edit.png';
  $links['edit']['img_width'] = 15;
  $links['edit']['img_height'] = 15;
  $links['delete']['action'] = 'delete';
  $links['delete']['title'] = 'Delete Shout';
  $links['delete']['img'] = base_path() . drupal_get_path('module', 'shoutbox') . '/images/icon_delete.png';
  $links['delete']['img_width'] = 15;
  $links['delete']['img_height'] = 15;
  $links['publish']['action'] = 'publish';
  $links['publish']['title'] = 'Publish';
  $links['publish']['img'] = base_path() . drupal_get_path('module', 'shoutbox') . '/images/thumb_up.png';
  $links['publish']['img_width'] = 15;
  $links['publish']['img_height'] = 15;
  $links['unpublish']['action'] = 'unpublish';
  $links['unpublish']['title'] = 'Unpublish';
  $links['unpublish']['img'] = base_path() . drupal_get_path('module', 'shoutbox') . '/images/thumb_down.png';
  $links['unpublish']['img_width'] = 15;
  $links['unpublish']['img_height'] = 15;
  return $links;
}