Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Use is_amp_endpoint() instead of looking at query var directly
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Dec 7, 2017
1 parent 60622f1 commit cdc7080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/class-wp-customize-posts-preview.php
Expand Up @@ -166,9 +166,9 @@ public function sanitize_amp_rendered_content_partial( $rendered, $partial ) {
&&
function_exists( 'amp_load_classes' )
&&
defined( 'AMP_QUERY_VAR' )
function_exists( 'is_amp_endpoint' )
&&
false !== get_query_var( AMP_QUERY_VAR, false )
is_amp_endpoint()
);
if ( $should_get_amp_content ) {
$post = get_post( $partial->post_id );
Expand Down

0 comments on commit cdc7080

Please sign in to comment.