PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Syntax: theme_isCurrentLocation(string $location)

Check if the specified location is the current one.


Parameters

$location
The location to compare the current one against. Must be the full path from root to work (/hello for example) since the match is made from root. Note that the location is the internal one (the real URL doesn’t matter).


Return values

Return TRUE if it is the current location, FALSE otherwise.


Examples:

Check if current location is the hello page at root
$return = theme_isCurrentLocation('/hello');

Check if current location is the world page inside the hello folder which is at root
$return = theme_isCurrentLocation('/hello/world');