You are here

function responsive_favicons_config_page in Responsive Favicons 7

Menu callback; Provide the administration overview page.

1 string reference to 'responsive_favicons_config_page'
responsive_favicons_menu in ./responsive_favicons.module
Implements hook_menu().

File

./responsive_favicons.admin.inc, line 11
Admin page callbacks for the responsive_favicons module.

Code

function responsive_favicons_config_page() {
  $form['responsive_favicons_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path to responsive favicon files'),
    '#description' => t('A local file system path where favicon files will be stored. This directory must exist and be writable by Drupal.'),
    '#field_prefix' => file_create_url('public://'),
    '#default_value' => variable_get('responsive_favicons_path', 'favicons'),
  );
  $form['responsive_favicons_tags'] = array(
    '#type' => 'textarea',
    '#title' => t('Favicon tags'),
    '#description' => t('Paste the code provided by <a href="http://realfavicongenerator.net/" target="_blank">http://realfavicongenerator.net/</a>. Make sure each link is on a separate line. It is fine to paste links with paths like "/apple-touch-icon-57x57.png" as these will be converted to the correct paths automatically.'),
    '#default_value' => implode(PHP_EOL, variable_get('responsive_favicons_tags', array())),
    '#rows' => 16,
  );
  $form['responsive_favicons_upload'] = array(
    '#type' => 'file',
    '#title' => t('Upload a zip file from realfavicongenerator.net to install'),
    '#description' => t('For example: %filename from your local computer. This only needs to be done once.', array(
      '%filename' => 'favicons.zip',
    )),
  );
  $form['responsive_favicons_remove_default'] = array(
    '#type' => 'checkbox',
    '#title' => t('Remove default favicon from Drupal'),
    '#description' => t('It is recommended to remove default favicon as it can cause issues'),
    '#default_value' => variable_get('responsive_favicons_remove_default', 0),
  );
  $form['#submit'][] = 'responsive_favicons_config_page_submit';
  return system_settings_form($form);
}