Пример #1
0
/**
 * Compare URL against relative URL
 */
function url_compare($url, $rel)
{
    $url = trailingslashit($url);
    $rel = trailingslashit($rel);
    if (strcasecmp($url, $rel) === 0 || root_relative_url($url) == $rel) {
        return true;
    } else {
        return false;
    }
}
Пример #2
0
/**
 * Compare URL against relative URL
 */
function url_compare($url, $rel)
{
    $url = trailingslashit($url);
    $rel = trailingslashit($rel);
    return strcasecmp($url, $rel) === 0 || root_relative_url($url) == $rel;
}