Skip to content

Commit

Permalink
Update class-wpcom-liveblog-entry-embed-sdks.php
Browse files Browse the repository at this point in the history
Reddit js script file will enqueue without version and rest js will be added with version.
  • Loading branch information
deepakrohillas authored Jun 26, 2023
1 parent e66ea51 commit 403d513
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions classes/class-wpcom-liveblog-entry-embed-sdks.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,9 @@ public static function enqueue() {
}

foreach ( self::$sdks as $name => $url ) {
if ( 'reddit' === $name ) {
// Don't attach version with reddit js script file, it will generate 404 error with reddit js
$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 );
}
// Don't attach version with reddit js script file, it will generate 404 error with reddit js
$version = 'reddit' === $name ? null : WPCOM_Liveblog::VERSION;
wp_enqueue_script( $name, esc_url( $url ), array(), $version, false );
}
}

Expand Down

0 comments on commit 403d513

Please sign in to comment.