Skip to content

Commit

Permalink
Merge pull request #1141 from Automattic/update/soft-deprecate-get-bo…
Browse files Browse the repository at this point in the history
…dy-node

Soft-deprecate AMP_Base_Sanitizer::get_body_node()
  • Loading branch information
westonruter committed May 11, 2018
2 parents f15aa74 + cbc0ae5 commit 7937f26
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
Expand Up @@ -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 );
}

/**
Expand Down
7 changes: 4 additions & 3 deletions readme.md
Expand Up @@ -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).

Expand Down
7 changes: 4 additions & 3 deletions readme.txt
Expand Up @@ -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).

Expand Down

0 comments on commit 7937f26

Please sign in to comment.