Reply To: SSL

Home Forums MapPress Support SSL Reply To: SSL



MapPress uses the WordPress wp_upload_dir() function to get the icons directory (a subdirectory of the uploads directory).

There are several WordPress tickets to add SSL for that function but none seem to have been implemented yet:

For now, you could try the ‘upload_dir’ filter (from WordPress file wp-includes\functions.php) to change the result of the wp_upload_dir() function. I haven’t tested it, but something like this might work (add it to your functions.php file):

function myfilter($uploads) {
  $uploads['baseurl'] = str_ireplace('http', 'https', $uploads['baseurl']);
  return $uploads;

add_filter('upload_dir', 'myfilter');

Alternatively, you could modify MapPress to hard-code SSL. Change this line in mappress_icons.php to set the correct URL:
$baseurl = $upload['baseurl'] . "/mappress";