Skip to content

Commit

Permalink
Soft-deprecate AMP_Base_Sanitizer::get_body_node()
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed May 10, 2018
1 parent 4dd1023 commit cbc0ae5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions includes/sanitizers/class-amp-base-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,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 );
}

/**
Expand Down
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve
## Changelog ##

### 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).

Expand Down
7 changes: 4 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ Follow along with or [contribute](https://github.com/Automattic/amp-wp/blob/deve
== Changelog ==

= 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).

Expand Down

0 comments on commit cbc0ae5

Please sign in to comment.