Skip to content

Commit

Permalink
Add better workaround for gutenberg_the_skip_link() to be fixed in #6115
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Apr 28, 2021
1 parent f4094f2 commit 3549c0a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/ampproject/amp-wp/issues/6115>.
add_action( 'wp_print_styles', [ __CLASS__, 'print_emoji_styles' ] );
add_filter( 'the_title', 'wp_staticize_emoji' );
add_filter( 'the_excerpt', 'wp_staticize_emoji' );
Expand Down
2 changes: 0 additions & 2 deletions tests/php/test-class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] ) );

Expand Down

0 comments on commit 3549c0a

Please sign in to comment.