Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Version added except reddit script

Co-authored-by: Rebecca Hum <[email protected]>
  • Loading branch information
deepakrohillas and rebeccahum authored Jun 26, 2023
1 parent cb6b6a5 commit 9485e8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/class-wpcom-liveblog-entry-embed-sdks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 9485e8c

Please sign in to comment.