From 85f56fd9e30466fd30b091e65bbfdbacc315902f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Thu, 7 Nov 2019 23:15:46 -0800 Subject: [PATCH] Remove redundant data-ampdevmode attributes from admin bar descendants --- includes/amp-helper-functions.php | 1 - tests/php/test-amp-helper-functions.php | 1 - 2 files changed, 2 deletions(-) diff --git a/includes/amp-helper-functions.php b/includes/amp-helper-functions.php index 5dbef925a2f..12de70499ca 100644 --- a/includes/amp-helper-functions.php +++ b/includes/amp-helper-functions.php @@ -973,7 +973,6 @@ function amp_get_content_sanitizers( $post = null ) { $dev_mode_xpaths = (array) apply_filters( 'amp_dev_mode_element_xpaths', [] ); if ( is_admin_bar_showing() ) { $dev_mode_xpaths[] = '//*[ @id = "wpadminbar" ]'; - $dev_mode_xpaths[] = '//*[ @id = "wpadminbar" ]//*'; $dev_mode_xpaths[] = '//style[ @id = "admin-bar-inline-css" ]'; } $sanitizers = array_merge( diff --git a/tests/php/test-amp-helper-functions.php b/tests/php/test-amp-helper-functions.php index 26b08dc5a9d..2289099fe53 100644 --- a/tests/php/test-amp-helper-functions.php +++ b/tests/php/test-amp-helper-functions.php @@ -785,7 +785,6 @@ function ( $xpaths ) use ( $element_xpaths ) { $element_xpaths, [ '//*[ @id = "wpadminbar" ]', - '//*[ @id = "wpadminbar" ]//*', '//style[ @id = "admin-bar-inline-css" ]', ] ),