You are here

function theme_shoutbox_links in Shoutbox 7.2

Same name and namespace in other branches
  1. 5 shoutbox.module \theme_shoutbox_links()
  2. 6.2 shoutbox.theme.inc \theme_shoutbox_links()
  3. 6 shoutbox.module \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 ' . DEFAULTSHOUTSINGULAR_CC;
  $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 ' . DEFAULTSHOUTSINGULAR_CC;
  $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 ' . DEFAULTSHOUTSINGULAR_CC;
  $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 ' . DEFAULTSHOUTSINGULAR_CC;
  $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;
}