function mobile_detect_help in Mobile Detect 7
Same name and namespace in other branches
- 8.2 mobile_detect.module \mobile_detect_help()
Implements hook_help().
File
- ./
mobile_detect.module, line 11 - Lightweight mobile detection based on the Mobile_Detect.php library.
Code
function mobile_detect_help($path, $arg) {
switch ($path) {
case 'admin/help#mobile_detect':
$readme = drupal_get_path('module', 'mobile_detect') . '/README.txt';
if (is_readable($readme)) {
$output = file_get_contents($readme);
return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>' . check_plain($output) . '</pre>';
}
else {
$output = '<p>' . t('This is a lightweight mobile detection based on the Mobile_Detect.php library.') . '</p>';
$output .= '<p>' . t('This module is intended to aid developers utilizing mobile-first and responsive design techniques who also have a need for slight changes for mobile and tablet users. An example would be showing (or hiding) a block or content pane to a particular device.') . '</p>';
$output .= '<p>' . t('This module is not intended (and never will be enhanced) to provide theme switching or redirection; other modules already provide this functionality.') . '</p>';
$output .= '<h3>' . t('cTools Support') . '</h3>';
$output .= '<p>' . t('A sub-module is included for integration with ctools. Once enabled, a "Mobile Detect: device type" will show up in the list of selection and access rules. When this is used, the list of device types is dynamically built from the rules present in the Mobile_Detect library, and you can use any combination of AND/OR/NOT logic that you need.') . '</p>';
$output .= '<p>' . t('Note that the Mobile_Detect considers tablet devices as also being mobile devices. When you have both tablet and mobile device selection in use, it is best to place the tablet rules first. For example, when using with for Panel page selection rules, place the Table variant before the Mobile variant.') . '</p>';
$output .= '<h3>' . t('Drupal Page Cache Support') . '</h3>';
$output .= '<p>' . t('Experimental support is provided for working with the Drupal page cache. See the README.txt in the module package file for details.') . '</p>';
return $output;
}
}
}