Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. public function compileFile($fname, $outFname = null) { if (!is_readable($fname)) { throw new Exception('load error: failed to find '.$fname); } $pi = pathinfo($fname); $oldImport = $this->importDir; $this->importDir = (array)$this->importDir; $this->importDir[] = $pi['dirname'].'/'; $this->addParsedFile($fname); $out = $this->compile(file_get_contents($fname), $fname); $this->importDir
  2. = $oldImport; if ($outFname !== null) { return file_put_contents($outFname, $out); } return $out; }
  3.  
  4. protected function configurePath() {
  5. $target_file = $this->computeTargetPath();
  6.  
  7. $this->source_path = WP_CONTENT_DIR.preg_replace('#^'.content_url().'#U', '', $this->stylesheet->src);
  8. $this->source_uri = $this->stylesheet->src;
  9. $this->target_path = self::$upload_dir.$target_file;
  10. $this->target_uri = self::$upload_uri.$target_file;
  11.  
  12. $this->setSourceTimestamp(filemtime($this->source_path)); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement