Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Public Function to return audio url. #308

Open
regiside opened this issue Feb 16, 2024 · 1 comment
Open

Feature Request: Public Function to return audio url. #308

regiside opened this issue Feb 16, 2024 · 1 comment

Comments

@regiside
Copy link

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.

@GermanKiwi
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants