You are here

function hook_flag_default_flags in Flag 7.3

Same name and namespace in other branches
  1. 6.2 flag.api.php \hook_flag_default_flags()
  2. 7.2 flag.api.php \hook_flag_default_flags()

Define default flags.

2 functions implement hook_flag_default_flags()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

flag_fields_test_flag_default_flags in tests/flag_fields_test/flag_fields_test.module
Implements hook_flag_default_flags().
flag_hook_test_flag_default_flags in tests/flag_hook_test/flag_hook_test.module
Implements hook_flag_default_flags().
3 invocations of hook_flag_default_flags()
flag_features_revert in includes/flag.features.inc
Implements hook_features_revert().
flag_get_default_flags in ./flag.module
Retrieve a list of flags defined by modules.
flag_update_7305 in ./flag.install
Convert flag roles to permissions.

File

./flag.api.php, line 59
Hooks provided by the Flag module.

Code

function hook_flag_default_flags() {
  $flags = array();
  $flags['bookmarks'] = array(
    'entity_type' => 'node',
    'title' => 'Bookmarks',
    'global' => FALSE,
    'types' => array(
      0 => 'article',
      1 => 'blog',
    ),
    'flag_short' => 'Bookmark this',
    'flag_long' => 'Add this post to your bookmarks',
    'flag_message' => 'This post has been added to your bookmarks',
    'unflag_short' => 'Unbookmark this',
    'unflag_long' => 'Remove this post from your bookmarks',
    'unflag_message' => 'This post has been removed from your bookmarks',
    'unflag_denied_text' => '',
    'link_type' => 'toggle',
    'weight' => 0,
    'show_in_links' => array(
      'full' => TRUE,
      'token' => FALSE,
    ),
    'show_as_field' => FALSE,
    'show_on_form' => FALSE,
    'access_author' => '',
    'show_contextual_link' => TRUE,
    'show_on_profile' => FALSE,
    'access_uid' => '',
    'api_version' => 3,
  );
  return $flags;
}