You are here

function twitter_views_handler_field_xss::options_form in Twitter 7.4

Same name and namespace in other branches
  1. 6.5 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  2. 6.2 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  3. 6.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  4. 6.4 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  5. 7.6 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  6. 7.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()
  7. 7.5 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::options_form()

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

./twitter_views_field_handlers.inc, line 21
Views handlers for Twitter module.

Class

twitter_views_handler_field_xss
Process Twitter-style @usernames and URLs before filtering XSS.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['link_urls'] = array(
    '#title' => t('Link urls to their destinations'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_urls']),
  );
  $form['link_usernames'] = array(
    '#title' => t('Link Twitter @usernames to their Twitter.com urls'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_usernames']),
  );
  $form['link_hashtags'] = array(
    '#title' => t('Link Twitter #hashtags to another url'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_hashtags']),
  );
  $form['hashtags_url'] = array(
    '#type' => 'textfield',
    '#default_value' => $this->options['hashtags_url'],
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-options-link-hashtags' => array(
        TRUE,
      ),
    ),
  );
  $form['link_attributes'] = array(
    '#title' => t('Open links in new windows/tabs and add rel="nofollow" attributes.'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_attributes']),
  );
}