ID, 'blogone_gallery', true); $gallery_ids = explode(',', $gallery); if( is_array($gallery_ids) ){ array_unshift($gallery_ids, get_post_thumbnail_id()); } ?>
'thumbnail-blog')); ?> 'thumbnail-blog')); ?>
ID, 'blogone_video_url', true); if( $video_url != '' ){ if( strstr($video_url, 'youtube.com') || strstr($video_url, 'youtu.be') ){ preg_match('%(?:youtube\.com/(?:user/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $video_url, $match); if( count($match) >= 2 ){ $video_url = '//www.youtube.com/embed/' . $match[1]; } } elseif( strstr($video_url, 'vimeo.com') ){ preg_match('~^http://(?:www\.)?vimeo\.com/(?:clip:)?(\d+)~', $video_url, $match); if( count($match) >= 2 ){ $video_url = '//player.vimeo.com/video/' . $match[1]; } else{ $video_id = explode('/', $video_url); if( is_array($video_id) && !empty($video_id) ){ $video_id = $video_id[count($video_id) - 1]; $video_url = '//player.vimeo.com/video/' . $video_id; } } } } ?>
< width="100%" height="450" src="" allowfullscreen>>
ID, 'blogone_audio_url', true); if( strlen($audio_url) > 4 ){ $file_format = substr($audio_url, -3, 3); if( in_array($file_format, array('mp3', 'ogg', 'wav')) ){ echo do_shortcode('[audio '.$file_format.'="'.esc_url($audio_url).'"]'); }else{ $atts = array( 'url' => $audio_url, ); extract(shortcode_atts(array( 'params' => "color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false" ,'url' => '' ,'width' => '100%' ,'height' => '166' ,$html_tag_frame => 1 ),$atts)); $atts = compact( 'params', 'url', 'width', 'height', 'iframe' ); if( $iframe ){ $url = 'https://w.soundcloud.com/player/?url=' . $atts['url'] . '&' . $atts['params']; $unique_class = 'blogone-soundcloud-'.rand(); $style = '.'.esc_attr($unique_class).' iframe{width: '.esc_attr($atts['width']).'; height:'.esc_attr($atts['height']).'px;}'; $style = ''; echo '
'.$style.'<'.$html_tag_frame.' src="'.esc_url( $url ).'">
'; } } } } } ?>