From 7e65fcbbefc61196a49fde3eae4e38f019a5cbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=83=C2=B3=C3=85=E2=80=9Akowski?= Date: Tue, 19 Apr 2022 11:49:22 +0000 Subject: [PATCH] Editor: Include the PHP file for the Cover block This file is copied by the build process but it also needs to be versioned so unit tests can run without issues. Follow-up [53212]. See #55580. git-svn-id: https://develop.svn.wordpress.org/trunk@53213 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks/cover.php | 85 ++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/wp-includes/blocks/cover.php diff --git a/src/wp-includes/blocks/cover.php b/src/wp-includes/blocks/cover.php new file mode 100644 index 0000000000..d2f1959bdb --- /dev/null +++ b/src/wp-includes/blocks/cover.php @@ -0,0 +1,85 @@ +'; + + $image = sprintf( + $image_template, + esc_attr( get_the_post_thumbnail_caption() ), + esc_url( $current_featured_image ), + esc_attr( $object_position ), + esc_attr( $object_position ) + ); + + $content = str_replace( + '' . $image . ' 'render_block_core_cover', + ) + ); +} +add_action( 'init', 'register_block_core_cover' );