Example #1
0
 /**
  * Set the filtered points
  *
  * @since Jobify 1.0
  *
  * @return void
  */
 function jobify_json_ajax_points()
 {
     global $job_manager, $wpdb;
     $search_location = sanitize_text_field(stripslashes($_POST['search_location']));
     $search_keywords = sanitize_text_field(stripslashes($_POST['search_keywords']));
     $search_category = isset($_POST['search_category']) ? sanitize_text_field(stripslashes($_POST['search_category'])) : '';
     $map = new self(array('search_location' => $search_location, 'search_keywords' => $search_keywords, 'search_categories' => $search_category));
     $points = $map->json_points();
     echo json_encode($points);
     die(0);
 }