In addition to the built-in shortcode attributes there is a filter available to add parameters to the embed-URL.
By default, we only add the autoplay parameter to the embed-URL that’s dynamically generated from the video URL provided in the shortcode.
Filter
Let’s use the wp_video_popup
filter to remove the YouTube branding from all videos globally.
function prefix_your_custom_embed_url_parameters( $video_url ) {
$video_url .= '&modestbranding=1';
return $video_url;
}
add_filter( 'wp_video_popup', 'prefix_your_custom_embed_url_parameters' );
To better understand what the filter does, the default embed-URL the plugin creates would look something like this:
https://www.youtube.com/embed/sOjqTkk5d3A?autoplay=1
With the filter above, your embed-URL would look like this:
https://www.youtube.com/embed/sOjqTkk5d3A?autoplay=1&modestbranding=1