Example #1
0
			            		} else {
				            		echo $wpalchemy_media_access->getField(array('name' => $mb->get_the_name(), 'value' => $mb->get_the_value(), 'data' => $mb->get_the_value() ));
			            		}
			            	?>
			        	</p>
			        	<div class="removeimg"></div>
			        </div>
	        	</div>
		        <div class="pull-left">
		        	<div class="orsep">or</div>
		        	<?php $mb->the_field('video'); ?>
		        	<div class="pull-left">
		        		<div class="labelel">Other media</div>
		        		<div class="codecontainer">
		        			<div class="button codein">
			        			<span><?php if ($mb->get_the_value()) echo str_replace('_', ' ', find_oembed($mb->get_the_value())); else echo 'Paste your URL, shortcode or custom code here'; ?></span>
		        			</div>
		        			<textarea class="vframe video" name="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea>
		        		</div>
		        	</div>
		        	<div class="pull-left">
		        		<div class="pre"><i class="info">i</i><div>You can paste here the link to the video from vimeo or youtube <br>Ex. http://vimeo.com/xxxxxxxx</div></div>
		        	</div>
		        </div>
		        <div class="caption">
		        <?php $mb->the_field('caption'); ?>
		        	<div>Caption</div>
		        	<textarea class="vframe" name="<?php $mb->the_name(); ?>"><?php $mb->the_value(); ?></textarea>
		        </div>
		        <div class="slidelink">
		        	<div>Link</div>
Example #2
0
<div class="img-cont<?php if ($pages_mb->get_the_value('video')) echo ' video'; ?>">
		<?php
		if ($slider) { ?>
		<div class="gallery_element">
			<div class="flexslider<?php if ($pages_mb->get_the_value('sshow_effect')) echo ' ' . $pages_mb->get_the_value('sshow_effect'); ?><?php if ($pages_mb->get_the_value('sshow_thumbs')) echo ' wthumbs' ?><?php if ($pages_mb->get_the_value('sshow_loop')) echo ' loop'; ?><?php if ($pages_mb->get_the_value('sshow_auto')) echo ' autoplay'; ?>" data-aspect="<?php if ($pages_mb->get_the_value('sshow_ratio')) echo $pages_mb->get_the_value('sshow_ratio'); ?>" data-mheight="<?php if ($pages_mb->get_the_value('sshow_min')) echo $pages_mb->get_the_value('sshow_min'); ?>" data-offset="<?php if ($pages_mb->get_the_value('sshow_offset')) echo $pages_mb->get_the_value('sshow_offset'); ?>">
				<ul class="slides">
		<?php }
		// loop a set of fields
		while($pages_mb->have_fields('slides')) {
			$imgID = $pages_mb->get_the_value('imgurl');
			if (is_numeric($imgID)) {
				$image_attributes = wp_get_attachment_image_src( $imgID, 'full' );
				$image_attributes = $image_attributes[0];
			} else $image_attributes = $imgID;
			$caption = $pages_mb->get_the_value('caption');
			if (isset($pages_mb->meta['slides'][$counter]['video'])) $provider = (find_oembed($pages_mb->meta['slides'][$counter]['video']));
			else $provider = '';

			if(strpos(trim($provider), ' ') !== false) $provider = 'unknown';

			$alt = ($pages_mb->get_the_value('alt')) ? $pages_mb->get_the_value('alt') : basename($image_attributes);

			if ($slider) echo '<li data-thumb="'.wp_get_attachment_thumb_url( $imgID).'">';
			if ($pages_mb->get_the_value('link')) { ?>

				<a href="<?php echo $pages_mb->get_the_value('link'); ?>" class="video">

			<?php }
			if ($pages_mb->get_the_value('video')) {
				if ($imgID && ($provider == 'Vimeo' || $provider == 'Youtube')) { ?>
				<a href="<?php $pages_mb->the_value('video'); ?>" class="fresco video <?php if (!$slider || ($slider && $counter == 0)) echo 'progressive'; ?>" data-fresco-group='<?php echo( basename(get_permalink()) ); ?>'><img alt="<?php echo $alt; ?>" src="<?php echo $image_attributes; ?>" /><div class="video"></div></a>
Example #3
0
		if (is_front_page()) $paged = (get_query_var('page')) ? get_query_var('page') : 1;
		else $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

		if ($load_more > 0) $mposts = array_slice($mposts, ($paged - 1) * $load_more, $load_more);

		if ($gallery_mb->get_the_value('lightbox_thumbnail')) $thumbs = ' data-fresco-group-options="thumbnails:true"';
		else $thumbs = '';

		if (is_array($mposts)) {

		foreach($mposts as &$mpost) {
			if (isset($mpost['size'])) $getsize = $mpost['size'];
			else $getsize = 'width2';

			$provider = '';
			if (isset($mpost['video'])) $provider = (find_oembed($mpost['video']));
			if(strpos(trim($provider), ' ') !== false) $provider = 'unknown';
		?>
			<div class="progressive element <?php echo $getsize; ?>">
				<div class="inside">
					<?php
						if (isset($data['gallery_caption']) && $data['gallery_caption']) {
					?><div class="entry-thumb<?php if (!$mpost['caption']) echo ' wplus'; ?>" data-overlay="<?php if ($mpost['caption']) echo $mpost['caption']; else echo '&#xe072;'; ?>"><?php
						} else {
					?><div class="entry-thumb wplus" data-overlay="<?php echo '&#xe072;'; ?>"><?php
						}
							if (isset($mpost['imgurl'])) {
								$imgID = $mpost['imgurl'];
								$image_attributes = wp_get_attachment_image_src( $imgID, 'full' );
								$imgurl = $image_attributes[0];
								$urlquery = parse_url($imgurl);