[wp-trac] [WordPress Trac] #19098: QTags.addButton not working according to the docblocks

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 31 20:38:48 UTC 2011

#19098: QTags.addButton not working according to the docblocks
 Reporter:  amereservant  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.3
 Severity:  minor         |  Resolution:
 Keywords:                |
Changes (by amereservant):

 * severity:  normal => minor


 Ok, I figured it out.  If a filter hook is added to
 '''quicktags_settings''' and values are given for the ''buttons''
 variable, then it will reject any additionally added buttons.

 Here's an example:
 if( !function_exists('_default_quicktags') ):

 function _default_quicktags( $qtInit, $e_id )
     $qtInit['buttons'] = 'em,strong,block';
     return $qtInit;
 add_filter('quicktags_settings', '_default_quicktags', 10, 2);


 Now if I also use the previously mentioned code to add tags, it will
 ignore them since it appears if any values have been added to the
 '''$qtInit['buttons']''' variable will reject all other added buttons.
 I'm not sure if this is a preferred behaviour or not, but these can
 conflict in certain circumstances as I discovered it by accident.


Ticket URL: <http://core.trac.wordpress.org/ticket/19098#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list