WordPressを読む 87 /blog/wp-content/plugins/crayon-syntax-highlighter/crayon_fonts.class.php
/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_fonts.class.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <?php require_once ('global.php'); require_once (CRAYON_RESOURCE_PHP); /* Manages fonts once they are loaded. */ class CrayonFonts extends CrayonUserResourceCollection { // Properties and Constants =============================================== const DEFAULT_FONT = 'monaco'; const DEFAULT_FONT_NAME = 'Monaco'; // Methods ================================================================ function __construct() { $this->set_default(self::DEFAULT_FONT, self::DEFAULT_FONT_NAME); $this->directory(CRAYON_FONT_PATH); $this->relative_directory(CRAYON_FONT_DIR); $this->extension('css'); CrayonLog::debug("Setting font directories"); $upload = CrayonGlobalSettings::upload_path(); if ($upload) { $this->user_directory($upload . CRAYON_FONT_DIR); if (!is_dir($this->user_directory())) { CrayonGlobalSettings::mkdir($this->user_directory()); CrayonLog::debug($this->user_directory(), "FONT USER DIR"); } } else { CrayonLog::syslog("Upload directory is empty: " . $upload . " cannot load fonts."); } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); } } ?> |