Exemple #1
0
 public function load_posts()
 {
     $request = !empty($_POST['data']) ? stripslashes_deep($_POST['data']) : array();
     $data = !empty($request['props']) ? $this->to_data_array($request['props']) : array();
     if (!empty($request['query'])) {
         $data['query'] = $request['query'];
     }
     $this->_out(new Upfront_JsonResponse_Success(array('posts' => Upfront_Posts_PostsView::get_posts_markup($data), 'pagination' => Upfront_Posts_PostsView::get_pagination($data))));
 }