You are here

function theme_shoutbox_links in Shoutbox 5

Same name and namespace in other branches
  1. 6.2 shoutbox.theme.inc \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.module, line 286
shoutbox module displays a block for users to create short messages for thw whole site. Uses AHAH to update the database and display content.

Code

function theme_shoutbox_links() {
  $links['edit']['action'] = 'edit';
  $links['edit']['title'] = 'Edit';
  $links['edit']['attributes'] = array(
    "class" => "edit-shout",
  );
  $links['delete']['action'] = 'delete';
  $links['delete']['title'] = 'Delete';
  $links['delete']['attributes'] = array(
    "class" => "delete-shout",
  );
  $links['publish']['action'] = 'publish';
  $links['publish']['title'] = 'Publish';
  $links['publish']['attributes'] = array(
    "class" => "publish-shout",
  );
  $links['unpublish']['action'] = 'unpublish';
  $links['unpublish']['title'] = 'Unpublish';
  $links['unpublish']['attributes'] = array(
    "class" => "unpublish-shout",
  );
  return $links;
}