Hi @doczimute,
Could you please specify what version of the SSP plugin you use? Unfortunately, I don’t see such a line in the class-players-controller.php file.
Best regards,
Sergiy, development team.
Error
\wp-content\plugins\seriously-simple-podcasting\templates\players\castos-player.php line 183.
Hi @doczimute,
Thank you for bringing it to our attention, we’ll add a PHP filter for the date format in our future versions.
Currently, you can use the ssp_html_player_data filter (put it in your functions.php file):
add_filter( 'ssp_html_player_data', function ( $data ) {
if ( ! empty( $data['date'] ) ) {
$data['date'] = date( 'j M Y', strtotime( $data['date'] ) );
}
return $data;
} );
Hope this helps and best regards,
Sergiy.
Hello there – great plugin!
Would the above filter work to alter the format of the $item[‘duration’] as well?
One of my users reported a weird thing (nan:nan instead of time) with the duration label and I’d like to experiment a bit before opening a new thread.
Thanks
Hi @zemog,
Sure, you can use this filter for the duration, and other properties as well.
Here is the list of all properties that can be modified:
$template_data = array(
'episode' => $episode,
'episode_id' => $episode->ID,
'date' => $this->format_post_date( $episode->post_date ),
'duration' => $episode_duration,
'current_url'=> $current_url,
'audio_file' => $audio_file,
'album_art' => $album_art,
'podcast_title' => $podcast_title,
'feed_url' => $feed_url,
'subscribe_links' => $subscribe_links,
'embed_code' => $embed_code,
'player_mode' => $player_mode,
'show_subscribe_button' => $show_subscribe_button,
'show_share_button' => $show_share_button,
'title' => $episode->post_title,
'excerpt' => ssp_get_episode_excerpt( $episode->ID ),
'player_id' => wp_rand(),
);
Best regards,
Sergiy.