diff --git a/includes/sanitizers/class-amp-base-sanitizer.php b/includes/sanitizers/class-amp-base-sanitizer.php index 501458dabbf..9cbabda3cd6 100644 --- a/includes/sanitizers/class-amp-base-sanitizer.php +++ b/includes/sanitizers/class-amp-base-sanitizer.php @@ -160,11 +160,10 @@ public function get_stylesheets() { * Get HTML body as DOMElement from DOMDocument received by the constructor. * * @deprecated Just reference $root_element instead. - * @return DOMElement The body or html element. + * @return DOMElement The body element. */ protected function get_body_node() { - _deprecated_function( __METHOD__, 'AMP_Base_Sanitizer::$root_element', '0.7' ); - return $this->root_element; + return $this->dom->getElementsByTagName( 'body' )->item( 0 ); } /** diff --git a/readme.md b/readme.md index 40323a78f71..17b2e305fa3 100644 --- a/readme.md +++ b/readme.md @@ -66,10 +66,11 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - ... ### 0.7.1 (Unreleased) ### -- Limit showing AMP validation warnings to when `amp` theme support is present. See [#1132](https://github.com/Automattic/amp-wp/pull/1132). -- Supply the extracted dimensions to images determined to need them; fixes regression from 0.6 this is key for Gutenberg compat. See [#1117](https://github.com/Automattic/amp-wp/pull/1117). -- Ensure before/after is amended to filtered comment_reply_link. See [#1118](https://github.com/Automattic/amp-wp/pull/1118). +- Limit showing AMP validation warnings to when `amp` theme support is present. See [#1132](https://github.com/Automattic/amp-wp/pull/1132). Props westonruter. +- Supply the extracted dimensions to images determined to need them; fixes regression from 0.6 this is key for Gutenberg compat. See [#1117](https://github.com/Automattic/amp-wp/pull/1117). Props westonruter. +- Ensure before/after is amended to filtered comment_reply_link. See [#1118](https://github.com/Automattic/amp-wp/pull/1118). Props westonruter. - Force VideoPress to use html5 player for AMP. See [#1125](https://github.com/Automattic/amp-wp/pull/1125). Props yurynix. +- Soft-deprecate `AMP_Base_Sanitizer::get_body_node()` instead of hard-deprecating it (with triggered notice). See [#1141](https://github.com/Automattic/amp-wp/pull/1141). Props westonruter. See [0.7.1 milestone](https://github.com/Automattic/amp-wp/milestone/8?closed=1). diff --git a/readme.txt b/readme.txt index f8896f0b6bf..2198c7cc383 100644 --- a/readme.txt +++ b/readme.txt @@ -48,10 +48,11 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve - ... = 0.7.1 (Unreleased) = -- Limit showing AMP validation warnings to when `amp` theme support is present. See [#1132](https://github.com/Automattic/amp-wp/pull/1132). -- Supply the extracted dimensions to images determined to need them; fixes regression from 0.6 this is key for Gutenberg compat. See [#1117](https://github.com/Automattic/amp-wp/pull/1117). -- Ensure before/after is amended to filtered comment_reply_link. See [#1118](https://github.com/Automattic/amp-wp/pull/1118). +- Limit showing AMP validation warnings to when `amp` theme support is present. See [#1132](https://github.com/Automattic/amp-wp/pull/1132). Props westonruter. +- Supply the extracted dimensions to images determined to need them; fixes regression from 0.6 this is key for Gutenberg compat. See [#1117](https://github.com/Automattic/amp-wp/pull/1117). Props westonruter. +- Ensure before/after is amended to filtered comment_reply_link. See [#1118](https://github.com/Automattic/amp-wp/pull/1118). Props westonruter. - Force VideoPress to use html5 player for AMP. See [#1125](https://github.com/Automattic/amp-wp/pull/1125). Props yurynix. +- Soft-deprecate `AMP_Base_Sanitizer::get_body_node()` instead of hard-deprecating it (with triggered notice). See [#1141](https://github.com/Automattic/amp-wp/pull/1141). Props westonruter. See [0.7.1 milestone](https://github.com/Automattic/amp-wp/milestone/8?closed=1).