= '3.3') {
add_action("load-$admin_page", 'CrayonSettingsWP::help_screen');
} else {
add_filter('contextual_help', 'CrayonSettingsWP::cont_help', 10, 3);
}
}
public static function admin_styles()
{
global $CRAYON_VERSION;
if (CRAYON_MINIFY) {
wp_enqueue_style('crayon', plugins_url(CRAYON_STYLE_MIN, __FILE__), array('editor-buttons'), $CRAYON_VERSION);
} else {
wp_enqueue_style('crayon', plugins_url(CRAYON_STYLE, __FILE__), array(), $CRAYON_VERSION);
wp_enqueue_style('crayon_global', plugins_url(CRAYON_STYLE_GLOBAL, __FILE__), array(), $CRAYON_VERSION);
wp_enqueue_style('crayon_admin', plugins_url(CRAYON_STYLE_ADMIN, __FILE__), array('editor-buttons'), $CRAYON_VERSION);
}
}
public static function admin_scripts()
{
global $CRAYON_VERSION;
if (CRAYON_MINIFY) {
CrayonWP::enqueue_resources();
} else {
wp_enqueue_script('crayon_util_js', plugins_url(CRAYON_JS_UTIL, __FILE__), array('jquery'), $CRAYON_VERSION);
self::other_scripts();
}
self::init_js_settings();
if (is_admin()) {
wp_enqueue_script('crayon_admin_js', plugins_url(CRAYON_JS_ADMIN, __FILE__), array('jquery', 'crayon_js', 'wpdialogs'), $CRAYON_VERSION);
self::init_admin_js_settings();
}
}
public static function other_scripts()
{
global $CRAYON_VERSION;
self::load_settings(TRUE);
$deps = array('jquery', 'crayon_util_js');
if (CrayonGlobalSettings::val(CrayonSettings::POPUP) || is_admin()) {
// TODO include anyway and minify
wp_enqueue_script('crayon_jquery_popup', plugins_url(CRAYON_JQUERY_POPUP, __FILE__), array('jquery'), $CRAYON_VERSION);
$deps[] = 'crayon_jquery_popup';
}
wp_enqueue_script('crayon_js', plugins_url(CRAYON_JS, __FILE__), $deps, $CRAYON_VERSION);
}
public static function init_js_settings()
{
// This stores JS variables used in AJAX calls and in the JS files
global $CRAYON_VERSION;
self::load_settings(TRUE);
if (!self::$js_settings) {
self::$js_settings = array(
'version' => $CRAYON_VERSION,
'is_admin' => intval(is_admin()),
'ajaxurl' => admin_url('admin-ajax.php'),
'prefix' => CrayonSettings::PREFIX,
'setting' => CrayonSettings::SETTING,
'selected' => CrayonSettings::SETTING_SELECTED,
'changed' => CrayonSettings::SETTING_CHANGED,
'special' => CrayonSettings::SETTING_SPECIAL,
'orig_value' => CrayonSettings::SETTING_ORIG_VALUE,
'debug' => CRAYON_DEBUG
);
}
if (!self::$js_strings) {
self::$js_strings = array(
'copy' => crayon__('Press %s to Copy, %s to Paste'),
'minimize' => crayon__('Click To Expand Code')
);
}
if (CRAYON_MINIFY) {
wp_localize_script('crayon_js', 'CrayonSyntaxSettings', self::$js_settings);
wp_localize_script('crayon_js', 'CrayonSyntaxStrings', self::$js_strings);
} else {
wp_localize_script('crayon_util_js', 'CrayonSyntaxSettings', self::$js_settings);
wp_localize_script('crayon_util_js', 'CrayonSyntaxStrings', self::$js_strings);
}
}
public static function init_admin_js_settings()
{
if (!self::$admin_js_settings) {
// We need to load themes at this stage
CrayonSettingsWP::load_settings();
$themes_ = CrayonResources::themes()->get();
$stockThemes = array();
$userThemes = array();
foreach ($themes_ as $theme) {
$id = $theme->id();
$name = $theme->name();
if ($theme->user()) {
$userThemes[$id] = $name;
} else {
$stockThemes[$id] = $name;
}
}
self::$admin_js_settings = array(
'themes' => array_merge($stockThemes, $userThemes),
'stockThemes' => $stockThemes,
'userThemes' => $userThemes,
'defaultTheme' => CrayonThemes::DEFAULT_THEME,
'themesURL' => CrayonResources::themes()->dirurl(false),
'userThemesURL' => CrayonResources::themes()->dirurl(true),
'sampleCode' => self::SAMPLE_CODE,
'dialogFunction' => 'wpdialog'
);
wp_localize_script('crayon_admin_js', 'CrayonAdminSettings', self::$admin_js_settings);
}
if (!self::$admin_js_strings) {
self::$admin_js_strings = array(
'prompt' => crayon__("Prompt"),
'value' => crayon__("Value"),
'alert' => crayon__("Alert"),
'no' => crayon__("No"),
'yes' => crayon__("Yes"),
'confirm' => crayon__("Confirm"),
'changeCode' => crayon__("Change Code")
);
wp_localize_script('crayon_admin_js', 'CrayonAdminStrings', self::$admin_js_strings);
}
}
public static function settings()
{
if (!current_user_can('manage_options')) {
wp_die(crayon__('You do not have sufficient permissions to access this page.'));
}
?>
Crayon Syntax Highlighter
load();
CrayonResources::themes()->load();
// Ensure all missing settings in db are replaced by default values
$changed = FALSE;
foreach (CrayonSettings::get_defaults_array() as $name => $value) {
// Add missing settings
if (!array_key_exists($name, self::$options)) {
self::$options[$name] = $value;
$changed = TRUE;
}
}
// A setting was missing, update options
if ($changed) {
update_option(self::OPTIONS, self::$options);
}
self::$is_fully_loaded = TRUE;
}
}
public static function get_settings()
{
return get_option(self::OPTIONS);
}
// Saves settings from CrayonGlobalSettings, or provided array, to the db
public static function save_settings($settings = NULL)
{
if ($settings === NULL) {
$settings = CrayonGlobalSettings::get_array();
}
update_option(self::OPTIONS, $settings);
}
// Crayon posts
/**
* This loads the posts marked as containing Crayons
*/
public static function load_posts()
{
if (self::$crayon_posts === NULL) {
// Load from db
if (!(self::$crayon_posts = get_option(self::POSTS))) {
// Posts don't exist! Scan for them. This will fill self::$crayon_posts
self::$crayon_posts = CrayonWP::scan_posts();
update_option(self::POSTS, self::$crayon_posts);
}
}
return self::$crayon_posts;
}
/**
* This looks through all posts and marks those which contain Crayons
*/
// public static function scan_and_save_posts() {
// self::save_posts(CrayonWP::scan_posts(TRUE, TRUE));
// }
/**
* Saves the marked posts to the db
*/
public static function save_posts($posts = NULL)
{
if ($posts === NULL) {
$posts = self::$crayon_posts;
}
update_option(self::POSTS, $posts);
self::load_posts();
}
/**
* Adds a post as containing a Crayon
*/
public static function add_post($id, $save = TRUE)
{
self::load_posts();
if (!in_array($id, self::$crayon_posts)) {
self::$crayon_posts[] = $id;
}
if ($save) {
self::save_posts();
}
}
/**
* Removes a post as not containing a Crayon
*/
public static function remove_post($id, $save = TRUE)
{
self::load_posts();
$key = array_search($id, self::$crayon_posts);
if ($key === false) {
return;
}
unset(self::$crayon_posts[$key]);
if ($save) {
self::save_posts();
}
}
public static function remove_posts()
{
self::$crayon_posts = array();
self::save_posts();
}
// Crayon legacy posts
/**
* This loads the posts marked as containing Crayons
*/
public static function load_legacy_posts($force = FALSE)
{
if (self::$crayon_legacy_posts === NULL || $force) {
// Load from db
if (!(self::$crayon_legacy_posts = get_option(self::LEGACY_POSTS))) {
// Posts don't exist! Scan for them. This will fill self::$crayon_legacy_posts
self::$crayon_legacy_posts = CrayonWP::scan_legacy_posts();
update_option(self::LEGACY_POSTS, self::$crayon_legacy_posts);
}
}
return self::$crayon_legacy_posts;
}
/**
* This looks through all posts and marks those which contain Crayons
*/
// public static function scan_and_save_posts() {
// self::save_posts(CrayonWP::scan_posts(TRUE, TRUE));
// }
/**
* Saves the marked posts to the db
*/
public static function save_legacy_posts($posts = NULL)
{
if ($posts === NULL) {
$posts = self::$crayon_legacy_posts;
}
update_option(self::LEGACY_POSTS, $posts);
self::load_legacy_posts();
}
/**
* Adds a post as containing a Crayon
*/
public static function add_legacy_post($id, $save = TRUE)
{
self::load_legacy_posts();
if (!in_array($id, self::$crayon_legacy_posts)) {
self::$crayon_legacy_posts[] = $id;
}
if ($save) {
self::save_legacy_posts();
}
}
/**
* Removes a post as not containing a Crayon
*/
public static function remove_legacy_post($id, $save = TRUE)
{
self::load_legacy_posts();
$key = array_search($id, self::$crayon_legacy_posts);
if ($key === false) {
return;
}
unset(self::$crayon_legacy_posts[$key]);
if ($save) {
self::save_legacy_posts();
}
}
public static function remove_legacy_posts()
{
self::$crayon_legacy_posts = array();
self::save_legacy_posts();
}
// Cache
public static function add_cache($name)
{
self::load_cache();
if (!in_array($name, self::$cache)) {
self::$cache[] = $name;
}
self::save_cache();
}
public static function remove_cache($name)
{
self::load_cache();
$key = array_search($name, self::$cache);
if ($key === false) {
return;
}
unset(self::$cache[$key]);
self::save_cache();
}
public static function clear_cache()
{
self::load_cache();
foreach (self::$cache as $name) {
delete_transient($name);
}
self::$cache = array();
self::save_cache();
}
public static function load_cache()
{
// Load cache from db
if (!(self::$cache = get_option(self::CACHE))) {
self::$cache = array();
update_option(self::CACHE, self::$cache);
}
}
public static function save_cache()
{
update_option(self::CACHE, self::$cache);
self::load_cache();
}
// Paths
public static function admin_init()
{
// Load default settings if they don't exist
self::load_settings();
// General
// Some of these will the $editor arguments, if TRUE it will alter for use in the Tag Editor
self::add_section(self::GENERAL, crayon__('General'));
self::add_field(self::GENERAL, crayon__('Theme'), 'theme');
self::add_field(self::GENERAL, crayon__('Font'), 'font');
self::add_field(self::GENERAL, crayon__('Metrics'), 'metrics');
self::add_field(self::GENERAL, crayon__('Toolbar'), 'toolbar');
self::add_field(self::GENERAL, crayon__('Lines'), 'lines');
self::add_field(self::GENERAL, crayon__('Code'), 'code');
self::add_field(self::GENERAL, crayon__('Tags'), 'tags');
self::add_field(self::GENERAL, crayon__('Languages'), 'langs');
self::add_field(self::GENERAL, crayon__('Files'), 'files');
self::add_field(self::GENERAL, crayon__('Posts'), 'posts');
self::add_field(self::GENERAL, crayon__('Tag Editor'), 'tag_editor');
self::add_field(self::GENERAL, crayon__('Misc'), 'misc');
// Debug
self::add_section(self::DEBUG, crayon__('Debug'));
self::add_field(self::DEBUG, crayon__('Errors'), 'errors');
self::add_field(self::DEBUG, crayon__('Log'), 'log');
// ABOUT
self::add_section(self::ABOUT, crayon__('About'));
$image = '
';
self::add_field(self::ABOUT, $image, 'info');
}
// Wrapper functions
private static function add_section($name, $title, $callback = NULL)
{
$callback = (empty($callback) ? 'blank' : $callback);
add_settings_section($name, $title, 'CrayonSettingsWP::' . $callback, self::SETTINGS);
}
private static function add_field($section, $title, $callback, $args = array())
{
$unique = preg_replace('#\\s#', '_', strtolower($title));
add_settings_field($unique, $title, 'CrayonSettingsWP::' . $callback, self::SETTINGS, $section, $args);
}
// Validates all the settings passed from the form in $inputs
public static function settings_validate($inputs)
{
// Load current settings from db
self::load_settings(TRUE);
global $CRAYON_EMAIL;
// When reset button is pressed, remove settings so default loads next time
if (array_key_exists('reset', $inputs)) {
self::clear_cache();
return array();
}
// Convert old tags
if (array_key_exists('convert', $inputs)) {
$encode = array_key_exists('convert_encode', $inputs);
CrayonWP::convert_tags($encode);
}
// Refresh internal tag management
if (array_key_exists('refresh_tags', $inputs)) {
CrayonWP::refresh_posts();
}
// Clear the log if needed
if (array_key_exists(self::LOG_CLEAR, $_POST)) {
CrayonLog::clear();
}
// Send to admin
if (array_key_exists(self::LOG_EMAIL_ADMIN, $_POST)) {
CrayonLog::email(get_bloginfo('admin_email'));
}
// Send to developer
if (array_key_exists(self::LOG_EMAIL_DEV, $_POST)) {
CrayonLog::email($CRAYON_EMAIL, get_bloginfo('admin_email'));
}
// Clear the cache
if (array_key_exists(self::CACHE_CLEAR, $_POST)) {
self::clear_cache();
}
// If settings don't exist in input, set them to default
$global_settings = CrayonSettings::get_defaults();
$ignored = array(CrayonSettings::HIDE_HELP);
foreach ($global_settings as $setting) {
// XXX Ignore some settings
if (in_array($setting->name(), $ignored)) {
$inputs[$setting->name()] = CrayonGlobalSettings::val($setting->name());
continue;
}
// If boolean setting is not in input, then it is set to FALSE in the form
if (!array_key_exists($setting->name(), $inputs)) {
// For booleans, set to FALSE (unchecked boxes are not sent as POST)
if (is_bool($setting->def())) {
$inputs[$setting->name()] = FALSE;
} else {
/* For array settings, set the input as the value, which by default is the
default index */
if (is_array($setting->def())) {
$inputs[$setting->name()] = $setting->value();
} else {
$inputs[$setting->name()] = $setting->def();
}
}
}
}
$refresh = array(
// These should trigger a refresh of which posts contain crayons, since they affect capturing
CrayonSettings::INLINE_TAG => TRUE,
CrayonSettings::INLINE_TAG_CAPTURE => TRUE,
CrayonSettings::CODE_TAG_CAPTURE => TRUE,
CrayonSettings::BACKQUOTE => TRUE,
CrayonSettings::CAPTURE_PRE => TRUE,
CrayonSettings::CAPTURE_MINI_TAG => TRUE,
CrayonSettings::PLAIN_TAG => TRUE
);
// Validate inputs
foreach ($inputs as $input => $value) {
// Convert all array setting values to ints
$inputs[$input] = $value = CrayonSettings::validate($input, $value);
// Clear cache when changed
if (CrayonGlobalSettings::has_changed($input, CrayonSettings::CACHE, $value)) {
self::clear_cache();
}
if (isset($refresh[$input])) {
if (CrayonGlobalSettings::has_changed($input, $input, $value)) {
// Needs to take place, in case it refresh depends on changed value
CrayonGlobalSettings::set($input, $value);
CrayonWP::refresh_posts();
}
}
}
return $inputs;
}
// Section callback functions
public static function blank()
{
} // Used for required callbacks with blank content
// Input Drawing ==========================================================
private static function input($args)
{
$id = '';
$size = 40;
$margin = FALSE;
$preview = 1;
$break = FALSE;
$type = 'text';
extract($args);
echo '', ($break ? CRAYON_BR : '');
}
private static function checkbox($args, $line_break = TRUE, $preview = TRUE)
{
if (empty($args) || !is_array($args) || count($args) != 2) {
return;
}
$id = $args[0];
$text = $args[1];
$checked = (!array_key_exists($id, self::$options)) ? FALSE : self::$options[$id] == TRUE;
$checked_str = $checked ? ' checked="checked"' : '';
echo ' ', '', ($line_break ? CRAYON_BR : '');
}
// Draws a dropdown by loading the default value (an array) from a setting
private static function dropdown($id, $line_break = TRUE, $preview = TRUE, $echo = TRUE, $resources = NULL, $selected = NULL)
{
if (!array_key_exists($id, self::$options)) {
return;
}
$resources = $resources != NULL ? $resources : CrayonGlobalSettings::get($id)->def();
$return = '' . ($line_break ? CRAYON_BR : '');
if ($echo) {
echo $return;
} else {
return $return;
}
}
private static function button($args = array())
{
extract($args);
CrayonUtil::set_var($id, '');
CrayonUtil::set_var($class, '');
CrayonUtil::set_var($onclick, '');
CrayonUtil::set_var($title, '');
return '' . $title . '';
}
private static function info_span($name, $text)
{
echo '', $text, '';
}
private static function span($text)
{
echo '', $text, '';
}
// General Fields =========================================================
public static function help()
{
global $CRAYON_WEBSITE, $CRAYON_TWITTER, $CRAYON_GIT;
if (CrayonGlobalSettings::val(CrayonSettings::HIDE_HELP)) {
return;
}
}
public static function help_screen()
{
$screen = get_current_screen();
if ($screen->id != self::$admin_page) {
return;
}
}
public static function metrics()
{
echo '
';
self::span(crayon__('Display the Toolbar') . ' ');
self::dropdown(CrayonSettings::TOOLBAR);
echo '
';
self::checkbox(array(CrayonSettings::TOOLBAR_OVERLAY, crayon__('Overlay the toolbar on code rather than push it down when possible')));
self::checkbox(array(CrayonSettings::TOOLBAR_HIDE, crayon__('Toggle the toolbar on single click when it is overlayed')));
self::checkbox(array(CrayonSettings::TOOLBAR_DELAY, crayon__('Delay hiding the toolbar on MouseOut')));
echo '
';
self::checkbox(array(CrayonSettings::SHOW_TITLE, crayon__('Display the title when provided')));
self::span(crayon__('Display the language') . ' ');
self::dropdown(CrayonSettings::SHOW_LANG);
echo '
';
}
public static function lines()
{
echo '
';
self::checkbox(array(CrayonSettings::STRIPED, crayon__('Display striped code lines')));
self::checkbox(array(CrayonSettings::MARKING, crayon__('Enable line marking for important lines')));
self::checkbox(array(CrayonSettings::RANGES, crayon__('Enable line ranges for showing only parts of code')));
self::checkbox(array(CrayonSettings::NUMS, crayon__('Display line numbers by default')));
self::checkbox(array(CrayonSettings::NUMS_TOGGLE, crayon__('Enable line number toggling')));
self::checkbox(array(CrayonSettings::WRAP, crayon__('Wrap lines by default')));
self::checkbox(array(CrayonSettings::WRAP_TOGGLE, crayon__('Enable line wrap toggling')));
self::span(crayon__('Start line numbers from') . ' ');
self::input(array('id' => CrayonSettings::START_LINE, 'size' => 2, 'break' => TRUE));
echo '
';
}
public static function langs()
{
echo '';
// Specialised dropdown for languages
if (array_key_exists(CrayonSettings::FALLBACK_LANG, self::$options)) {
if (($langs = CrayonParser::parse_all()) != FALSE) {
$langs = CrayonLangs::sort_by_name($langs);
self::span(crayon__('When no language is provided, use the fallback') . ': ');
self::dropdown(CrayonSettings::FALLBACK_LANG, FALSE, TRUE, TRUE, $langs);
// Information about parsing
$parsed = CrayonResources::langs()->is_parsed();
$count = count($langs);
echo '', CRAYON_BR, ($parsed ? '' : ''),
sprintf(crayon_n('%d language has been detected.', '%d languages have been detected.', $count), $count), ' ',
$parsed ? crayon__('Parsing was successful') : crayon__('Parsing was unsuccessful'),
($parsed ? '. ' : '');
// Check if fallback from db is loaded
$db_fallback = self::$options[CrayonSettings::FALLBACK_LANG]; // Fallback name from db
if (!CrayonResources::langs()->is_loaded($db_fallback) || !CrayonResources::langs()->exists($db_fallback)) {
echo ' ', sprintf(crayon__('The selected language with id %s could not be loaded'), '' . $db_fallback . ''), '. ';
}
// Language parsing info
echo CRAYON_BR, '
' . crayon__("Languages that have the same extension as their name don't need to explicitly map extensions.");
} else {
echo crayon__('No languages could be found.');
}
exit();
}
public static function posts()
{
echo '';
echo self::button(array('id' => 'show-posts', 'title' => crayon__('Show Crayon Posts')));
echo ' ';
echo self::help_button('http://aramk.com/blog/2012/09/26/internal-post-management-crayon/');
echo '';
}
public static function post_cmp($a, $b)
{
$a = $a->post_modified;
$b = $b->post_modified;
if ($a == $b) {
return 0;
} else {
return $a < $b ? 1 : -1;
}
}
public static function show_posts()
{
CrayonSettingsWP::load_settings();
$postIDs = self::load_posts();
$legacy_posts = self::load_legacy_posts();
// Avoids O(n^2) by using a hash map, tradeoff in using strval
$legacy_map = array();
foreach ($legacy_posts as $legacyID) {
$legacy_map[strval($legacyID)] = TRUE;
}
echo '
';
self::checkbox(array(CrayonSettings::ENQUEUE_THEMES, crayon__('Enqueue themes in the header (more efficient).') . self::help_button('http://aramk.com/blog/2012/01/07/enqueuing-themes-and-fonts-in-crayon/')));
// Check if theme from db is loaded
if ($missing_theme) {
echo '', sprintf(crayon__('The selected theme with id %s could not be loaded'), '' . $db_theme . ''), '. ';
}
}
public static function font($editor = FALSE)
{
$db_font = self::$options[CrayonSettings::FONT]; // Theme name from db
if (!array_key_exists(CrayonSettings::FONT, self::$options)) {
$db_font = '';
}
$fonts_array = CrayonResources::fonts()->get_array();
self::dropdown(CrayonSettings::FONT, FALSE, TRUE, TRUE, $fonts_array);
echo '';
// TODO(aramk) Add this blog article back.
// echo '', crayon__('Add More'), '';
echo '';
self::checkbox(array(CrayonSettings::FONT_SIZE_ENABLE, crayon__('Custom Font Size') . ' '), FALSE);
self::input(array('id' => CrayonSettings::FONT_SIZE, 'size' => 2));
echo '', crayon__('Pixels'), ', ', crayon__('Line Height'), ' ';
self::input(array('id' => CrayonSettings::LINE_HEIGHT, 'size' => 2));
echo '', crayon__('Pixels'), '';
if ((!CrayonResources::fonts()->is_loaded($db_font) || !CrayonResources::fonts()->exists($db_font))) {
// Default font doesn't actually exist as a file, it means do not override default theme font
echo '', sprintf(crayon__('The selected font with id %s could not be loaded'), '' . $db_font . ''), '. ';
}
if ($editor) {
return;
}
echo '';
self::checkbox(array(CrayonSettings::ENQUEUE_FONTS, crayon__('Enqueue fonts in the header (more efficient).') . self::help_button('http://aramk.com/blog/2012/01/07/enqueuing-themes-and-fonts-in-crayon/')));
}
public static function code($editor = FALSE)
{
echo '
';
self::checkbox(array(CrayonSettings::PLAIN, crayon__('Enable plain code view and display') . ' '), FALSE);
self::dropdown(CrayonSettings::SHOW_PLAIN);
echo '';
self::checkbox(array(CrayonSettings::PLAIN_TOGGLE, crayon__('Enable plain code toggling')));
self::checkbox(array(CrayonSettings::SHOW_PLAIN_DEFAULT, crayon__('Show the plain code by default')));
self::checkbox(array(CrayonSettings::COPY, crayon__('Enable code copy/paste')));
echo '';
self::checkbox(array(CrayonSettings::POPUP, crayon__('Enable opening code in a window')));
self::checkbox(array(CrayonSettings::SCROLL, crayon__('Always display scrollbars')));
self::checkbox(array(CrayonSettings::MINIMIZE, crayon__('Minimize code') . self::help_button('http://aramk.com/blog/2013/01/15/minimizing-code-in-crayon/')));
self::checkbox(array(CrayonSettings::EXPAND, crayon__('Expand code beyond page borders on mouseover')));
self::checkbox(array(CrayonSettings::EXPAND_TOGGLE, crayon__('Enable code expanding toggling when possible')));
echo '
';
if (!$editor) {
self::checkbox(array(CrayonSettings::DECODE, crayon__('Decode HTML entities in code')));
}
self::checkbox(array(CrayonSettings::DECODE_ATTRIBUTES, crayon__('Decode HTML entities in attributes')));
echo '
';
self::checkbox(array(CrayonSettings::TRIM_WHITESPACE, crayon__('Remove whitespace surrounding the shortcode content')));
echo '
';
self::checkbox(array(CrayonSettings::TRIM_CODE_TAG, crayon__('Remove <code> tags surrounding the shortcode content')));
self::checkbox(array(CrayonSettings::MIXED, crayon__('Allow Mixed Language Highlighting with delimiters and tags.') . self::help_button('http://aramk.com/blog/2011/12/25/mixed-language-highlighting-in-crayon/')));
echo '
';
self::checkbox(array(CrayonSettings::SHOW_MIXED, crayon__('Show Mixed Language Icon (+)')));
echo '
', sprintf(crayon__("Using this markup for Mini Tags and Inline tags is now %sdeprecated%s! Use the %sTag Editor%s instead and convert legacy tags."), '', '', '', ''), '
';
self::checkbox(array(CrayonSettings::CAPTURE_MINI_TAG, crayon__('Capture Mini Tags like [php][/php] as Crayons.') . self::help_button('http://aramk.com/blog/2011/12/27/mini-tags-in-crayon/')));
self::checkbox(array(CrayonSettings::INLINE_TAG_CAPTURE, crayon__('Capture Inline Tags like {php}{/php} inside sentences.') . self::help_button('http://aramk.com/blog/2012/03/07/inline-crayons/')));
self::checkbox(array(CrayonSettings::PLAIN_TAG, crayon__('Enable [plain][/plain] tag.') . self::help_button('http://aramk.com/blog/2011/12/27/mini-tags-in-crayon/')));
}
public static function files()
{
echo '';
echo crayon__('When loading local files and a relative path is given for the URL, use the absolute path'), ': ',
'