You are here

function pwa_uninstall in Progressive Web App 7

Same name and namespace in other branches
  1. 8 pwa.install \pwa_uninstall()
  2. 7.2 pwa.install \pwa_uninstall()
  3. 2.x pwa.install \pwa_uninstall()

Implements hook_uninstall().

File

./pwa.install, line 67

Code

function pwa_uninstall() {

  // Remove variables.
  db_delete('variable')
    ->condition('name', 'pwa_%', 'LIKE')
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');

  // Delete manifest.json
  $scheme = file_default_scheme();
  $directory = $scheme . '://pwa';
  $path = $directory . '/manifest.json';
  file_unmanaged_delete($path);
}