Example #1
0
 static function ajax_delete()
 {
     ob_start();
     $mapid = isset($_POST['mapid']) ? $_POST['mapid'] : null;
     $result = Mappress_Map::delete($mapid);
     if (!$result) {
         Mappress::ajax_response("Internal error when deleting map ID '{$mapid}'!");
     }
     do_action('mappress_map_delete', $mapid);
     // Use for your own developments
     Mappress::ajax_response('OK', array('mapid' => $mapid));
 }