<?php 

 add_action('init', 'add_button_warning');
 
 function add_button_warning() {
   if ( current_user_can('edit_posts') &&  current_user_can('edit_pages') )
   {
     add_filter('mce_external_plugins', 'add_plugin_warning');
     add_filter('mce_buttons_3', 'register_button_warning');
   }
}

function register_button_warning($buttons) {
   array_push($buttons, "warning");
   return $buttons;
}

function add_plugin_warning($plugin_array) {
   $plugin_array['warning'] = get_bloginfo('template_url').'/Lioit/tinymce/warning.js';
   return $plugin_array;
}
