function zopim_get_themes in Zopim Live Chat 6.2
1 call to zopim_get_themes()
- zopim_admin_settings_form in includes/
zopim-customize.admin.inc - Implementation of hook_admin_settings() for configuring the module
File
- includes/
zopim-customize.admin.inc, line 247 - Administrative page callbacks for the zopim module.
Code
function zopim_get_themes() {
$settings = zopim_get_settings();
$ssl = $ssl ? $ssl : $settings['general']['use_ssl'];
$headers = array(
'Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8',
);
$url = $ssl === 1 ? ZOPIM_THEMES_LIST : str_replace("https", "http", ZOPIM_THEMES_LIST);
$request = drupal_http_request($url, $headers);
$themes = explode("\n", $request->data);
$keyed_themes = array();
foreach ($themes as $id) {
if (!empty($id)) {
$keyed_themes[$id] = $id;
}
}
ksort($keyed_themes);
return $keyed_themes;
}