Projet

Général

Profil

Révision 74f6bef0

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/adaptivetheme/at_core/inc/forms/settings.touchicons.inc
4 4
 * @file
5 5
 * Generate form elments for the Apple touch icons settings.
6 6
 */
7
function at_core_touch_icons_form(&$form, $theme_name) {
8
  $form['at']['ati'] = array(
9
    '#type' => 'fieldset',
10
    '#title' => t('Touch Icons'),
11
    '#description' => t('<h3>Touch Icons</h3><p>Different devices can support different sized touch icons - see the <a href="!apple_docs" target="_blank">iOS developer documentation</a>. Paths must be relative to your theme folder.</p><p>A plain set of icons are included by default that use the <a href="!icon_template" target="_blank">App Icon Template</a>.', array('!apple_docs' => 'https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html', '!icon_template' => 'http://appicontemplate.com')),
12
    '#weight' => 10,
13
  );
14
  $form['at']['ati']['icon-paths'] = array(
15
    '#type' => 'fieldset',
16
    '#title' => t('Touch Icons'),
17
  );
7 18

  
8
$form['at']['ati'] = array(
9
  '#type' => 'fieldset',
10
  '#title' => t('Touch Icons'),
11
  '#description' => t('<h3>Touch Icons</h3><p>Different devices can support different sized touch icons:</p><ul><li>57x57 - non-retina iPhone, iPod Touch, Nokia and Android 2.1+ devices</li><li>72x72 - first gen iPad</li><li>114x114 - iPhone 4 with high-res retina display</li></ul><p>Enter the path to each touch icon. Paths must be relative to your theme folder.</p>'),
12
  '#weight' => 10,
13
);
14
$form['at']['ati']['icon-paths'] = array(
15
  '#type' => 'fieldset',
16
  '#title' => t('Touch Icons'),
17
);
19
  // Default
20
  $form['at']['ati']['icon-paths']['icon_path_default'] = array(
21
    '#type' => 'textfield',
22
    '#title' => t('Default: 60x60'),
23
    '#description' => t('If you only enter a path for this size it will be used by all devices.'),
24
    '#field_prefix' => $theme_name . '/',
25
    '#default_value' => check_plain(at_get_setting('icon_path_default')),
26
    '#states' => array(
27
      'required' => array('input[name="enable_apple_touch_icons"]' => array('checked' => TRUE)),
28
    ),
29
  );
18 30

  
19
// Low
20
$form['at']['ati']['icon-paths']['apple_touch_icon_path_l'] = array(
21
  '#type' => 'textfield',
22
  '#title' => t('57x57'),
23
  '#description' => t('If you only enter a path for this size it will be used by all devices.'),
24
  '#field_prefix' => $theme_name . '/',
25
  '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_l')),
26
  '#states' => array(
27
    'required' => array('input[name="enable_apple_touch_icons"]' => array('checked' => TRUE)),
28
  ),
29
);
31
  // iPad (standard display)
32
  $form['at']['ati']['icon-paths']['apple_touch_icon_path_ipad'] = array(
33
    '#type' => 'textfield',
34
    '#title' => t('iPad: 76x76'),
35
    '#description' => t('Apple touch icon for older iPads with standard displays.'),
36
    '#field_prefix' => $theme_name . '/',
37
    '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_ipad')),
38
  );
30 39

  
31
// Medium
32
$form['at']['ati']['icon-paths']['apple_touch_icon_path_m'] = array(
33
  '#type' => 'textfield',
34
  '#title' => t('72x72'),
35
  '#description' => t('Apple touch icon for old iPads.'),
36
  '#field_prefix' => $theme_name . '/',
37
  '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_m')),
38
);
40
  // iPhone retina
41
  $form['at']['ati']['icon-paths']['apple_touch_icon_path_iphone_retina'] = array(
42
    '#type' => 'textfield',
43
    '#title' => t('iPhone Retina: 120x120'),
44
    '#description' => t('Apple touch icon for iPhones with retina displays.'),
45
    '#field_prefix' => $theme_name . '/',
46
    '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_iphone_retina')),
47
  );
39 48

  
40
// High
41
$form['at']['ati']['icon-paths']['apple_touch_icon_path_h'] = array(
42
  '#type' => 'textfield',
43
  '#title' => t('114x114'),
44
  '#description' => t('Apple touch icon for iPhone 4 with high-res retina display.'),
45
  '#field_prefix' => $theme_name . '/',
46
  '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_h')),
47
);
49
  // iPad retina
50
  $form['at']['ati']['icon-paths']['apple_touch_icon_path_ipad_retina'] = array(
51
    '#type' => 'textfield',
52
    '#title' => t('iPad Retina: 156x156'),
53
    '#description' => t('Apple touch icon for iPads with retina displays.'),
54
    '#field_prefix' => $theme_name . '/',
55
    '#default_value' => check_plain(at_get_setting('apple_touch_icon_path_ipad_retina')),
56
  );
57

  
58
  $form['at']['ati']['icon-paths']['icon_rel'] = array(
59
    '#type' => 'checkbox',
60
    '#title' => t('Use apple-touch-icon-precomposed'),
61
    '#description' => t('Use precomposed if you want to remove icon effects in iOS6 or below. The default is <code>apple-touch-icon</code>. '),
62
  );
63
}

Formats disponibles : Unified diff