$is_custom_body_class_enabled ) { if ( ( get_post_type() == $post_type_slug ) && $is_custom_body_class_enabled ) { // Skip adding meta box for post types where Gutenberg is enabled // if ( // function_exists( 'use_block_editor_for_post_type' ) // && use_block_editor_for_post_type( $post_type_slug ) // ) { // continue; // go to the beginning of next iteration // } add_meta_box( 'asenha-custom-body-class', // ID of meta box 'Custom <body> Class', // Title of meta box [ $this, 'output_custom_body_class_meta_box' ], // Callback function $post_type_slug, // The screen on which the meta box should be output to 'normal', // context 'high' // priority // array(), // $args to pass to callback function. Ref: https://developer.wordpress.org/reference/functions/add_meta_box/#comment-342 ); } } } /** * Render External Permalink meta box * * @since 3.9.0 */ public function output_custom_body_class_meta_box( $post ) { ?>