I realize this plugin doesn't have a maintainer at the moment, but if anyone ever picks it back up or decides to fork it, It would be nice if the following code was turned into a function that could be accessed by theme developers and even internally across the plugin as the same or similar code is repeated in multiple view, and in the rss feeds.
The code is used to check if the sermon audio url is a wordpress attachment or an external link and if it's a wordpress attachment return that instead of a hard coded value from the database.
It would be nice if there was a "get_wpfc_sermon_audio_url" which would return either the wordpress attachment url or the saved database string if it wasn't an attachment.
I'd recommend creating a ticket at https://wpforchurch.com/my/clientarea.php so the current owner of the plugin can consider adding this. It's still being developed, just not in this Github.
I realize this plugin doesn't have a maintainer at the moment, but if anyone ever picks it back up or decides to fork it, It would be nice if the following code was turned into a function that could be accessed by theme developers and even internally across the plugin as the same or similar code is repeated in multiple view, and in the rss feeds.
The code is used to check if the sermon audio url is a wordpress attachment or an external link and if it's a wordpress attachment return that instead of a hard coded value from the database.
$sermon_audio_id = get_wpfc_sermon_meta( 'sermon_audio_id' ); $sermon_audio_url_wp = $sermon_audio_id ? wp_get_attachment_url( intval( $sermon_audio_id ) ) : false; $sermon_audio_url = $sermon_audio_id && $sermon_audio_url_wp ? $sermon_audio_url_wp : get_wpfc_sermon_meta( 'sermon_audio' );
It would be nice if there was a "get_wpfc_sermon_audio_url" which would return either the wordpress attachment url or the saved database string if it wasn't an attachment.