diff --git a/includes/class-amp-theme-support.php b/includes/class-amp-theme-support.php index ddfc6ccde19..069511c8074 100644 --- a/includes/class-amp-theme-support.php +++ b/includes/class-amp-theme-support.php @@ -833,6 +833,7 @@ public static function add_hooks() { if ( has_action( 'wp_head', 'print_emoji_detection_script' ) ) { remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'wp_print_styles', 'print_emoji_styles' ); + remove_action( 'wp_footer', 'gutenberg_the_skip_link' ); // Temporary workaround for . add_action( 'wp_print_styles', [ __CLASS__, 'print_emoji_styles' ] ); add_filter( 'the_title', 'wp_staticize_emoji' ); add_filter( 'the_excerpt', 'wp_staticize_emoji' ); diff --git a/tests/php/test-class-amp-theme-support.php b/tests/php/test-class-amp-theme-support.php index 0ed7ae39737..b6e6913edfb 100644 --- a/tests/php/test-class-amp-theme-support.php +++ b/tests/php/test-class-amp-theme-support.php @@ -1611,8 +1611,6 @@ public function test_filter_customize_partial_render() { * @covers ::amp_render_scripts() */ public function test_prepare_response() { - remove_theme_support( 'block-templates' ); // Needed to prevent gutenberg_the_skip_link() from outputting anything. - $this->set_template_mode( AMP_Theme_Support::STANDARD_MODE_SLUG ); wp_set_current_user( self::factory()->user->create( [ 'role' => 'administrator' ] ) );