private static function _get_arrow_pagination($data)
 {
     global $wp_query, $paged;
     $old_query = clone $wp_query;
     $query = Upfront_Posts_Model::spawn_query($data);
     if (empty($query)) {
         return '';
     }
     $wp_query = $query;
     $paged = get_query_var('paged');
     $pagination = get_posts_nav_link();
     $wp_query = $old_query;
     return $pagination;
 }
Exemplo n.º 2
0
 public function load_meta()
 {
     $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'];
     }
     $fields = Upfront_Posts_Model::get_meta_fields($data);
     $this->_out(new Upfront_JsonResponse_Success(array('fields' => $fields)));
 }