Last active
August 29, 2015 14:02
-
-
Save remyperona/b861b430b86e869873ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( have_rows( 'repeater_field', $order_id ) ) : | |
while ( have_rows( 'repeater_field', $order_id ) ) : the_row(); | |
$type = get_sub_field( 'type', $order_id ); | |
if( $type === 'tekst' ): ?> | |
<div id="customerMessageTxt"> | |
<?php the_sub_field($type, $order_id); ?> | |
</div> | |
<?php elseif( $type === 'memo' ): ?> | |
<div id="customerMessageMemo"> | |
<audio id="wp_mep_1" src="<?php the_sub_field($type, $order_id); ?>" type="audio/mp3" controls="controls" preload="auto" > | |
<object width="709" height="50" type="application/x-shockwave-flash" data="http://localhost:8888/spiritcard.dk/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf"> | |
<param name="movie" value="http://localhost:8888/spiritcard.dk/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" /> | |
<param name="flashvars" value="controls=true&file=<?php the_sub_field($type, $order_id); ?>" /> | |
</object> | |
</audio> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('#wp_mep_1').mediaelementplayer({ | |
m:1 | |
,features: ['playpause','current','progress','duration','volume','tracks','fullscreen'] | |
,audioWidth:709,audioHeight:50 | |
}); | |
}); | |
</script> | |
</div> | |
<?php elseif( $type === 'video' ): ?> | |
<div id="customerMessageVideo"> | |
<video id="wp_mep_1" src="<?php the_sub_field($type, $order_id); ?>" type="video/mp4" width="709" height="399" controls="controls" preload="true" > | |
<object width="709" height="399" type="application/x-shockwave-flash" data="http://localhost:8888/spiritcard.dk/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf"> | |
<param name="movie" value="http://localhost:8888/spiritcard.dk/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" /> | |
<param name="flashvars" value="controls=true&file=<?php the_sub_field($type, $order_id); ?>" /> | |
</object> | |
</video> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
$('#wp_mep_1').mediaelementplayer({ | |
m:1 | |
,features: ['playpause','current','progress','duration','volume','tracks','fullscreen'] | |
}); | |
}); | |
</script> | |
</div> | |
<?php else : ?> | |
<p>type var not working</p> | |
<?php endif; | |
endwhile; | |
else : ?> | |
<p>have rows not working</p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment