/* Start Switch field */
.switch-field .cmb2-radio-list li {
padding-right: 0 !important;
margin: 0;
}
.switch-field .cmb2-radio-list input {
position: absolute !important;
clip: rect(0, 0, 0, 0);
height: 1px;
width: 1px;
border: 0;
overflow: hidden;
}
.switch-field .cmb2-radio-list label {
float: left;
}
.switch-field .cmb2-radio-list label {
margin: 0 -.25rem;
background-color: #e4e4e4;
padding: .25rem .75rem;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out;
}
.switch-field .cmb2-radio-list input:checked + label {
color: #fff;
background-color: #0073aa;
}
.switch-field .cmb2-radio-list li:first-of-type label{
border-radius: .25rem 0 0 .25rem;
}
.switch-field .cmb2-radio-list li:last-of-type label{
border-radius: 0 .25rem .25rem 0;
}
/* End Switch field */
$cmb->add_field( array(
'name' => 'Test Radio inline',
'id' => 'wiki_test_radio_inline',
'type' => 'radio_inline',
'options' => array(
'standard' => __( 'Option One', 'cmb2' ),
'custom' => __( 'Option Two', 'cmb2' ),
),
'default' => 'standard',
'classes' => 'switch-field',
) );