You are here

addtocopy.admin.inc in Add link to copied text 6

Same filename and directory in other branches
  1. 7 addtocopy.admin.inc

File

addtocopy.admin.inc
View source
<?php

function addtocopy_settings_form() {
  $form = array();
  $form['addtocopy_selector'] = array(
    '#type' => 'textfield',
    '#title' => t('jQuery selector'),
    '#default_value' => variable_get('addtocopy_selector', '#container, #page'),
    '#description' => t('jQuery selector expression to apply Add to Copy.'),
  );
  $form['addtocopy_minlen'] = array(
    '#type' => 'textfield',
    '#title' => t('Minimum text length'),
    '#default_value' => variable_get('addtocopy_minlen', 25),
    '#description' => t('Minimum selected text length to activate Add to Copy.'),
  );
  $form['addtocopy_htmlcopytxt'] = array(
    '#type' => 'textfield',
    '#title' => t('HTML to add to selected text'),
    '#default_value' => variable_get('addtocopy_htmlcopytxt', '<br>More: <a href="[link]">[link]</a><br>'),
    '#description' => t('[link] will be replaced with the current page link.'),
  );
  $form['addtocopy_addcopyfirst'] = array(
    '#type' => 'radios',
    '#title' => t('Add before or after selected text'),
    '#options' => array(
      0 => t('After'),
      1 => t('Before'),
    ),
    '#default_value' => variable_get('addtocopy_addcopyfirst', 0),
  );
  return system_settings_form($form);
}

Functions