Commit 387b07f0 authored by Derek Wright's avatar Derek Wright
Browse files

[#34496] by dww: Define a default flag for following issues.

parent 5530b2ca
Loading
Loading
Loading
Loading
+38 −0
Changes for project_issue.module: 38 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2565,3 +2565,41 @@ function project_issue_get_follow_flag() {
  }
  return $flag;
}

/**
 * Implement hook_flag_default_flags().
 */
function project_issue_flag_default_flags() {
  $flags = array();
  $flags['project_issue_follow'] = array (
    'content_type' => 'node',
    'title' => t('Follow'),
    'global' => '0',
    'types' => array(
      0 => 'project_issue',
    ),
    'flag_short' => t('Follow'),
    'flag_long' => '',
    'flag_message' => '',
    'unflag_short' => t('Unfollow'),
    'unflag_long' => '',
    'unflag_message' => '',
    'unflag_denied_text' => '',
    'link_type' => 'toggle',
    'roles' => array(
      'flag' => array(
        0 => 2,
      ),
      'unflag' => array(
        0 => 2,
      ),
    ),
    'show_on_page' => 0,
    'show_on_teaser' => 0,
    'show_on_form' => 0,
    'access_author' => '',
    'i18n' => 0,
    'api_version' => 2,
  );
  return $flags;
}