Created
May 20, 2014 08:36
-
-
Save corsonr/101d4fa2c7178de9ca2a to your computer and use it in GitHub Desktop.
WPdonations: Editing Submit Donation Form Fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add your own function to filter the fields | |
add_filter( 'submit_donation_form_fields', 'custom_submit_donation_form_fields' ); | |
// This is your function which takes the fields, modifies them, and returns them | |
// You can see the fields which can be changed in: includes/forms/class-wpdonations-form-submit-donation.php | |
function custom_submit_donation_form_fields( $fields ) { | |
// Here we target one of the donation fields (donation_amount) and change it's label | |
$fields['donation']['donation_amount']['label'] = "Custom Label"; | |
// And return the modified fields | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment