nsrosenqvist / cmb2-switch
Installs: 52
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:wordpress-plugin
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), ));