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
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), ));