Example #1
0
 public static function initStrings()
 {
     if (self::$strings === NULL) {
         self::$strings = array('userTheme' => crayon__("User-Defined Theme"), 'stockTheme' => crayon__("Stock Theme"), 'success' => crayon__("Success!"), 'fail' => crayon__("Failed!"), 'delete' => crayon__("Delete"), 'deleteThemeConfirm' => crayon__("Are you sure you want to delete the \"%s\" theme?"), 'deleteFail' => crayon__("Delete failed!"), 'duplicate' => crayon__("Duplicate"), 'newName' => crayon__("New Name"), 'duplicateFail' => crayon__("Duplicate failed!"), 'checkLog' => crayon__("Please check the log for details."), 'discardConfirm' => crayon__("Are you sure you want to discard all changes?"), 'editingTheme' => crayon__("Editing Theme: %s"), 'creatingTheme' => crayon__("Creating Theme: %s"), 'submit' => crayon__("Submit Your Theme"), 'submitText' => crayon__("Submit your User Theme for inclusion as a Stock Theme in Crayon! This will email me your theme - make sure it's considerably different from the stock themes :)"), 'message' => crayon__("Message"), 'submitMessage' => crayon__("Please include this theme in Crayon!"), 'submitSucceed' => crayon__("Submit was successful."), 'submitFail' => crayon__("Submit failed!"), 'borderStyles' => CrayonHTMLElement::$borderStyles);
     }
 }
 public static function init_js_settings()
 {
     // TODO Create a global CrayonSyntaxSettings object here
     self::load_settings(TRUE);
     if (!self::$js_settings) {
         self::$js_settings = array('prefix' => CrayonSettings::PREFIX, 'setting' => CrayonSettings::SETTING, 'selected' => CrayonSettings::SETTING_SELECTED, 'changed' => CrayonSettings::SETTING_CHANGED, 'special' => CrayonSettings::SETTING_SPECIAL, 'orig_value' => CrayonSettings::SETTING_ORIG_VALUE);
     }
     wp_localize_script('crayon_admin_js', 'CrayonSyntaxSettings', self::$js_settings);
     CrayonThemeEditorWP::admin_scripts();
 }