https://www.mapsmarker.com/path-error for more details'); } include( 'wp-load.php' ); //info: check if plugin is active (didnt use is_plugin_active() due to problems reported by users) function lmm_is_plugin_active( $plugin ) { $active_plugins = get_option('active_plugins'); $active_plugins = array_flip($active_plugins); if ( isset($active_plugins[$plugin]) || lmm_is_plugin_active_for_network( $plugin ) ) { return true; } } function lmm_is_plugin_active_for_network( $plugin ) { if ( !is_multisite() ) return false; $plugins = get_site_option( 'active_sitewide_plugins'); if ( isset($plugins[$plugin]) ) return true; return false; } if (!lmm_is_plugin_active('leaflet-maps-marker/leaflet-maps-marker.php') ) { echo sprintf(__('The plugin "Leaflet Maps Marker" is inactive on this site and therefore this API link is not working.

Please contact the site owner (%1s) who can activate this plugin again.','lmm'), antispambot(get_bloginfo('admin_email')) ); } else { $lmm_options = get_option( 'leafletmapsmarker_options' ); if (isset($_GET['layer'])) { $url = LEAFLET_PLUGIN_URL . 'leaflet-fullscreen.php?layer=' . htmlspecialchars($_GET['layer']); } else if (isset($_GET['marker'])) { $url = LEAFLET_PLUGIN_URL . 'leaflet-fullscreen.php?marker=' . htmlspecialchars($_GET['marker']); } //info: visualead settings if ($lmm_options['qrcode_provider'] == 'visualead') { $api_url = 'https://api.visualead.com/v3/generate_from_project?api_key=22ecaee1-101a-4ee8-1bc0-0000584d2591&project_id=94819&qr_x=4&qr_y=5&qr_size=124&qr_rotation=0&output_type=1&action=url&content[url]='.$url.'&cells_type=1&markers_type=1'; $output = wp_remote_get( $api_url, array( 'sslverify' => false, 'timeout' => 10 ) ); $results = json_decode($output['body']); //$results = json_decode($output); if($results->response ==1){ $image_decoded= base64_decode($results->image); echo 'QR-Code'; echo '
'; } else { echo __('QR code could not be generated!','lmm') . '
'; echo 'Error ID: ' . $results->error_id . ' (' . $results->error . ')
'; echo sprintf(__('Please contact %1$s for more details','lmm'), 'api@visualead.com'); } //info: Google QR settings } else if ($lmm_options['qrcode_provider'] == 'google') { $google_qr_link = 'https://chart.googleapis.com/chart?chs=' . $lmm_options[ 'misc_qrcode_size' ] . 'x' . $lmm_options[ 'misc_qrcode_size' ] . '&cht=qr&chl=' . $url; echo ' '; } } //info: end plugin active check ?>