Settings'; // add the link to the list array_unshift($links, $settings_link); } return $links; } function enqueue_WP_GPX_Maps_scripts() { ?>
'; return $output; } function downloadRemoteFile($remoteFile) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $remoteFile); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); $resp = curl_exec($ch); curl_close($ch); $tmpfname = tempnam ( '/tmp', 'gpx' ); $fp = fopen($tmpfname, "w"); fwrite($fp, $resp); fclose($fp); return $tmpfname; } function unescape($value) { $value = str_replace("'", "\'", $value); $value = str_replace(array("\n","\r"), "", $value); return $value; } function WP_GPX_Maps_install() { add_option("wpgpxmaps_width", '100%', '', 'yes'); add_option("wpgpxmaps_graph_height", '200px', '', 'yes'); add_option("wpgpxmaps_height", '450px', '', 'yes'); add_option('wpgpxmaps_map_type','HYBRID','','yes'); add_option('wpgpxmaps_show_waypoint','','','yes'); add_option('wpgpxmaps_pointsoffset','10','','yes'); add_option('wpgpxmaps_donotreducegpx','true','','yes'); } function WP_GPX_Maps_remove() { delete_option('wpgpxmaps_width'); delete_option('wpgpxmaps_graph_height'); delete_option('wpgpxmaps_height'); delete_option('wpgpxmaps_map_type'); delete_option('wpgpxmaps_show_waypoint'); delete_option('wpgpxmaps_pointsoffset'); delete_option('wpgpxmaps_donotreducegpx'); } ?>