You are here

function osmplayer_clear_css in MediaFront 6

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

Clears the osmplayer CSS directory.

4 calls to osmplayer_clear_css()
mediafront_update_6001 in ./mediafront.install
mediafront_update_6002 in ./mediafront.install
mediafront_update_6004 in ./mediafront.install
I know this is a crazy update, but there is a reason.
mediafront_update_6008 in ./mediafront.install
Remove all cached CSS files and clean up the paths in the mediafront presets.

File

players/osmplayer/osmplayer.module, line 191

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);
          }
        }
      }
    }
  }
}