Return to Snippet

Revision: 41851
at February 24, 2011 00:34 by jevets


Initial Code
<?php
$wp_embed = new WP_Embed();
$post_embed = $wp_embed->run_shortcode('[embed]your-video-url[/embed]');
?>

Initial URL

                                

Initial Description
Embed a video via PHP without using `the_content` filter in WordPress. From luckykind at http://wordpress.org/support/topic/call-function-called-by-embed-shortcode-direct

Initial Title
WP do_shortcode to embed video

Initial Tags
wordpress, video

Initial Language
PHP