Ekko::areActiveMatch and helper
Turboveja opened this issue · comments
Turboveja commented
if (!function_exists('are_active_match')) {
/**
* Detects if the given string array is found in the current URL.
*
* @param array $matches
* @param string $output
*
* @return string
*/
function are_active_match($matches, $output = "active")
{
foreach($matches as $match){
if(isActiveMatch($match)){
return $output;
}
}
return null;
}
}
Mario Bašić commented
I can see this being useful. Can you do a PR?