function pathfilter_filter_tips in Path Filter 6.2
Same name and namespace in other branches
- 5.2 pathfilter.module \pathfilter_filter_tips()
- 5 pathfilter.module \pathfilter_filter_tips()
- 6 pathfilter.module \pathfilter_filter_tips()
Implementation of hook_filter_tips().
File
- ./
pathfilter.module, line 31 - This filter takes internal Drupal paths in double quotes, written as e.g. "internal:node/99", and replaces them with the appropriate absolute http URL using Drupal's url() function [1]. E.g. for a site located at http://example.com/mysite
Code
function pathfilter_filter_tips($delta, $format, $long = FALSE) {
switch ($delta) {
case 0:
if ($long) {
$output = '<p>' . t('Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Given a site located at http://example.com/mysite, assuming clean URLs are enabled and "internal:admin/user" becomes "http://example.com/mysite/admin/user" and "internal:node/99" becomes "http://example.com/mysite/node/99". If \'node/99\' has a URL alias assigned, such as \'news/latest\' the alias will be substituted giving "http://example.com/mysite/news/latest".') . '</p>';
$output .= '<p>' . t('Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.') . '</p>';
return $output;
}
else {
return t('Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.');
}
break;
}
}