%s',
admin_url( 'tools.php?page=audio_tube' ),
__('Settings')
)
);
}
return $links;
}
/**
* Print user shortcode in content
*
* @param array $atts
* @return string
*/
public function shortcode( $atts )
{
$devOptions = get_option( BL_Audio_Tube::$opt_name );
extract( shortcode_atts( array(
'bar' => 'yes',
'time' => 'yes',
'tiny' => '',
'auto' => '',
'loop' => '',
'theme' => '',
'size' => 'small',
'invisible' => '',
'id' => '',
'start' => '',
'end' => ''
), $atts ) );
if( !isset( $id ) || '' == $id )
return;
$yt_width = 225;
$yt_height = 25;
if( $invisible==='yes' )
{
$yt_height = 0;
$yt_width = 0;
}
elseif ($tiny==='yes')
{
$yt_width = 30;
}
elseif ($bar==='no')
{
$yt_width = 62;
}
elseif ($size==='large')
{
if($time==='no')
$yt_width = 224;
else
$yt_width = 299;
}
elseif ($size==='medium')
{
if($time==='no')
$yt_width = 187;
else
$yt_width = 262;
}
else
{
if($time==='no')
$yt_width = 150;
else
$yt_width = 225;
}
$yt_auto = '';
if($auto==='yes')
$yt_auto = '&autoplay=1';
$yt_loop = '';
if($loop==='yes')
$yt_loop = '&loop=1';
$yt_js = '';
if ($devOptions['javascript'])
$yt_js = '&enablejsapi=1';
/* COOKIES DISABLED
$yt_cookie = 'youtube-nocookie';
if ($devOptions['cookies']) */
$yt_cookie = 'youtube';
$yt_theme = '';
if ( $devOptions['theme'] )
$yt_theme = '&theme=light';
if ( '' != $theme )
$yt_theme = '&theme='.$theme;
$yt_start = ( '' != $start ) ? "&start=$start" : '';
$noembed_image = plugins_url( '/', dirname( __FILE__ ) ) . "images/play-tub.png";
$ritorna = <<