<?php
/**
 * @package Hello_Dolly
 * @version 1.6
 */
defined('ABSPATH') or die("No script kiddies please!");
/*
Plugin Name: TinyMCE code button
*/
function my_mce_buttons_2($buttons) {	
	/**
	 * Add in a core button that's disabled by default
	 */
	$buttons[] = 'nonbreaking';
	$buttons[] = 'styleselect';
	$buttons[] = 'superscript';
	$buttons[] = 'subscript';
	

	return $buttons;
}
add_filter('mce_buttons_2', 'my_mce_buttons_2');

function allow_nbsp_in_tinymce( $mceInit ) {
    $mceInit['entities'] = 'nbsp';
    $mceInit['entity_encoding'] = 'named';
    return $mceInit;
}
add_filter( 'tiny_mce_before_init', 'allow_nbsp_in_tinymce' );
?>
