nsrosenqvist / cmb2-switch
This package is abandoned and no longer maintained.
No replacement package was suggested.
Package info
github.com/nsrosenqvist/cmb2-switch
Type:wordpress-plugin
pkg:composer/nsrosenqvist/cmb2-switch
1.0.1
2018-06-19 09:37 UTC
Requires
- php: >=7.0.0
- cmb2/cmb2: ^2.3.0
This package is auto-updated.
Last update: 2020-06-09 20:10:09 UTC
README
A boolean switch field type for CMB2.
$analytics = new_cmb2_box(array( 'id' => 'analytics', 'title' => __('Analytics', 'theme'), )); $analytics_state = $analytics->add_field(array( 'name' => __( 'Enable Analytics?', 'theme'), 'id' => 'analytics_state', 'type' => 'switch', 'default' => cmb2_set_switch_default(true), ));