Test meta box field'; echo ''; } /** * Add a test meta box */ function gutenberg_test_meta_box_add_meta_box() { add_meta_box( 'gutenberg-test-meta-box', 'Gutenberg Test Meta Box', 'gutenberg_test_meta_box_render_meta_box', 'post', 'normal', 'high' ); } add_action( 'add_meta_boxes', 'gutenberg_test_meta_box_add_meta_box' ); /** * Print excerpt in tag in wp_head * @global WP_Post $post Global post object. */ function gutenberg_test_meta_box_render_head() { global $post; setup_postdata( $post ); // Emulates what plugins like Yoast do with meta data on the front end. // Tests that our excerpt processing does not interfere with dynamic blocks. $excerpt = wp_strip_all_tags( get_the_excerpt() ); ?>