-
Notifications
You must be signed in to change notification settings - Fork 566
Closed
Labels
Description
Hello, there is a problem after your last update with plugin Yoast SEO. I use the standard theme Twenty Nineteen and WordPress version 5.0. The problem is only in the classic editor.
http://prntscr.com/lsygdn
http://prntscr.com/lsygkc
Steps to reproduce (I have confirmed I can reproduce this issue on the develop branch):
- Add metabox to any post type
- Instsall Yoast Seo
CMB2 Field Registration Code:
add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );
/**
* Hook in and add a demo metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.
*/
function yourprefix_register_demo_metabox() {
$prefix = 'yourprefix_demo_';
/**
* Sample metabox to demonstrate each field type included
*/
$cmb_demo = new_cmb2_box( array(
'id' => $prefix . 'metabox',
'title' => esc_html__( 'Test Metabox', 'cmb2' ),
'object_types' => array( 'page' ), // Post type
) );
$cmb_demo->add_field( array(
'name' => esc_html__( 'Test Text', 'cmb2' ),
'desc' => esc_html__( 'field description (optional)', 'cmb2' ),
'id' => $prefix . 'text',
'type' => 'text',
'show_on_cb' => 'yourprefix_hide_if_no_cats', // function should return a bool value
) );
}