freaking commit messages

This commit is contained in:
Darko Luketic 2021-11-29 13:33:06 +01:00
parent 916cef6006
commit 63a8476f37
4 changed files with 72 additions and 97 deletions

View File

@ -412,7 +412,7 @@ class CrayonLang extends CrayonVersionResource {
if (array_key_exists($name, $this->elements) && $element === NULL) { if (array_key_exists($name, $this->elements) && $element === NULL) {
return $this->elements[$name]; return $this->elements[$name];
} else if (is_object($element)) { } else if (is_object($element)) {
if (@get_class($element) == CRAYON_ELEMENT_CLASS) { if (get_class($element) == CRAYON_ELEMENT_CLASS) {
$this->elements[$name] = $element; $this->elements[$name] = $element;
} }
} }

View File

@ -914,5 +914,3 @@ class CrayonSetting {
} }
} }
?>

View File

@ -744,7 +744,7 @@ class CrayonSettingsWP
// General Fields ========================================================= // General Fields =========================================================
public static function help() public static function help()
{ {
global $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT, $CRAYON_PLUGIN_WP, $CRAYON_DONATE; global $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT;
if (CrayonGlobalSettings::val(CrayonSettings::HIDE_HELP)) { if (CrayonGlobalSettings::val(CrayonSettings::HIDE_HELP)) {
return; return;
} }
@ -1244,7 +1244,7 @@ class Human {
// About Fields =========================================================== // About Fields ===========================================================
public static function info() { public static function info() {
global $CRAYON_VERSION, $CRAYON_DATE, $CRAYON_AUTHOR, $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT, $CRAYON_PLUGIN_WP, $CRAYON_AUTHOR_SITE, $CRAYON_EMAIL, $CRAYON_DONATE; global $CRAYON_VERSION, $CRAYON_DATE, $CRAYON_AUTHOR, $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT, $CRAYON_AUTHOR_SITE, $CRAYON_EMAIL;
echo '<a name="info"></a>'; echo '<a name="info"></a>';
$version = '<strong>' . crayon__('Version') . ':</strong> ' . $CRAYON_VERSION; $version = '<strong>' . crayon__('Version') . ':</strong> ' . $CRAYON_VERSION;
$date = $CRAYON_DATE; $date = $CRAYON_DATE;
@ -1274,16 +1274,6 @@ class Human {
Turkish (<a href="http://hakanertr.wordpress.com" target="_blank">Hakan</a>), Turkish (<a href="http://hakanertr.wordpress.com" target="_blank">Hakan</a>),
Ukrainian (<a href="http://getvoip.com/blog" target="_blank">Michael Yunat</a>)'; Ukrainian (<a href="http://getvoip.com/blog" target="_blank">Michael Yunat</a>)';
$links = '
<a id="docs-icon" class="small-icon" title="Documentation" href="' . $CRAYON_WEBSITE . '" target="_blank"></a>
<a id="git-icon" class="small-icon" title="GitHub" href="' . $CRAYON_GIT . '" target="_blank"></a>
<a id="wp-icon" class="small-icon" title="Plugin Page" href="' . $CRAYON_PLUGIN_WP . '" target="_blank"></a>
<a id="twitter-icon" class="small-icon" title="Twitter" href="' . $CRAYON_TWITTER . '" target="_blank"></a>
<a id="gmail-icon" class="small-icon" title="Email" href="mailto:' . $CRAYON_EMAIL . '" target="_blank"></a>
<div id="crayon-donate"><a href="' . $CRAYON_DONATE . '" title="Donate" target="_blank">
<img src="' . plugins_url(CRAYON_DONATE_BUTTON, __FILE__) . '"></a>
</div>';
echo ' echo '
<table id="crayon-info" border="0"> <table id="crayon-info" border="0">
<tr> <tr>
@ -1294,9 +1284,6 @@ class Human {
</tr> </tr>
<tr> <tr>
<td>' . $translators . '</td> <td>' . $translators . '</td>
</tr>
<tr>
<td colspan="2">' . $links . '</td>
</tr> </tr>
</table>'; </table>';
@ -1309,11 +1296,9 @@ class Human {
public static function plugin_row_meta($meta, $file) public static function plugin_row_meta($meta, $file)
{ {
global $CRAYON_DONATE;
if ($file == CrayonWP::basename()) { if ($file == CrayonWP::basename()) {
$meta[] = '<a href="options-general.php?page=crayon_settings">' . crayon__('Settings') . '</a>'; $meta[] = '<a href="options-general.php?page=crayon_settings">' . crayon__('Settings') . '</a>';
$meta[] = '<a href="options-general.php?page=crayon_settings&theme-editor=1">' . crayon__('Theme Editor') . '</a>'; $meta[] = '<a href="options-general.php?page=crayon_settings&theme-editor=1">' . crayon__('Theme Editor') . '</a>';
$meta[] = '<a href="' . $CRAYON_DONATE . '" target="_blank">' . crayon__('Donate') . '</a>';
} }
return $meta; return $meta;
} }

View File

@ -1,35 +1,33 @@
<?php <?php
// Switches // Switches
define('CRAYON_DEBUG', FALSE); const CRAYON_DEBUG = FALSE;
define('CRAYON_TAG_EDITOR', TRUE); const CRAYON_TAG_EDITOR = TRUE;
define('CRAYON_THEME_EDITOR', TRUE); const CRAYON_THEME_EDITOR = TRUE;
define('CRAYON_MINIFY', TRUE); const CRAYON_MINIFY = TRUE;
// Constants // Constants
// General definitions // General definitions
define('CRAYON_DOMAIN', 'crayon-syntax-highlighter'); const CRAYON_DOMAIN = 'crayon-syntax-highlighter';
// These are overridden by functions since v1.1.1 // These are overridden by functions since v1.1.1
$CRAYON_VERSION = '1.1.1'; $CRAYON_VERSION = '2.8.6';
$CRAYON_DATE = '27th September, 2011'; $CRAYON_DATE = '29th November, 2021';
$CRAYON_AUTHOR = 'Aram Kocharyan'; $CRAYON_AUTHOR = 'Darko Luketic';
$CRAYON_AUTHOR_SITE = 'http://aramk.com'; $CRAYON_AUTHOR_SITE = 'https://icod.de';
$CRAYON_DONATE = 'http://bit.ly/crayondonate'; $CRAYON_WEBSITE = 'https://git.icod.de/dalu/crayon-syntax-highlighter';
$CRAYON_WEBSITE = 'https://github.com/aramk/crayon-syntax-highlighter'; $CRAYON_EMAIL = 'redacted@redacted';
$CRAYON_EMAIL = 'crayon.syntax@gmail.com';
$CRAYON_TWITTER = 'http://twitter.com/crayonsyntax'; $CRAYON_TWITTER = 'http://twitter.com/crayonsyntax';
$CRAYON_GIT = 'http://github.com/aramk/crayon-syntax-highlighter'; $CRAYON_GIT = 'https://git.icod.de/dalu/crayon-syntax-highlighter';
$CRAYON_PLUGIN_WP = 'https://wordpress.org/plugins/crayon-syntax-highlighter/';
// XXX Used to name the class // XXX Used to name the class
define('CRAYON_HIGHLIGHTER', 'CrayonHighlighter'); const CRAYON_HIGHLIGHTER = 'CrayonHighlighter';
define('CRAYON_ELEMENT_CLASS', 'CrayonElement'); const CRAYON_ELEMENT_CLASS = 'CrayonElement';
define('CRAYON_SETTING_CLASS', 'CrayonSetting'); const CRAYON_SETTING_CLASS = 'CrayonSetting';
// Directories // Directories
@ -51,82 +49,78 @@ define('CRAYON_TAG_EDITOR_DIR', crayon_s('tag-editor'));
// Paths // Paths
define('CRAYON_ROOT_PATH', crayon_pf(dirname(__FILE__))); define('CRAYON_ROOT_PATH', crayon_pf(dirname(__FILE__)));
define('CRAYON_LANG_PATH', CRAYON_ROOT_PATH . CRAYON_LANG_DIR); const CRAYON_LANG_PATH = CRAYON_ROOT_PATH . CRAYON_LANG_DIR;
define('CRAYON_THEME_PATH', CRAYON_ROOT_PATH . CRAYON_THEME_DIR); const CRAYON_THEME_PATH = CRAYON_ROOT_PATH . CRAYON_THEME_DIR;
define('CRAYON_FONT_PATH', CRAYON_ROOT_PATH . CRAYON_FONT_DIR); const CRAYON_FONT_PATH = CRAYON_ROOT_PATH . CRAYON_FONT_DIR;
define('CRAYON_UTIL_PATH', CRAYON_ROOT_PATH . CRAYON_UTIL_DIR); const CRAYON_UTIL_PATH = CRAYON_ROOT_PATH . CRAYON_UTIL_DIR;
define('CRAYON_TAG_EDITOR_PATH', CRAYON_ROOT_PATH . CRAYON_UTIL_DIR . CRAYON_TAG_EDITOR_DIR); const CRAYON_TAG_EDITOR_PATH = CRAYON_ROOT_PATH . CRAYON_UTIL_DIR . CRAYON_TAG_EDITOR_DIR;
define('CRAYON_THEME_EDITOR_PATH', CRAYON_ROOT_PATH . CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR); const CRAYON_THEME_EDITOR_PATH = CRAYON_ROOT_PATH . CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR;
// Files // Files
define('CRAYON_LOG_FILE', CRAYON_ROOT_PATH . 'log.txt'); const CRAYON_LOG_FILE = CRAYON_ROOT_PATH . 'log.txt';
define('CRAYON_TOUCH_FILE', CRAYON_UTIL_PATH . 'touch.txt'); const CRAYON_TOUCH_FILE = CRAYON_UTIL_PATH . 'touch.txt';
define('CRAYON_LOG_MAX_SIZE', 50000); // Bytes const CRAYON_LOG_MAX_SIZE = 50000; // Bytes
define('CRAYON_README_FILE', CRAYON_ROOT_PATH . 'readme.txt'); const CRAYON_LANG_EXT = CRAYON_LANG_PATH . 'extensions.txt';
define('CRAYON_LANG_EXT', CRAYON_LANG_PATH . 'extensions.txt'); const CRAYON_LANG_ALIAS = CRAYON_LANG_PATH . 'aliases.txt';
define('CRAYON_LANG_ALIAS', CRAYON_LANG_PATH . 'aliases.txt'); const CRAYON_LANG_DELIM = CRAYON_LANG_PATH . 'delimiters.txt';
define('CRAYON_LANG_DELIM', CRAYON_LANG_PATH . 'delimiters.txt');
define('CRAYON_HELP_FILE', CRAYON_UTIL_PATH . 'help.htm');
// Minified // Minified
define('CRAYON_JS_MIN', CRAYON_JS_MIN_DIR . 'crayon.min.js'); const CRAYON_JS_MIN = CRAYON_JS_MIN_DIR . 'crayon.min.js';
define('CRAYON_JS_TE_MIN', CRAYON_JS_MIN_DIR . 'crayon.te.min.js'); const CRAYON_JS_TE_MIN = CRAYON_JS_MIN_DIR . 'crayon.te.min.js';
// Source // Source
define('CRAYON_JQUERY_POPUP', CRAYON_JS_SRC_DIR . 'jquery.popup.js'); const CRAYON_JQUERY_POPUP = CRAYON_JS_SRC_DIR . 'jquery.popup.js';
define('CRAYON_JS', CRAYON_JS_SRC_DIR . 'crayon.js'); const CRAYON_JS = CRAYON_JS_SRC_DIR . 'crayon.js';
define('CRAYON_JS_ADMIN', CRAYON_JS_SRC_DIR . 'crayon_admin.js'); const CRAYON_JS_ADMIN = CRAYON_JS_SRC_DIR . 'crayon_admin.js';
define('CRAYON_JS_UTIL', CRAYON_JS_SRC_DIR . 'util.js'); const CRAYON_JS_UTIL = CRAYON_JS_SRC_DIR . 'util.js';
define('CRAYON_CSSJSON_JS', CRAYON_JS_SRC_DIR . 'cssjson.js'); const CRAYON_CSSJSON_JS = CRAYON_JS_SRC_DIR . 'cssjson.js';
define('CRAYON_CSS_JQUERY_COLORPICKER', CRAYON_JS_DIR . 'jquery-colorpicker/jquery.colorpicker.css'); const CRAYON_CSS_JQUERY_COLORPICKER = CRAYON_JS_DIR . 'jquery-colorpicker/jquery.colorpicker.css';
define('CRAYON_JS_JQUERY_COLORPICKER', CRAYON_JS_DIR . 'jquery-colorpicker/jquery.colorpicker.js'); const CRAYON_JS_JQUERY_COLORPICKER = CRAYON_JS_DIR . 'jquery-colorpicker/jquery.colorpicker.js';
define('CRAYON_JS_TINYCOLOR', CRAYON_JS_DIR . 'tinycolor-min.js'); const CRAYON_JS_TINYCOLOR = CRAYON_JS_DIR . 'tinycolor-min.js';
define('CRAYON_TAG_EDITOR_JS', 'crayon_tag_editor.js'); const CRAYON_TAG_EDITOR_JS = 'crayon_tag_editor.js';
define('CRAYON_COLORBOX_JS', 'colorbox/jquery.colorbox-min.js'); const CRAYON_COLORBOX_JS = 'colorbox/jquery.colorbox-min.js';
define('CRAYON_COLORBOX_CSS', 'colorbox/colorbox.css'); const CRAYON_COLORBOX_CSS = 'colorbox/colorbox.css';
define('CRAYON_TAG_EDITOR_PHP', CRAYON_TAG_EDITOR_PATH . 'crayon_tag_editor_wp.class.php'); const CRAYON_TAG_EDITOR_PHP = CRAYON_TAG_EDITOR_PATH . 'crayon_tag_editor_wp.class.php';
define('CRAYON_TINYMCE_JS', 'crayon_tinymce.js'); const CRAYON_TINYMCE_JS = 'crayon_tinymce.js';
define('CRAYON_QUICKTAGS_JS', 'crayon_qt.js'); const CRAYON_QUICKTAGS_JS = 'crayon_qt.js';
define('CRAYON_STYLE', CRAYON_CSS_SRC_DIR . 'crayon_style.css'); const CRAYON_STYLE = CRAYON_CSS_SRC_DIR . 'crayon_style.css';
define('CRAYON_STYLE_ADMIN', CRAYON_CSS_SRC_DIR . 'admin_style.css'); const CRAYON_STYLE_ADMIN = CRAYON_CSS_SRC_DIR . 'admin_style.css';
define('CRAYON_STYLE_GLOBAL', CRAYON_CSS_SRC_DIR . 'global_style.css'); const CRAYON_STYLE_GLOBAL = CRAYON_CSS_SRC_DIR . 'global_style.css';
define('CRAYON_STYLE_MIN', CRAYON_CSS_MIN_DIR . 'crayon.min.css'); const CRAYON_STYLE_MIN = CRAYON_CSS_MIN_DIR . 'crayon.min.css';
define('CRAYON_LOGO', CRAYON_CSS_DIR . 'images/crayon_logo.png'); const CRAYON_LOGO = CRAYON_CSS_DIR . 'images/crayon_logo.png';
define('CRAYON_DONATE_BUTTON', CRAYON_CSS_DIR . 'images/donate.png'); const CRAYON_THEME_EDITOR_PHP = CRAYON_THEME_EDITOR_PATH . 'theme_editor.php';
define('CRAYON_THEME_EDITOR_PHP', CRAYON_THEME_EDITOR_PATH . 'theme_editor.php'); const CRAYON_THEME_EDITOR_JS = CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR . 'theme_editor.js';
define('CRAYON_THEME_EDITOR_JS', CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR . 'theme_editor.js'); const CRAYON_THEME_EDITOR_STYLE = CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR . 'theme_editor.css';
define('CRAYON_THEME_EDITOR_STYLE', CRAYON_UTIL_DIR . CRAYON_THEME_EDITOR_DIR . 'theme_editor.css');
define('CRAYON_THEME_EDITOR_BUTTON', CRAYON_CSS_DIR . 'images/theme_editor.png');
// PHP Files // PHP Files
define('CRAYON_FORMATTER_PHP', CRAYON_ROOT_PATH . 'crayon_formatter.class.php'); const CRAYON_FORMATTER_PHP = CRAYON_ROOT_PATH . 'crayon_formatter.class.php';
define('CRAYON_HIGHLIGHTER_PHP', CRAYON_ROOT_PATH . 'crayon_highlighter.class.php'); const CRAYON_HIGHLIGHTER_PHP = CRAYON_ROOT_PATH . 'crayon_highlighter.class.php';
define('CRAYON_LANGS_PHP', CRAYON_ROOT_PATH . 'crayon_langs.class.php'); const CRAYON_LANGS_PHP = CRAYON_ROOT_PATH . 'crayon_langs.class.php';
define('CRAYON_PARSER_PHP', CRAYON_ROOT_PATH . 'crayon_parser.class.php'); const CRAYON_PARSER_PHP = CRAYON_ROOT_PATH . 'crayon_parser.class.php';
define('CRAYON_SETTINGS_PHP', CRAYON_ROOT_PATH . 'crayon_settings.class.php'); const CRAYON_SETTINGS_PHP = CRAYON_ROOT_PATH . 'crayon_settings.class.php';
define('CRAYON_THEMES_PHP', CRAYON_ROOT_PATH . 'crayon_themes.class.php'); const CRAYON_THEMES_PHP = CRAYON_ROOT_PATH . 'crayon_themes.class.php';
define('CRAYON_FONTS_PHP', CRAYON_ROOT_PATH . 'crayon_fonts.class.php'); const CRAYON_FONTS_PHP = CRAYON_ROOT_PATH . 'crayon_fonts.class.php';
define('CRAYON_RESOURCE_PHP', CRAYON_ROOT_PATH . 'crayon_resource.class.php'); const CRAYON_RESOURCE_PHP = CRAYON_ROOT_PATH . 'crayon_resource.class.php';
define('CRAYON_UTIL_PHP', CRAYON_UTIL_DIR . 'crayon_util.class.php'); const CRAYON_UTIL_PHP = CRAYON_UTIL_DIR . 'crayon_util.class.php';
define('CRAYON_TIMER_PHP', CRAYON_UTIL_DIR . 'crayon_timer.class.php'); const CRAYON_TIMER_PHP = CRAYON_UTIL_DIR . 'crayon_timer.class.php';
define('CRAYON_LOG_PHP', CRAYON_UTIL_DIR . 'crayon_log.class.php'); const CRAYON_LOG_PHP = CRAYON_UTIL_DIR . 'crayon_log.class.php';
// Script time // Script time
define('CRAYON_LOAD_TIME', 'Load Time'); const CRAYON_LOAD_TIME = 'Load Time';
//define('CRAYON_PARSE_TIME', 'Parse Time'); //define('CRAYON_PARSE_TIME', 'Parse Time');
define('CRAYON_FORMAT_TIME', 'Format Time'); const CRAYON_FORMAT_TIME = 'Format Time';
// Printing // Printing
define('CRAYON_BR', "<br />"); const CRAYON_BR = "<br />";
define('CRAYON_NL', "\r\n"); const CRAYON_NL = "\r\n";
define('CRAYON_BL', CRAYON_BR . CRAYON_NL); const CRAYON_BL = CRAYON_BR . CRAYON_NL;
define('CRAYON_DASH', "=============================================================================="); const CRAYON_DASH = "==============================================================================";
define('CRAYON_LINE', "------------------------------------------------------------------------------"); const CRAYON_LINE = "------------------------------------------------------------------------------";
// Load utilities // Load utilities
@ -246,5 +240,3 @@ function crayon_x($text, $context) {
return $text; return $text;
} }
} }
?>