From c934ccc17c7d0cbb7c784a58cf5d7df568654c40 Mon Sep 17 00:00:00 2001 From: Aram Kocharyan Date: Sun, 4 May 2014 11:19:30 +1000 Subject: [PATCH] Cleanup and more descriptive errors. Loaded settings when needed in init_tags_regex. --- crayon_fonts.class.php | 2 +- crayon_langs.class.php | 2 +- crayon_settings_wp.class.php | 145 ++++++++++++++++++----------------- crayon_themes.class.php | 2 +- crayon_wp.class.php | 1 + 5 files changed, 77 insertions(+), 75 deletions(-) diff --git a/crayon_fonts.class.php b/crayon_fonts.class.php index a1b9f2d2..4995d955 100644 --- a/crayon_fonts.class.php +++ b/crayon_fonts.class.php @@ -26,7 +26,7 @@ function __construct() { CrayonLog::debug($this->user_directory(), "FONT USER DIR"); } } else { - CrayonLog::syslog("Upload directory is empty: " . $upload); + CrayonLog::syslog("Upload directory is empty: " . $upload . " cannot load fonts."); } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); diff --git a/crayon_langs.class.php b/crayon_langs.class.php index 64bd24e7..651f55c8 100644 --- a/crayon_langs.class.php +++ b/crayon_langs.class.php @@ -40,7 +40,7 @@ public function __construct() { CrayonLog::debug($this->user_directory(), "LANG USER DIR"); } } else { - CrayonLog::syslog("Upload directory is empty: " . $upload); + CrayonLog::syslog("Upload directory is empty: " . $upload . " cannot load languages."); } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); diff --git a/crayon_settings_wp.class.php b/crayon_settings_wp.class.php index 39f27562..bcd19f30 100644 --- a/crayon_settings_wp.class.php +++ b/crayon_settings_wp.class.php @@ -1,13 +1,14 @@ - + -
+
-
-
-
-

- Crayon Syntax Highlighter - -

- -
- - - - -

- +
+

+

+ Crayon Syntax Highlighter + +

+ + + + + + +

+ -

- -
- -
+ ?>"/> + +

+ + + +
', @@ -1024,18 +1025,18 @@ public static function theme($editor = FALSE) { } // Preview Box ?> -
-
-
-
-
-
- ', '', '', ''); ?> +
+
+
+
+
+
+ ', '', '', ''); ?> +
-
- '; @@ -1208,23 +1209,23 @@ public static function info() { $date = $CRAYON_DATE; $developer = '' . crayon__('Developer') . ': ' . '' . $CRAYON_AUTHOR . ''; $translators = '' . crayon__('Translators') . ': ' . - ' - Arabic (Djennad Hamza), - Chinese (Dezhi Liu, Jash Yin), - Dutch (Robin Roelofsen, Chilion Snoek), - French (Victor Felder), - German (Stephan Knauß), - Italian (Federico Bellucci), - Japanese (@west_323), - Korean (dokenzy), - Lithuanian (Vincent G), - Polish (Bartosz Romanowski), - Portuguese (Adonai S. Canez), - Slovak (http://webhostinggeeks.com/), - Slovenian (Jan Sušnik), - Russian (Minimus, Di_Skyer), - Spanish (Hermann Bravo), - Turkish (Hakan)'; + ' + Arabic (Djennad Hamza), + Chinese (Dezhi Liu, Jash Yin), + Dutch (Robin Roelofsen, Chilion Snoek), + French (Victor Felder), + German (Stephan Knauß), + Italian (Federico Bellucci), + Japanese (@west_323), + Korean (dokenzy), + Lithuanian (Vincent G), + Polish (Bartosz Romanowski), + Portuguese (Adonai S. Canez), + Slovak (http://webhostinggeeks.com/), + Slovenian (Jan Sušnik), + Russian (Minimus, Di_Skyer), + Spanish (Hermann Bravo), + Turkish (Hakan)'; $links = ' diff --git a/crayon_themes.class.php b/crayon_themes.class.php index 44b8a237..a4520188 100644 --- a/crayon_themes.class.php +++ b/crayon_themes.class.php @@ -29,7 +29,7 @@ function __construct() { CrayonLog::debug($this->user_directory(), "THEME USER DIR"); } } else { - CrayonLog::syslog("Upload directory is empty: " . $upload); + CrayonLog::syslog("Upload directory is empty: " . $upload . " cannot load themes."); } CrayonLog::debug($this->directory()); CrayonLog::debug($this->user_directory()); diff --git a/crayon_wp.class.php b/crayon_wp.class.php index b2cf6279..032e09f6 100644 --- a/crayon_wp.class.php +++ b/crayon_wp.class.php @@ -547,6 +547,7 @@ public static function enqueue_resources() { } private static function init_tags_regex($force = FALSE, $flags = NULL, &$tags_regex = NULL) { + CrayonSettingsWP::load_settings(); self::init_tag_bits(); // Default output