Skip to content

Instantly share code, notes, and snippets.

@jimboobrien
Forked from ajmorris/sample.php
Created September 20, 2017 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimboobrien/a360c4cf997f0cdaf56a5db794465b35 to your computer and use it in GitHub Desktop.
Save jimboobrien/a360c4cf997f0cdaf56a5db794465b35 to your computer and use it in GitHub Desktop.
Return Vimeo Video Embedded
<?php
// http://vimeo.com/75577633 could replace $xml->video[$post_content]->url
public function skbp_vimeo_player( $post_content = 0 ) {
$xml = simplexml_load_string( self::skbp_vimeo_support_url() );
// echo '<pre>'; print_r($xml->video[0]->url); echo '</pre>';
$post_content = 0;
$output = '';
$output .= '<h3>' . __( 'Recent Video', 'skbp' ) . '</h3>';
$output .= '<br />';
$output .= '[embed]' . $xml->video[$post_content]->url . '[/embed]';
$output .= '<br />';
return do_shortcode($output);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment