<pre> tag for Alex Gorbatchev's SyntaxHighlighter. This plugin is based on 'CodeColorer TinyMCE Button'. Version: 0.2.1 Author: Redcocker Author URI: http://www.near-mint.com/blog/ Text Domain: shtb_adv_lang Domain Path: /locale/ */ /* Date of release: Ver. 0.2.1 2011/5/12 License: GPL v2 */ load_plugin_textdomain('shtb_adv_lang', false, 'syntaxhighlighter-tinymce-button/locale'); add_action('admin_menu', 'shtb_adv_register_menu_item'); add_filter( 'plugin_action_links', 'shtb_adv_setting_link', 10, 2 ); function shtb_adv_add_admin_footer(){ //show plugin info in the footer $plugin_data = get_plugin_data(__FILE__); printf('%1$s by %2$s
', $plugin_data['Title'].' '.$plugin_data['Version'], $plugin_data['Author']); } function shtb_adv_register_menu_item() { register_setting( 'shtb_adv-settings-group', 'shtb_adv_insert'); register_setting( 'shtb_adv-settings-group', 'shtb_adv_codebox'); add_option('shtb_adv_insert', 1); add_option('shtb_adv_codebox', 1); add_options_page('SyntaxHighlighter TinyMCE Button Options', 'SH TinyMCE Button', 10, 'syntaxhighlighter-tinymce-button-options', 'shtb_adv_options_panel'); } function shtb_adv_setting_link( $links, $file ){ static $this_plugin; if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__); if ( $file == $this_plugin ){ $settings_link = ''.__('Settings', 'shtb_adv_lang').''; array_unshift( $links, $settings_link ); } return $links; } //Load SyntaxHighlighter TinyMCE Button if (get_option('shtb_adv_insert') == 1) { include_once('sh-tinymce-button-ins/sh-tinymce-button-ins.php'); } if (get_option('shtb_adv_codebox') == 1) { include_once('sh-tinymce-button-box/sh-tinymce-button-box.php'); } // Allow tab to indent in tinyMCE. if (get_option('shtb_adv_insert') == 1 || get_option('shtb_adv_codebox') == 1) { add_filter('tiny_mce_before_init', 'shtb_adv_insert_allow_tab'); } function shtb_adv_insert_allow_tab($initArray) { $initArray['plugins']=preg_replace("|[,]+tabfocus|i","",$initArray['plugins']); return $initArray; } //Setting panel function shtb_adv_options_panel(){ if(!function_exists('current_user_can') || !current_user_can('manage_options')){ die(__('Cheatin’ uh?')); } add_action('in_admin_footer', 'shtb_adv_add_admin_footer'); ?>

SyntaxHighlighter TinyMCE Button

/> Select & Insert /> CodeBox

'Select & Insert' will help you to wrap your code on the post or page in <pre> tag or to update values of previously-markuped code.
'CodeBox' will allow you to paste your code into the post or page, keeping indent by tabs. Your pasted code will be warpped in <pre> tag automatically.
In 'Visual Editor', 'Select & Insert' will appear as 'pre' icon and 'CodeBox' will appear as 'CODE' icon.", "shtb_adv_lang") ?>