Weird checkbox behaviour on WP 7
-
Hey, I hope this is the right place to report this but I am suspecting that the backend UI change broke something about CMB2 checkboxes. We are using CMB2 as a composer package in our plugin and the checkboxes behave weirdly in the newest RC of WordPress 7.
I also tested it on bare CMB2 and made a little video to illustrate the issue. Here are the steps to reproduce the issue:
1. Start WP instance on 7.0 Beta 6
2. Install CMB2 plugin
3. Add following code snippet:add_action( 'cmb2_admin_init', 'cmb2_sample_metaboxes' );
/**
* Define the metabox and field configurations.
*/
function cmb2_sample_metaboxes() {
/**
* Initiate the metabox
*/
$cmb = new_cmb2_box( array(
'id' => 'test_metabox',
'title' => __( 'Test Metabox', 'cmb2' ),
'object_types' => array( 'page', ), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
// 'cmb_styles' => false, // false to disable the CMB stylesheet
// 'closed' => true, // Keep the metabox closed by default
) );
// Regular text field
$cmb->add_field( array(
'name' => __( 'Test Checkbox', 'cmb2' ),
'desc' => __( 'field description (optional)', 'cmb2' ),
'id' => 'test_checkone',
'type' => 'checkbox',
) );
// Regular text field
$cmb->add_field( array(
'name' => __( 'Test Checkbox two', 'cmb2' ),
'desc' => __( 'field description (optional)', 'cmb2' ),
'id' => 'test_checktwo',
'type' => 'checkbox',
) );
// Add other metaboxes as needed
}4. Edit page and observe weird behaviour in metabox as shown in the video.
Thank you!The page I need help with: [log in to see the link]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.