public function get_markup() { $data = $this->_properties_to_array(); if (empty($data)) { $data = Upfront_Posts_PostsData::get_defaults(); } if (empty($data['display_type'])) { return ''; } // Force no render for unselected display type. return Upfront_Posts_PostsView::get_markup($data); }
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)))); }