getPRO()) return; // MEC Settings $settings = $this->get_settings(); // The module is disabled if(isset($settings['qrcode_module_status']) and !$settings['qrcode_module_status']) return; $url = get_post_permalink($event->ID); if(isset($_REQUEST['occurrence'])) $url = $this->add_qs_var('occurrence', sanitize_text_field($_REQUEST['occurrence']), $url); $file_name = 'qr_'.md5($url).'.png'; $upload_dir = wp_upload_dir(); $file_path = $upload_dir['basedir'] .DS. 'mec' .DS. $file_name; $file = $this->getFile(); if(!$file->exists($file_path)) { if(!$file->exists(dirname($file_path))) { $folder = $this->getFolder(); $folder->create(dirname($file_path)); } $QRcode = $this->getQRcode(); $QRcode->png($url, $file_path, 'L', 4, 2); } $image_url = $upload_dir['baseurl'].'/mec/'.$file_name; ?>