src/classes/CCUrl.php
public static function active( $url )
	{
		$url = parse_url( $url, PHP_URL_PATH );

		if ( empty( $url ) )
		{
			return false;
		}

		if ( $url[0] !== '/' )
		{
			$url = static::to( $url );
		}

		// when we are on "/" only "/" counts as active.
	 	if ( $url === '/' )
		{
			return static::current() == $url;
		}

		// for everything else we cut the url and compare
		$cut = substr( static::current(), 0, strlen( $url ) );

		return $cut == $url;
	}
public static function active( $url )
	{
		$url = parse_url( $url, PHP_URL_PATH );

		if ( empty( $url ) )
		{
			return false;
		}

		if ( $url[0] !== '/' )
		{
			$url = static::to( $url );
		}

		// when we are on "/" only "/" counts as active.
	 	if ( $url === '/' )
		{
			return static::current() == $url;
		}

		// for everything else we cut the url and compare
		$cut = substr( static::current(), 0, strlen( $url ) );

		return $cut == $url;
	}
public static function active ( $ url ) { $ url = parse_url ( $ url , PHP_URL_PATH ) ; if ( empty ( $ url ) ) { return false ; } if ( $ url [ 0 ] !== '/' ) { $ url = static :: to ( $ url ) ; } // when we are on "/" only "/" counts as active. if ( $ url === '/' ) { return static :: current ( ) == $ url ; } // for everything else we cut the url and compare $ cut = substr ( static :: current ( ) , 0 , strlen ( $ url ) ) ; return $ cut == $ url ; }
Is the given url active?
This function ignores the domain and the parameters if the
uri matches the current uri true will be returned.

@param string 		$url
@return bool
Is the given url active? This function ignores the domain and the parameters if the uri matches the current uri true will be returned .