3

I have a plugin that inserts a tinymce like shown below. Something causes the second toolbar, the theme_advanced_buttons2 to have display:none attached to their style attribute, effectively hiding them.

I don't manage to find the code responsible for this.

$tinymce =  

array
(
      'theme_advanced_buttons1' =>

         '                       \
            ,  undo              \
            ,  redo              \

               ...
               ...

            ,  indent            \
         '

   ,  'theme_advanced_buttons2' =>

         '                       \
               link              \
            ,  unlink            \

               ...
               ...

            ,  help              \
         '
);

wp_editor
(
      $text
   ,  $editor[ 'name' ]
   ,  array
      (
           'tinymce'   => $tinymce
         , 'quicktags' => $enabled
      )
);

I found the right answer here thanks to a comment by mrwweb:

Show the Kitchen Sink by Default

If you would like to show that second row of options by default, there’s an easy way. Simply put the following into your theme’s functions.php file (Appearance > Edit > Theme Functions – functions.php):

function unhide_kitchensink( $args )
{
   $args['wordpress_adv_hidden'] = false;
   return $args;
}

add_filter( 'tiny_mce_before_init', 'unhide_kitchensink' );
3
  • 2
    Just double-checking. Have you clicked "Show/Hide Kitchen Sink?" or hit ALT + SHIFT + Z
    – mrwweb
    May 14, 2012 at 21:16
  • Please post your answer as an Answer below and mark it as accepted when you get the chance. That way, future visitors can benefit from the solution.
    – EAMann
    May 14, 2012 at 22:37
  • @EAMann I would if I could.
    – user16124
    May 14, 2012 at 23:10

2 Answers 2

3

Show the Kitchen Sink by Default

Copying @nus' answer as an answer to help newcomers.

If you would like to show that second row of options by default, there’s an easy way. Simply put the following into your theme’s functions.php file:

function unhide_kitchensink( $args )
{
   $args['wordpress_adv_hidden'] = false;
   return $args;
}

add_filter( 'tiny_mce_before_init', 'unhide_kitchensink' );
1
  • Is there any easy way to do this conditionally, i.e. not to all instances of the editor? just to instances added with wp_editor() of which we know the id for example? Jan 13, 2014 at 17:10
0

You can also set wordpress_adv_hidden=false anywhere in the tinymce config.

For example,

  1. Install this plugin http://wordpress.org/extend/plugins/advanced-tinymce-configuration/
  2. Add an option wordpress_adv_hidden
  3. With the value false
3
  • 2
    Without more detail this answer isn't very helpful.
    – s_ha_dum
    Jan 13, 2013 at 20:09
  • I dont agree, but I updated the question to be more verbose anyway.
    – commonpike
    Jan 15, 2013 at 12:33
  • Hey... @toscho got me for the same thing yesterday :)
    – s_ha_dum
    Jan 15, 2013 at 14:20

Your Answer

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