Exemplo n.º 1
0
function get_events()
{
    $parser = new Parser_generator_theme();
    $events = get_posts(array('numberposts' => 4, 'category' => '13', 'orderby' => 'post_date', 'order' => 'DESC', 'post_status' => 'publish'));
    foreach ($events as $event) {
        $img = get_the_post_thumbnail($event->ID);
        $permalink = get_permalink($event->ID);
        $parser->parse(GENERATOR_THEME_DIR . "/view/events/events_view.php", array('images' => $img, 'title' => $event->post_title, 'link' => $permalink), true);
    }
    // $img = get_the_post_thumbnail($events['ID']);
    /*$parser->parse(GENERATOR_THEME_DIR . "/view/.php", array(), true);*/
    // prn($img);
    // prn($events);
}
Exemplo n.º 2
0
function reviews_home_short()
{
    $parser = new Parser_generator_theme();
    $gen = new gen_theme();
    // $res = $gen->get_reviews_one();
    $res = $gen->get_reviews();
    $kol = $gen->get_all_reviews();
    $ending = get_ending($kol);
    // prn($res);
    $parser->parse(GENERATOR_THEME_DIR . "/view/reviews/reviews_block_view.php", array('text' => $res[0]->text_reviews, 'fio' => $res[0]->fio, 'name' => $res[0]->name, 'link' => $res[0]->link, 'kol_reviews' => $kol, 'ending' => $ending, 'count-rev' => 0), true);
}