Skip to content

Commit

Permalink
Merge pull request #261 from TheCraigHewitt/release/1.19.3
Browse files Browse the repository at this point in the history
Release/1.19.3
  • Loading branch information
jonathanbossenger authored Dec 13, 2017
2 parents 143c2dd + fd5a2d0 commit 2383114
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 21 deletions.
1 change: 1 addition & 0 deletions assets/css/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@

.ssp-custom-player-controls{
margin-top: 10px;
clear: both;
}

.ssp-play-pause{
Expand Down
2 changes: 1 addition & 1 deletion assets/css/frontend.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/icon_fonts.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/fonts/Gizmo/gizmo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1837,4 +1837,4 @@
}
.icon-zoom-out:before {
content: "\e1f9";
}
}
1 change: 1 addition & 0 deletions assets/fonts/Gizmo/gizmo.min.css

Large diffs are not rendered by default.

53 changes: 36 additions & 17 deletions includes/class-ssp-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function content_meta_data( $content = '' ) {
}

if ( $show_player && in_array( $post->post_type, $podcast_post_types ) && ! is_feed() && ! isset( $_GET['feed'] ) ) {

// Get episode meta data
$meta = $this->episode_meta( $post->ID, 'content' );

Expand Down Expand Up @@ -225,9 +225,16 @@ public function episode_meta( $episode_id = 0, $context = 'content' ) {
if( $show_player ) {
$meta .= '<div class="podcast_player">' . $this->media_player( $file, $episode_id ) . '</div>';
}

if ( apply_filters( 'ssp_show_episode_details', true, $episode_id, $context ) ) {
$meta .= $this->episode_meta_details( $episode_id, $context );

$player_style = get_option( 'ss_podcasting_player_style' );

/**
* If the player hasn't been explicitly set to the new html5 player
*/
if( 'larger' !== $player_style ){
if ( apply_filters( 'ssp_show_episode_details', true, $episode_id, $context ) ) {
$meta .= $this->episode_meta_details( $episode_id, $context );
}
}
}

Expand Down Expand Up @@ -369,25 +376,29 @@ public function media_player ( $srcFile = '', $episode_id = 0 ) {

?>
<div class="ssp-player ssp-player-large" id="ssp_player_id_<?php echo $largePlayerInstanceNumber; ?>"<?php echo $player_background_colour ? ' style="background: ' . $player_background_colour . ';"' : 'background: #333;' ;?>>
<div class="ssp-album-art-container">
<div class="ssp-album-art" style="background: url( <?php echo $albumArt['src']; ?> ) center center no-repeat; -webkit-background-size: cover;background-size: cover;"></div>
<?php if( apply_filters( 'ssp_show_album_art', true, get_the_ID() ) ) { ?>
<div class="ssp-album-art-container">
<div class="ssp-album-art" style="background: url( <?php echo apply_filters( 'ssp_album_art_cover', $albumArt['src'], get_the_ID() ); ?> ) center center no-repeat; -webkit-background-size: cover;background-size: cover;"></div>
</div>
<?php }; ?>
<div style="overflow: hidden">
<div class="ssp-player-inner" style="overflow: hidden;">
<div class="ssp-player-info">
<div style="width: 80%; float:left;">
<h3 class="ssp-player-title episode-title">
<?php
echo get_the_title( $episode_id );
echo apply_filters( 'ssp_podcast_title', get_the_title( $episode_id ), get_the_ID() );
if( $series = get_the_terms( $episode_id, 'series' ) ){
echo ( !empty( $series ) && isset( $series[0] ) ) ? '<br><span class="ssp-player-series">' . substr( $series[0]->name, 0, 35) . ( strlen( $series[0]->name ) > 35 ? '...' : '' ) . '</span>' : '';
}
?>
</h3>
</div>
<div class="ssp-download-episode" style="overflow: hidden;text-align:right;">
<img class="ssp-player-branding" src="<?php echo SSP_PLUGIN_URL; ?>/assets/svg/castos_logo_white.svg" width="68" />
</div>
<?php if( apply_filters( 'ssp_player_show_logo', true ) ) { ?>
<img class="<?php echo apply_filters( 'ssp_player_logo_class', 'ssp-player-branding' ); ?>" src="<?php echo apply_filters( 'ssp_player_logo_src', SSP_PLUGIN_URL . '/assets/svg/castos_logo_white.svg' ); ?>" width="<?php echo apply_filters( 'ssp_player_logo_width', 68 ); ?>" />
<?php }; ?>
</div>
<div>&nbsp;</div>
<div class="ssp-media-player">
<div class="ssp-custom-player-controls">
Expand All @@ -397,9 +408,6 @@ public function media_player ( $srcFile = '', $episode_id = 0 ) {
<div class="ssp-wave-form">
<div class="ssp-inner">
<div id="waveform<?php echo $largePlayerInstanceNumber; ?>" class="ssp-wave"></div>
<!--<div class="sspProgressBar" id="sspProgressBar<?php /*echo $episode_id . $largePlayerInstanceNumber; */?>" style="background: <?php /*echo $player_wave_form_colour ?: '#444' ;*/?>;">
<div class="sspProgressFill" style="background: <?php /*echo $player_wave_form_progress_colour ?: '#fff'; */?>">&nbsp;</div>
</div>-->
</div>
</div>

Expand Down Expand Up @@ -713,7 +721,11 @@ public function episode_meta_details ( $episode_id = 0, $context = 'content', $r
if( $link && apply_filters( 'ssp_show_new_window_link', true, $context ) ) {
$meta['new_window'] = true;
}


if( $link ) {
$meta['duration'] = $duration;
}

if( $date_recorded ) {
$meta['date_recorded'] = $date_recorded;
}
Expand All @@ -730,6 +742,7 @@ public function episode_meta_details ( $episode_id = 0, $context = 'content', $r
$subscribe_display = '';

$meta_sep = apply_filters( 'ssp_episode_meta_separator', ' | ' );

foreach ( $meta as $key => $data ) {

if( ! $data ) {
Expand All @@ -744,16 +757,20 @@ public function episode_meta_details ( $episode_id = 0, $context = 'content', $r

case 'link':
$podcast_display .= '<a href="' . esc_url( $data ) . '" title="' . get_the_title() . ' " class="podcast-meta-download">' . __( 'Download file' , 'seriously-simple-podcasting' ) . '</a>';
break;
break;

case 'new_window':
$play_link = add_query_arg( 'ref', 'new_window', $link );
$podcast_display .= '<a href="' . esc_url( $play_link ) . '" target="_blank" title="' . get_the_title() . ' " class="podcast-meta-new-window">' . __( 'Play in new window' , 'seriously-simple-podcasting' ) . '</a>';
break;
break;

case 'duration':
$podcast_display .= '<span class="podcast-meta-duration">' . __( 'Duration' , 'seriously-simple-podcasting' ) . ': ' . $data . '</span>';
break;

case 'date_recorded':
$podcast_display .= '<span class="podcast-meta-date">' . __( 'Recorded on' , 'seriously-simple-podcasting' ) . ' ' . date_i18n( get_option( 'date_format' ), strtotime( $data ) ) . '</span>';
break;
break;

// Allow for custom items to be added, but only allow a small amount of HTML tags
default:
Expand Down Expand Up @@ -868,7 +885,7 @@ public function episode_meta_details ( $episode_id = 0, $context = 'content', $r
$meta_display .= '<p>' . __( 'Subscribe:', 'seriously-simple-podcasting' ) . ' ' . $subscribe_display . '</p>';
}

$meta_display = '<div class="podcast_meta"><aside>' . $meta_display . '</aside></div>';
$meta_display = '<div class="podcast_meta"><aside>' . $podcast_display . '</aside></div>';

return $meta_display;

Expand Down Expand Up @@ -1918,6 +1935,8 @@ public function podcast_episode ( $episode_id = 0, $content_items = array( 'titl
$html .= ob_get_clean();
}

$series = get_the_terms( $episode_id, 'series' );
$episode_series = !empty( $series ) && isset( $series[0] ) ? $series[0]->term_id : false;
$share_url_array = array();

if( $itunes_share_url = get_option( 'ss_podcasting_itunes_url_' . $episode_series ) ){
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: podcast, audio, video, vodcast, rss, mp3, mp4, feed, itunes, podcasting, m
Requires at least: 4.4
Tested up to: 4.9.1
Requires PHP: 5.3.3
Stable tag: 1.19.2
Stable tag: 1.19.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -102,6 +102,12 @@ You can find complete user and developer documentation (along with the FAQs) on

== Changelog ==

= 1.19.3 =
* 2017-12-08
* [FIX] Namespaced CSS classes for icons to avoid conflicts with themes using font frameworks
* [FIX] Fixed a bug where the player meta wasn't displayed on the classic player
* [TWEAK] New Player Enhancements - added additional filters to the new HTML5 player to allow developers / site owners more flexibility.

= 1.19.2 =
* 2017-12-07
* [FIX] Fixed a bug breaking sites on PHP versions older than 5.6
Expand Down

0 comments on commit 2383114

Please sign in to comment.