__( 'Overcast', 'overcast-ss-podcasting' ), 'description' => __( 'For users that are using Overcast, with the relase of an update coming in fall 2018, Overcast will display a currency-symbol button that opens a payment, membership, donation, Patreon, etc. URL when present in the currently playing episode’s HTML body (“show notes”).', 'overcast-ss-podcasting' ), 'fields' => array( array( 'id' => 'payment_url', 'label' => __( 'Overcast Payment URL', 'overcast-ss-podcasting' ), 'description' => __( 'Add URL to payment/donation/Patreon page.', 'overcast-ss-podcasting' ), 'type' => 'text', 'default' => '', 'placeholder' => __( 'Payment URL', 'overcast-ss-podcasting' ), 'callback' => 'esc_url_raw', 'class' => 'regular-text', ), ), ); return $settings; } add_filter( 'the_content_feed', 'add_overcast_payment_url', 10, 3 ); /** * If we have the option enabled for the measurement service, filter that onto the URL. * * @param string $content The URL pointing to the file download. * @param integer $episode_id The post ID of the podcast episode. * @return string The URL pointing to the file download. */ function add_overcast_payment_url( $content, $episode_id ) { $payment_url = get_option( 'ss_podcasting_payment_url' ); if ( ! empty( $payment_url ) ) { $content = sprintf( "%s\n
", $content, esc_url( $payment_url ) ); } return $content; }