I ve been trying to get mobile_tools for Drupal 7 to work but it appears it s not switching themes. (Or at least I can t get it to switch).
这是“负责改用移动主题”的法典。 如果我印刷tom——主题确实成为流动主题的名称,但所展示的主题仍然是不实的。 我未能找到任何关于可变的cus子——至少不是第7博士的话题的文件。
/**
* Being called in the hook_boot() implementation
* This function is in charge of changing to the mobile theme
*/
function mobile_tools_switch_theme($device) {
global $custom_theme, $conf;
// check if theme switching is forced
$current_url_type = mobile_tools_is_mobile_site();
if (($current_url_type == mobile && variable_get( mobile-tools-theme-switch , ) == mobile-tools-mobile-url ) ||
(variable_get( mobile-tools-theme-switch , ) == mobile-tools-mobile-device && $device[ type ] == mobile ) ) {
$group = $device[ group ];
$mobile_detection_module = variable_get( mobile-tools-device-detection , mobile_tools );
if (variable_get($mobile_detection_module . _ . $group . _enable , ) == 1) {
$custom_theme = variable_get($mobile_detection_module . _ . $group . _theme , $conf[ theme_default ]);
return TRUE;
}
else {
$custom_theme = variable_get( mobile_tools_theme_name , $conf[ theme_default ]);
return TRUE;
}
}
return FALSE;
}