WordPress get embedded/attachment video
I was able to get all the embedded media content within a post using a new WordPress hook (3.6+). get_media_embedded_in_content();
I was able to get all the embedded media content within a post using a new WordPress hook (3.6+). get_media_embedded_in_content();
Embeds are cached in hidden post meta fields with _oembed_* keys. You could retrieve all of meta (with get_post_custom() for example) and try to get info from it. However, from quick look at my test data it seems that duplicates are not uncommon there (might have to do with either WP version changes or embed … Read more
Well this is not exactly a WordPress problem / solution. First you have to either get the video id from the video_site_url post meta or save the YouTube video id in it’s own post meta field, maybe youtube_video_id. Next you can get the thumbnail using one of these url http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg Read this … Read more
Hooks are only available when you see apply_filters, apply_filters_ref_array, do_action, and do_action_ref_array. They are all basically handled the same way but have some small differences like filters always expecting a returned value. e.g.: // seeing this in some WordPress code $the_content = apply_filters( ‘the_content’, $the_content ); // means you can then use something like this … Read more
Try just pasting the YouTube URL in to the post or page in the text editor with-out embed code as an editor. See if that works never heard anyone having this problem… https://www.youtube.com/watch?v=VYmp9HmMYwU&t It’s super easy to embed videos, images, tweets, audio, and other content into your WordPress site. This feature was added in WordPress … Read more
There’s always a filter you can use to hook into the output, see embed_oembed_html. Try this in a custom plugin or child theme’s functions file, it will add any other query strings to the iframe src attribute: add_filter(“embed_oembed_html”, function( $html, $url, $attr ) { parse_str(parse_url($url, PHP_URL_QUERY), $url); if ( $url ) { foreach ( $url … Read more
You could create a new callback for the embed_oembed_html filter and target the third input argument, the oembed $url. Then you could e.g. create boolean helper functions like (untested): function is_oembed_from_video_specific_hosts_wpse274552( $url ) { return in_array( parse_url( $url, PHP_URL_HOST ), [ ‘youtube.com’, ‘youtu.be’, ‘vimeo.com’, // … etc ], true ); } or a more detailed … Read more
I’ve found your problem. You’ve inserted video from facebook on your page with facebook init script. Find the place where you insert this video and change uk_UA to en_US there.
It would seem that there should be a Gravity Forms in your plugin folder, assuming it’s not part of a theme. You could try installing the latest version of Gravity Forms plugin via Add Plugins, and see if you can then get into editing the forms. There should be an entry on the Settings menu … Read more
When you’re referring to using oEmbed codes, I’m assuming that you’re referring to WordPress’ ability to take a URL to media (such as one from YouTube) and automatically embed that into a post. If that’s the case, then you can take advantage of the embed_oembed_html hook that WordPress provides. Here’s how you can do it … Read more