[wp-trac] [WordPress Trac] #30251: Customizer inconsistent contextual behavior

WordPress Trac noreply at wordpress.org
Thu Nov 6 12:01:40 UTC 2014


#30251: Customizer inconsistent contextual behavior
--------------------------+-------------------------
 Reporter:  dgwyer        |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  4.1
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  javascript
--------------------------+-------------------------

Comment (by dgwyer):

 Thanks for clarifying. It's not very intuitive though for functions like
 `is_page()` that have optional parameters, as you'd expect
 `'active_callback' => 'is_page'` to work just like `'active_callback' =>
 'is_front_page'`. The only difference being `is_front_page()` doesn't take
 any parameters and `is_page()` takes optional parameters. I'll just have
 to remember to check parameters or use anonymous functions!

 I tested your patch on the full theme I originally had issues with. My
 specific use case is only showing certain customizer controls depending on
 page layout (1, 2, or 3 columns) and the patch seems to fix all issues.
 Everything is working nicely now.

 Thanks for patching this issue so quickly. Hopefully it can be added to
 core for 4.1.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30251#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list