• Hi,

    Today i’ve updated to 3.9 and shortcode button missing on post and page editor, here is my plugin code:

    class SYMPLE_TinyMCE_Buttons {
    	function __construct() {
        	add_action( 'init', array(&$this,'init') );
        }
        function init() {
    		if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
    			return;
    		if ( get_user_option('rich_editing') == 'true' ) {
    			add_filter( 'mce_external_plugins', array(&$this, 'add_plugin') );
    			add_filter( 'mce_buttons', array(&$this,'register_button') );
    		}
        }
    	function add_plugin($plugin_array) {
    	   $plugin_array['symple_shortcodes'] = plugin_dir_url( __FILE__ ) .'js/symple_shortcodes_tinymce.js';
    	   return $plugin_array;
    	}
    	function register_button($buttons) {
    	   array_push($buttons, "symple_shortcodes_button");
    	   return $buttons;
    	}
    }
    $sympleshortcode = new SYMPLE_TinyMCE_Buttons;
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP 3.9 Shortcode button missing’ is closed to new replies.