function featured_content_get_path_pattern in Featured Content 7
Same name and namespace in other branches
- 6.2 featured_content.module \featured_content_get_path_pattern()
- 6 featured_content.module \featured_content_get_path_pattern()
- 7.2 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 1917 - 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 (!empty($match[$i]) && !empty($path[$i])) {
break;
// Okay to return something.
}
elseif ($i == $max) {
return '';
// Nothing more to match on.
}
}
if (!empty($match[$index])) {
$pattern = $path[$index];
}
else {
$pattern = '.*?';
}
return '(' . $pattern . ')\\/';
}