Ejemplo n.º 1
0
 function getURL_without_pretty_urls()
 {
     return AMP_url_update_without_pretty_urls(AMP_CONTENT_URL_SECTION, array('id' => $this->id));
 }
Ejemplo n.º 2
0
function AMP_url_update($url, $attr = array())
{
    if (AMP_CONTENT_HUMANIZE_URLS) {
        $routes = false;
        if ($url == AMP_CONTENT_URL_ARTICLE && isset($attr['id'])) {
            $routes = AMP_lookup('article_routes');
            $id = $attr['id'];
        }
        if (($url == AMP_CONTENT_URL_SECTION || $url == AMP_CONTENT_URL_LIST_SECTION) && (isset($attr['id']) || isset($attr['type']))) {
            $routes = AMP_lookup('section_routes');
            $id = isset($attr['id']) ? $attr['id'] : $attr['type'];
        }
        if ($routes && $id && isset($routes[$id])) {
            return $routes[$id];
        }
    }
    return AMP_url_update_without_pretty_urls($url, $attr);
}