function commons_posts_commons_bw_create_all_widget in Drupal Commons 7.3
Implements hook_commons_bw_create_all_widget().
File
- modules/
commons/ commons_posts/ commons_posts.commons.inc, line 40 - Commons module integration for the Commons Posts module.
Code
function commons_posts_commons_bw_create_all_widget($group) {
if (og_user_access('node', $group->nid, 'create post content')) {
$link = l(t('Create a post'), 'node/add/post', array(
'attributes' => array(
'class' => 'commons-posts-create',
),
'query' => array(
'og_group_ref' => $group->nid,
),
));
return array(
'commons_posts' => array(
'default' => TRUE,
'link' => $link,
'text' => t('Foster a topic through commenting'),
'#weight' => -1,
),
);
}
}