Ejemplo n.º 1
0
        }
        echo self::parse_format($format, $title_format, $url, $title);
    }
    static function get_referrer_url()
    {
        if (!isset(self::$data['url']) || !isset(self::$data['query'])) {
            return '';
        }
        return self::$data['url'];
    }
    static function get_title($sep, $sepdir)
    {
        $sep = trim($sep);
        if (!($title = @self::$data['title'])) {
            $title = 'Referrer';
        }
        $parts = array_slice(explode(self::SEP, $title), 1);
        if ('right' == $sepdir) {
            $parts = array_reverse($parts);
        }
        return implode(" {$sep} ", $parts);
    }
    private static function parse_format($link_format, $title_format, $url, $title)
    {
        $title = str_replace('%title', $title, $title_format);
        $link = sprintf("<a href='%s'>%s</a>", $url, $title);
        return str_replace('%link', $link, $link_format);
    }
}
Smarter_Navigation::init();
include dirname(__FILE__) . '/template-tags.php';