Okay the thing is that the oembed endpoint seems not to support any other than the default parameters.
So it seems that all you can do is parse the response and add in your parameters to the iframe src. This should do it (untested)
function wpse_218836_add_youtube_parameter( $return, $data, $url ){
if ( $data->provider_name === 'YouTube'){
$additional_parameters="&cc_load_policy=1&hl=tr";
return preg_replace('/src="https://wordpress.stackexchange.com/questions/218836/(.*?)"/i', 'src="$1' . $additional_parameters . '"', $return);
}else{
return $return;
}
}
add_filter('oembed_dataparse', 'wpse_218836_add_youtube_parameter', 10, 3);
Related Posts:
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to add new embed handler not supported by oembed
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Embed YouTube video from custom field value
- Embeding YouTube video via a template function throws iframe cross-domain policy error
- How to auto embedded youtube with wp_insert_post()
- How to embed YouTube videos in posts without adding suggested videos at the end?
- Div around YouTube video
- WordPress Mediaelement – Youtube Videos Embed Options
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- How do I embed youtube videos with https instead of http in the URL?
- WP Oembed not passing through the “autoplay=1” variable
- Get first video from the post (both embed and video shortcodes)
- Modify youtube video size on one page and show another size on different page
- How to change thumbnail of embedded Youtube video?
- Youtube – Embed as IFRAME
- wp_embed_register_handler is not working
- Any way to use a custom Parameter for vimeo embed without using an iframe?
- Is it possible to modify the default YouTube embed attributes string?
- Removing WordPress Icon from oembed link footer
- Get all Youtube video’s from posts and embed them on a different page
- Hiding Comments Icon On oembed
- Youtube parameters within WordPress embed code?
- vimeo/youtube video embed with thumbnails
- Can I use wp_oembed_get to detect a valid embeddable link or is there a better way to do so?
- disable video URL auto-embedding for a part of the post
- extra text in Vimeo Embedded videos
- How can I force oEmbed to display fixed height & width dimensions?
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- WordPress get embedded/attachment video
- oEmbed not working in WordPress
- MP4 video on wordpress working on desktop, not on mobile devices
- How to apply an ID to Shortcode Embedded iframe
- How can I remove the first video from a post and feature it?
- How to change the way wp_embed handles only youtube videos?
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- Embedding Youtube video on comments
- How to make enqueue_embed_scripts work with the embed_template filter
- YouTube embeded video will not resize (only full screen responsive) [closed]
- TED talk embedded videos cut off by sidebar
- Looking to Customize YouTube Video Embeds
- WordPress fails to embed video URL
- Add class and change src type inside wp_oembed_get
- Embed video from streamtape using direct link
- Embedded videos not displaying on page
- How to disable URL preview in WordPress comments
- How to modify the HTML output of Gutenberg block? (Youtube)
- Remove wordpress embed share icon?
- Youtube iframe embed keeps disappearing from page
- how to embed a .mp4 video the url postfix with secret key
- Adding an official oEmbed provider to WordPress
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Completely disable oEmbed and auto-embed on frontend and post editor?
- Youtube embedded videos unavailable
- Use [embed] filter in template files
- Replace audio/video enclosure with player?
- YouTube oEmbed and privacy-enhanced mode
- add_filter to youtube embeds?
- Any way to use a custom Parameter for youtube embed without using an iframe?
- How to change WordPress embedded player size or show just the play button
- use of tag into wordpress
- ted talks embed fixed, but can’t control size
- How to add oEmbed support to my theme?
- How to create a static player top or bottom of wordpress?
- Vimeo video embeds doesnt seem to work with ACF [closed]
- Use oEmbed in List Items
- Search XML file from within WordPress?
- Instagram URL is converted into oEmbed
- Responsive embed for the video shortcode
- How to set YouTube video as featured image?
- Why is my oembed function modifying Twitter embed?
- Display total questions of Moodle in WordPress [closed]
- How to display real-time data which is stored in an IBM Cloud web app
- Embedding custom posts with REST API
- How can I replace an oEmbed URL in post with actual embed HTML
- WordPress block editor embeds not working in theme (single.php)
- How to put an external object into WordPress to that occupies most of the available space?
- videos not showing on my tag pages
- How do I not embed the SoundCloud player? I just want the link
- Add Watermark to PDF’s of logged in user in WordPress upon upload to media library [closed]
- oEmbded with wp_insert_post() [embedly]
- Add parameter to first post only
- Help with jot form pro embed code
- Add class to oEmbed video from within post editor?
- Embed post wont work on custom post type
- How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block
- How to embed my latest WordPress post into an external page
- Embed Microsoft Forms into WordPress page
- Video, embed, html block usage out of the_content
- My WordPress editor deletes all characters after emoji – how can I fix this?
- Displaying cf post formats with oembed
- Choopy Video Playback in a popup using Artiss Youtube Embed [closed]
- How to have embedded images from smugmug take full width of blog posts
- WordPress: embedding last posted video
- Enclosures being deleted “automatically”
- Not allowing my site to be embedded elsewhere via oEmbed
- Embeds (YouTube, Spotify) Work Live but Won’t Load in Block Editor [closed]