0

I've created a button (named 'quote') in WordPress post editor (TinyMCE) normal mode, and I've been successful in adding some functionality to that button. The question is how can I make this button also appear in the 'full screen mode editor' (also known as Distraction Free Writing Mode).

functions.php:-

add_action('init', 'add_button');  
function add_button() {  
   if ( current_user_can('edit_posts') &&  current_user_can('edit_pages') )  
   {  
     add_filter('mce_external_plugins', 'add_plugin');  
     add_filter('mce_buttons_3', 'register_button');  
   }  
}  
function register_button($buttons) {  
   array_push($buttons, "quote");  
   return $buttons;  
}  
function add_plugin($plugin_array) {  
   $plugin_array['quote'] = get_bloginfo('template_url').'/js/customcodes.js';  
   return $plugin_array;  
}

I've googled and found that I might have to add some sort of filter. WordPress filters out buttons in the Full Mode, so I've to add the button again to the $buttons array. I believe that I'm pretty close to it.

migrated from stackoverflow.com Sep 5 '13 at 15:32

This question came from our site for professional and enthusiast programmers.

  • Better suited for wordpress.stackexchange. I flagged for moderator attention, you should see this question get moved. – hakre Aug 27 '13 at 21:11
0

You can check this link for your issue. It will help you.

This is the link you are looking for: Enjoy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.