[ad_1]
The query argument “_=” is often added to a video link to prevent caching and ensure that the latest version of the video is loaded each time the link is accessed. The argument makes the URL unique, tricking the browser into thinking it’s a new request and loading the updated content. This is especially useful when the video is frequently updated or changes often.
You can filter the output
wp_video_shortcode
add_filter(
'wp_video_shortcode',
function ( $output, $atts, $video, $post_id, $library ) {
$output = preg_replace( '#^(.*?src=[^\?]*)(.*?)(".*$)#m', '$1$3', $output );
return $output;
},
10,
5
);And yes – working out the regex is a pain but needed as the query arg valu ecan vary
