Habari\AdminCommentsHandler::ajax_comments PHP Метод

ajax_comments() публичный Метод

Handles AJAX requests from the manage comments page.
public ajax_comments ( )
    public function ajax_comments()
    {
        Utils::check_request_method(array('GET', 'HEAD'));
        $this->create_theme();
        $this->theme->theme = $this->theme;
        $params = $_GET;
        $this->fetch_comments($params);
        $items = $this->theme->fetch('comments_items');
        $timeline = $this->theme->fetch('timeline_items');
        $item_ids = array();
        foreach ($this->theme->comments as $comment) {
            $item_ids['p' . $comment->id] = 1;
        }
        $ar = new AjaxResponse();
        $ar->data = array('items' => $items, 'item_ids' => $item_ids, 'timeline' => $timeline);
        $ar->out();
    }