diff --git a/lib/full-site-editing/templates.php b/lib/full-site-editing/templates.php index b391439243d05..13e9885eafd0d 100644 --- a/lib/full-site-editing/templates.php +++ b/lib/full-site-editing/templates.php @@ -177,10 +177,17 @@ function set_unique_slug_on_create_template( $post_id ) { /** * Print the skip-link script & styles. * + * @todo Remove this when WP 5.8 is the minimum required version. + * * @return void */ function gutenberg_the_skip_link() { + // Early exit if on WP 5.8+. + if ( function_exists( 'the_block_template_skip_link' ) ) { + return; + } + // Early exit if not an FSE theme. if ( ! gutenberg_supports_block_templates() ) { return;