Skip to content

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
etcook committed Sep 16, 2014
1 parent d4265b3 commit e0c9f80
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions public/includes/components/component-audio.php
@@ -1,23 +1,23 @@
<?php

/**
* Audio component utilizes core wordpress audio
*
* @since 1.0.0
* Audio component utilizes core wordpress audio
*
* @since 1.0.0
*/
if (!function_exists('aesop_audio_shortcode')){

function aesop_audio_shortcode($atts, $content = null) {

$defaults = array(
'title' => '',
'src' => '',
'viewstart' => 'off',
'viewend' => 'off',
'loop' => 'off',
'hidden' => ''
);
$atts = apply_filters('aesop_video_defaults',shortcode_atts($defaults, $atts));
$defaults = array(
'title' => '',
'src' => '',
'viewstart' => 'off',
'viewend' => 'off',
'loop' => 'off',
'hidden' => ''
);
$atts = apply_filters('aesop_video_defaults',shortcode_atts($defaults, $atts));

// let this be used multiple times
static $instance = 0;
Expand All @@ -37,55 +37,55 @@ function aesop_audio_shortcode($atts, $content = null) {
$loop = 'on' == $atts['loop'] ? 'true' : false;

// waypoint filter
$point = 'bottom-in-view';
$waypoint = apply_filters('aesop_audio_component_waypoint', $point, $unique);
$point = 'bottom-in-view';
$waypoint = apply_filters('aesop_audio_component_waypoint', $point, $unique);

ob_start();
ob_start();

do_action('aesop_audio_before'); //action
do_action('aesop_audio_before'); //action

?><aside id="aesop-audio-<?php echo $unique;?>" class="aesop-component aesop-audio-component <?php echo $classes;?>" <?php echo $hidden;?>>
?><aside id="aesop-audio-<?php echo $unique;?>" class="aesop-component aesop-audio-component <?php echo $classes;?>" <?php echo $hidden;?>>

<?php if ('on' == $atts['viewstart']) { ?>
<script>
jQuery(document).ready(function(){
jQuery('#aesop-audio-<?php echo $unique;?>').arrive('.mejs-audio', function(){
<?php if ('on' == $atts['viewstart']) { ?>
<script>
jQuery(document).ready(function(){
jQuery('#aesop-audio-<?php echo $unique;?>').arrive('.mejs-audio', function(){

jQuery('#aesop-audio-<?php echo $unique;?>').waypoint({
offset: '<?php echo $waypoint;?>',
handler: function(direction){
jQuery('#aesop-audio-<?php echo $unique;?> .mejs-playpause-button button').css({'cursor':'pointer'}).click();
}
jQuery('#aesop-audio-<?php echo $unique;?> .mejs-playpause-button button').css({'cursor':'pointer'}).click();
}
});

<?php if ('on' == $atts['viewend']) { ?>
jQuery('#aesop-audio-<?php echo $unique;?>').waypoint({
handler: function(direction){
jQuery('#aesop-audio-<?php echo $unique;?> .mejs-playpause-button button').css({'cursor':'pointer'}).click();
}
jQuery('#aesop-audio-<?php echo $unique;?> .mejs-playpause-button button').css({'cursor':'pointer'}).click();
}
});
<?php } ?>

});
});
</script>
<?php } ?>
});
});
</script>
<?php } ?>

<?php
do_action('aesop_audio_inside_top'); //action
<?php
do_action('aesop_audio_inside_top'); //action

if ($title) {
echo $title;
}
if ($title) {
echo $title;
}

echo wp_audio_shortcode( array( 'src' => $atts['src'], 'loop' => $loop ) );
echo wp_audio_shortcode( array( 'src' => $atts['src'], 'loop' => $loop ) );

do_action('aesop_audio_inside_bottom'); //action
do_action('aesop_audio_inside_bottom'); //action

?></aside><?php
?></aside><?php

do_action('aesop_audio_after'); //action
do_action('aesop_audio_after'); //action

return ob_get_clean();
return ob_get_clean();
}
}

0 comments on commit e0c9f80

Please sign in to comment.