You are here

function osmplayer_clear_css in MediaFront 7

Same name and namespace in other branches
  1. 6.2 players/osmplayer/osmplayer.module \osmplayer_clear_css()
  2. 6 players/osmplayer/osmplayer.module \osmplayer_clear_css()

Clears the osmplayer CSS directory.

1 call to osmplayer_clear_css()
mediafront_update_7005 in ./mediafront.install
Clear out all cached css files.

File

players/osmplayer/osmplayer.module, line 188

Code

function osmplayer_clear_css() {
  $css_dir = osmplayer_get_css_dir();
  if (is_dir($css_dir)) {
    if ($contents = opendir($css_dir)) {
      while (($node = readdir($contents)) !== false) {
        if ($node != "." && $node != "..") {
          $node = $css_dir . '/' . $node;
          if (is_file($node)) {
            unlink($node);
          }
        }
      }
    }
  }
}