' . __('Settings Saved.', 'aparg-watermark-and-resize') . '
'; } ?> false)); if ($movefile && !isset($movefile['error'])) { return $movefile; } else { return $movefile['error']; } } return ''; } /** * Set upload image dir and empty this folder */ function apwr_upload_dir($movefile) { $movefile['subdir'] = '/img'; $movefile['path'] = plugin_dir_path(__FILE__) . $movefile['subdir']; $movefile['url'] = plugins_url('aparg-watermark-and-resize') . $movefile['subdir']; $files = glob($movefile['path'] . DIRECTORY_SEPARATOR .'*'); foreach ($files as $file) { if (is_file($file)) if($file != $movefile['path'] . DIRECTORY_SEPARATOR .'index.html') unlink($file); } return $movefile; }