From 9485e8c521e6413810126894b6f21dd55ca21067 Mon Sep 17 00:00:00 2001 From: Deepak rohilla Date: Mon, 26 Jun 2023 10:40:12 +0530 Subject: [PATCH] Apply suggestions from code review Version added except reddit script Co-authored-by: Rebecca Hum <16962021+rebeccahum@users.noreply.github.com> --- classes/class-wpcom-liveblog-entry-embed-sdks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/class-wpcom-liveblog-entry-embed-sdks.php b/classes/class-wpcom-liveblog-entry-embed-sdks.php index 6f05f091..bfd175a2 100644 --- a/classes/class-wpcom-liveblog-entry-embed-sdks.php +++ b/classes/class-wpcom-liveblog-entry-embed-sdks.php @@ -40,7 +40,9 @@ public static function enqueue() { foreach ( self::$sdks as $name => $url ) { if ( 'reddit' === $name ) { - wp_enqueue_script( $name, esc_url( $url ), array(), null, false ); + // Do not attach `?ver=` for reddit script due to redirects + $version = 'reddit' === $name ? null : WPCOM_Liveblog::VERSION; + wp_enqueue_script( $name, esc_url( $url ), array(), $version, false ); } else { wp_enqueue_script( $name, esc_url( $url ), array(), WPCOM_Liveblog::VERSION, false ); }