function featured_content_get_path_pattern in Featured Content 6
Same name and namespace in other branches
- 6.2 featured_content.module \featured_content_get_path_pattern()
- 7.2 featured_content.module \featured_content_get_path_pattern()
- 7 featured_content.module \featured_content_get_path_pattern()
Get the pattern to use for the path.
1 call to featured_content_get_path_pattern()
- featured_content_get_filtered_nids in ./
featured_content.module - Get filtered node nids. Filter base on content types, users (authors) and taxonomy terms.
File
- ./
featured_content.module, line 840 - Featured Content module for created related & featured content blocks.
Code
function featured_content_get_path_pattern($match, $path, $index) {
$max = 3;
for ($i = $index; $i <= $max; $i++) {
if ($match[$i] && $path[$i]) {
break;
// okay to return something
}
elseif ($i == $max) {
return '';
// nothing more to match on
}
}
if ($match[$index]) {
$pattern = $path[$index];
}
else {
$pattern = '.*?';
}
return '(' . $pattern . ')\\/';
}