WordPress has this little minimally documented function, wp_video_shortcode()
Just pass an array with the necessary information as if you were writing out the shortcode.
Related Posts:
- Videos via the video shortcode are always 640px wide?
- How can I get the [video] shortcode to allow query string parameters?
- Video shortcode – autoplay all videos
- Hide download option video shortcode
- Video Short Code and Media Fragments URI
- Get first video from the post (both embed and video shortcodes)
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to handle valueless attributes in shortcodes?
- Video size and border radius using a shortcode
- possibility to control embedded video timeline with buttons and links external to the player
- Video Shortcodes not working in WordPress
- How can I implement shortcode on click event
- How to change to local video player on shortcode ultimate to video.js?
- Using _e() on text inside video tags prints that text, instead of only showing when html5 element is not supported
- Add div on EMED Tag
- Adding a cover image to video shortcode
- Shortcode not displaying video as expected
- Video shortcode outside WordPress not working with IE and mediaelement’s Flash fallback
- Conditionally Loading JavaScript/CSS for Shortcodes
- Show shortcode without executing it
- How does a shortcode work?
- Run visual composer code in php page
- Remove wptexturize from a shortcode?
- Using shortcode in Post title
- Audio or playlist shortcode condition according to the amount of files on attachment page
- Does a shortcode with a single attribute have to use an array?
- template_redirect to accompany with a shortcode
- Use [shortcode=”value”] instead of [shortcode att=”value”]?
- Tinymce shortcodes within shortcode contents
- I dont want to show shortcode in tag
- Post loop created via shortcode not displaying shortcode in content
- Pass shortcode variables to template
- passing multiple parents value into a shortcode
- Is it possible to add a repeater field to TinyMCE’s option window?
- Shortcodes: Pros and Cons
- esc_attr not working in shortcode
- Raw output (preventing wpautop)
- Conditionally loading Facebook PHP SDK in shortcode
- Can’t understand $atts in functions?
- Are .MP3 files with capital letter extensions allowed in [audio] shortcode?
- How to handle shortcodes when using the JSON API
- Are shortcode functions applied while rendering the content, or are they executed and stored with the post content?
- is_admin() returns false in save_post hook with Gutenberg editor
- Why are Shortcodes Disabled in Widgets by Default?
- Get Posts shortcode plugin and meta_query?
- WordPress Gallery shortcode: Display one category ID only
- How to get gallery id inserted to a post?
- WordPress Shortcode show database row
- Custom shortcode is not working in text widget
- Adding Videos as post-thumbnails (no stills, just the player in a smaller size)
- Use shortcodes in terms description? [closed]
- Adding to the_content or a variable from within a shortcode function
- Shortcode: text content ends up outside html tags
- How can I remove the first video from a post and feature it?
- How to wp_redirect on ‘init’ hook on condition of current post id?
- Basic do shortcodes question
- What is this format called (nested shortcodes)?
- Problem with height in video shortcode
- Shortcode not showing $content in correct place
- Best tools for preparing and styling a table [closed]
- How can I insert a shortcode in the title tag of another?
- Shortcode inside text widget do not call enqueue style
- How to execute a shortcode outside the post content/entry in a theme?
- Metabox Keeps Stripping Parts of Shortcode
- Form processing: How to process form before output and access data from shortcode
- How to Retrieve data of Gallery Shortcode and display it above a post
- Checking post content for a shortcode, but content is being returned as empty
- do_shortcode() won’t return PHP Array
- Adding my own custom woocommerce shortcode to child theme, how?
- contact form 7 :create shortcode usable in email message [closed]
- Better way to display multiple plugin output on the same page?
- get_queried_object_id / short code returning blank
- Shortcode won’t take into account custom post ID put in parameter
- How to utilise multiple values from a single shortcode attribute?
- JavaScript missing from shortcode content
- shortcode to display specific recent posts
- wp_link_pages shortcode for ‘nextpagelink’
- Multiple values for one variable
- Function in a wordpress shortcode
- nested shortcodes from different plugins. too complex? [duplicate]
- Impossible to display modification in shortcode code?
- Use Shortcode on Custom Page
- WordPress Database Error using $wpdb->get_results()
- Shortcode or Template Page
- Ajax callback and shortcode functionality
- Duplicate short code duplicating some values only
- Shortcode for External HTML
- How to implement theme shortcodes in text outside of pages?
- Manipulated shortcode output
- Where is escaped the shortcode?
- Changing layout of defaul gallery output to masonry
- shortcode change variable base on user
- Inserting shortcode is blanking excerpt – any ideas?
- If do_shortcode is blank, return some message
- Previous/Next with the same category
- I’ve broken the short code for Contact Form 7!
- echo a shortcode in a shortcode code?
- How to enable on custom shortcodes
- Nested ShortCode works inside the_content, but not outside of it
- How to use multiple values in “Shortcode”? [closed]