You are here

function flag_flag_link_types in Flag 7.2

Same name and namespace in other branches
  1. 5 flag.module \flag_flag_link_types()
  2. 6.2 flag.module \flag_flag_link_types()
  3. 6 flag.module \flag_flag_link_types()

Implements hook_flag_link_types().

File

./flag.module, line 287
The Flag module.

Code

function flag_flag_link_types() {
  return array(
    'toggle' => array(
      'title' => t('JavaScript toggle'),
      'description' => t('An AJAX request will be made and degrades to type "Normal link" if JavaScript is not available.'),
      'uses standard js' => TRUE,
      'uses standard css' => TRUE,
    ),
    'normal' => array(
      'title' => t('Normal link'),
      'description' => t('A normal non-JavaScript request will be made and the current page will be reloaded.'),
      'uses standard js' => FALSE,
      'uses standard css' => FALSE,
    ),
    'confirm' => array(
      'title' => t('Confirmation form'),
      'description' => t('The user will be taken to a confirmation form on a separate page to confirm the flag.'),
      'options' => array(
        'flag_confirmation' => '',
        'unflag_confirmation' => '',
      ),
      'uses standard js' => FALSE,
      'uses standard css' => FALSE,
    ),
  );
}