edit_form_after_title(); } /** * filter_block_editor_meta_boxes * * description * * @date 5/4/19 * @since 5.7.14 * * @param type $var Description. Default. * @return type Description. */ function filter_block_editor_meta_boxes( $wp_meta_boxes ) { // Globals global $current_screen; // Move 'acf_after_title' metaboxes into 'normal' location. if( isset($wp_meta_boxes[ $current_screen->id ][ 'acf_after_title' ]) ) { // Extract locations. $locations = $wp_meta_boxes[ $current_screen->id ]; // Ensure normal location exists. if( !isset($locations['normal']) ) $locations['normal'] = array(); if( !isset($locations['normal']['high']) ) $locations['normal']['high'] = array(); // Append metaboxes. foreach( $locations['acf_after_title'] as $priority => $meta_boxes ) { $locations['normal']['high'] = array_merge( $meta_boxes, $locations['normal']['high'] ); } // Update original data. $wp_meta_boxes[ $current_screen->id ] = $locations; unset( $wp_meta_boxes[ $current_screen->id ]['acf_after_title'] ); } // Return return $wp_meta_boxes; } /** * acf_validate_save_post * * Ignore errors during the Gutenberg "save metaboxes" AJAX request. * Allows data to save and prevent UX issues. * * @date 16/12/18 * @since 5.8.0 * * @param void * @return void */ function acf_validate_save_post() { // Check if current request came from Gutenberg. if( isset($_GET['meta-box-loader']) ) { acf_reset_validation_errors(); } } } acf_new_instance('ACF_Form_Gutenberg'); endif;