Skip to content

Instantly share code, notes, and snippets.

@technosailor
Created May 25, 2012 18:30
Show Gist options
  • Save technosailor/2789696 to your computer and use it in GitHub Desktop.
Save technosailor/2789696 to your computer and use it in GitHub Desktop.
<?php
class AMM_Template_Tags {
public function __construct() {}
public function display_featured_video()
{
$amm_options = get_option( 'amm_options' );
$video_url = $amm_options['featured_video']; // http://www.youtube.com/watch?v=S-PcsfPPUsE
if( !$video_url )
return false;
echo do_shortcode('[embed]' . $video_url . '[/embed]' );
}
}
$ammtt = new AMM_Template_Tags
function test()
{
global $ammtt;
$ammtt->display_featured_video();
}
add_action('genesis_before_content', 'test');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment