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)); }
function ajax_map_delete() { $mapid = isset($_POST['mapid']) ? $_POST['mapid'] : null; if (Mappress_Map::delete($mapid) === false) { $this->ajax_response(__("Internal error when deleting map ID '{$mapid}'!", 'mappress')); } else { do_action('mapp_map_delete', $mapid); // Use for your own developments $this->ajax_response('OK', $mapid); } }