[wp-trac] [WordPress Trac] #12207: Trying to override wordpress_adv_hidden to show "kitchen sink" has no effect

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 11 23:36:48 UTC 2010


#12207: Trying to override wordpress_adv_hidden to show "kitchen sink" has no
effect
--------------------------+-------------------------------------------------
 Reporter:  amattie       |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  new   
 Priority:  normal        |   Milestone:  2.9.2 
Component:  TinyMCE       |     Version:  2.9.1 
 Severity:  normal        |    Keywords:        
--------------------------+-------------------------------------------------
 There's a setting that WordPress / TinyMCE consumes called
 {{{wordpress_adv_hidden}}}, but it doesn't appear that one can override
 this setting using the {{{ teeny_mce_before_init }}} and {{{
 tiny_mce_before_init }}} filters. It is certainly possible to add {{{
 wordpress_adv_hidden => 0 }}} (or "0", doesn't matter) to this array via
 the filter, but when the TinyMCE settings ultimately get written out in
 the JavaScript, the values in the key / value pair are always quoted.

 Ultimately, these quoted values are causing an issue due to the irritating
 way JavaScript handles boolean assertions ("0" && {} is true, 0 && {} is
 false, yet 0 == "0" is true). In the case of this issue, since the values
 are quoted, the assertion is evaluating to true even if I try to set the
 value to false so that the "kitchen sink" will forcibly show.

 Since wordpress_adv_hidden is set in the JavaScript as a number anyway,
 can we just wrap a parseInt around that assertion? See patch.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12207>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list