1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Generate form elments for the Apple touch icons settings.
|
6 |
|
|
*/
|
7 |
74f6bef0
|
Assos Assos
|
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 |
|
|
);
|
18 |
85ad3d82
|
Assos Assos
|
|
19 |
74f6bef0
|
Assos Assos
|
// 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 |
|
|
);
|
30 |
85ad3d82
|
Assos Assos
|
|
31 |
74f6bef0
|
Assos Assos
|
// 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 |
|
|
);
|
39 |
85ad3d82
|
Assos Assos
|
|
40 |
74f6bef0
|
Assos Assos
|
// 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 |
|
|
);
|
48 |
85ad3d82
|
Assos Assos
|
|
49 |
74f6bef0
|
Assos Assos
|
// 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 |
|
|
} |