Skip to content

Commit

Permalink
Utilize Blocks::is_amp_request()
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Sep 24, 2020
1 parent 681cba1 commit f0b54e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions extensions/blocks/opentable/opentable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use Automattic\Jetpack\Blocks;
use Jetpack_Gutenberg;
use Jetpack_AMP_Support;

const FEATURE_NAME = 'opentable';
const BLOCK_NAME = 'jetpack/' . FEATURE_NAME;
Expand Down Expand Up @@ -79,7 +78,7 @@ function load_assets( $attributes ) {

$script_url = build_embed_url( $attributes );

if ( Jetpack_AMP_Support::is_amp_request() ) {
if ( Blocks::is_amp_request() ) {
// Extract params from URL since it had jetpack_opentable_block_url filters applied.
$url_query = \wp_parse_url( $script_url, PHP_URL_QUERY ) . '&overlay=false&disablega=false';

Expand Down

0 comments on commit f0b54e1

Please sign in to comment.