themeum / kirki

Extending the customizer
https://kirki.org
MIT License
1.26k stars 327 forks source link

Active callback for selected preview device? #2124

Open reefki opened 5 years ago

reefki commented 5 years ago

I don't know if it already exists or has been requested previously, but it would be nice if we can show/hide controls based on the selected customizer preview device.

Screen Shot 2019-03-28 at 05 26 48

Maybe using the following syntax:

'active_callback' => array(
    array(
        'setting' => 'preview_device',
        'operator' => '==',
        'value' => 'desktop', // 'desktop', 'tablet' or 'mobile'
    ),
),

I think it would be useful if we want to have a different spacing fields for each screen.

aristath commented 5 years ago

Already planned after 4.0 :+1:

reefki commented 5 years ago

Perfect! Can't wait to see that implemented.

mihdan commented 1 year ago

Hi, is there any change on this issue?