Exemplo n.º 1
0
    $c = array();
    $c['Search'] = 'search/';
    $c[$search] = 'search/' . $search;
    $c['Page ' . $currentPage] = 'search/' . $search . '/page/' . $currentPage;
    WP::printBreadCrumbs($c);
    Data::get()->set('current-page', $currentPage);
    //Data::get()->set('page',true);
    WP::search($search);
    View::script('wp.$search.val("' . $search . '");');
})->where(array('search' => 'alpha_numeric', 'currentPage' => 'integer'));
Router::get(WP::path() . 'category/', function () {
    $c = array();
    $c['Category'] = 'category/';
    WP::printBreadCrumbs($c);
    //WP::template('category-list','<a class="wp-category-list" href="{{$path}}category/{{$slug}}">{{$name}} - {{$count}}</a>');
    $categories = WP::topCategories(1000);
    View::html("<div class='clearfix'>{$categories}</div>");
    //WP::clearTemplate('category-list');
});
Router::get(WP::path() . 'category/{category}', function ($category) {
    $c = array();
    $c['Category'] = 'category/';
    $c[$category] = 'category/' . $category;
    WP::printBreadCrumbs($c);
    WP::category($category);
})->where('category', 'alpha_numeric');
Router::get(WP::path() . 'author/', function () {
    $c = array();
    $c['Author'] = 'author/';
    WP::printBreadCrumbs($c);
    WP::template('author-list', '<a class="wp-author-list" href="{{$path}}author/{{$user_nicename}}">{{$display_name}}</a>');