CAF Donations), this will return false * * @param mixed $amount The amount to be donated * @param mixed $regular Should this be a regular (recurring) donation? * @return string|false */ function abecaf_get_donation_link( $amount = 0, $regular = false ) { $url = abecaf_get_donation_url(); if ( ! $url ) { return false; } $args = [ 'caf_donationamount' => floatval( $amount ) ?? 0, 'caf_paymenttype' => $regular ? 'regular' : 'single' ]; return add_query_arg( $args, $url ); } /** * Register the options page for the plugin * * @return void */ function abecaf_register_options_page() { add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' ); } add_action( 'admin_init', 'abecaf_register_settings' ); /** * Register the settings for the plugin * * @return void */ function abecaf_register_settings() { add_option( 'abecaf_url', '' ); register_setting( 'abecaf', 'abecaf_url', [ 'sanitize_callback' => 'sanitize_url' ] ); } /** * Render the options page for the plugin * * @return void */ function abecaf_options_page() { ?>

A Big Egg - CAF Donations

Enter the URL of your CAF donation page, it should look something like this: https://cafdonate.cafonline.org/10805