Esempio n. 1
0
    $c['Author'] = 'author/';
    $c[$author] = 'author/' . $author;
    WP::printBreadCrumbs($c);
    WP::author($author);
})->where('author', 'alpha_numeric');
Router::get(WP::path() . 'author/{author}/page/{currentPage}', function ($author, $currentPage) {
    $c = array();
    $c['Author'] = 'author/';
    $c[$author] = 'author/' . $author;
    WP::printBreadCrumbs($c);
    Data::get()->set('current-page', $currentPage);
    WP::author($author);
})->where(array('author' => 'alpha_numeric', 'currentPage' => 'integer'));
Router::get(WP::path() . 'tag/', function () {
    $c = array();
    $c['Tag'] = 'tag/';
    WP::printBreadCrumbs($c);
    WP::template('tag-list', '<a class="wp-tag-list" href="{{$path}}tag/{{$slug}}">{{$name}} - {{$count}}</a>');
    $tags = WP::topTags(1000);
    View::html("<div class='clearfix'>{$tags}</div>");
    WP::clearTemplate('tag-list');
});
Router::get(WP::path() . '{slug}', function ($slug) {
    WP::printBreadCrumbs(array(str_replace('-', ' ', $slug) => $slug));
    WP::post($slug);
})->where('slug', 'alpha_numeric');
Router::get(WP::path() . 'page/{currentPage}', function ($currentPage) {
    WP::printBreadCrumbs(array('Page ' . $currentPage => 'page/' . $currentPage));
    Data::get()->set('current-page', $currentPage);
    WP::index();
})->where('currentPage', 'integer');