Created
September 24, 2019 22:00
-
-
Save kimcoleman/812c977e5484b6b8be113cc6ebf8b6e1 to your computer and use it in GitHub Desktop.
Register Helper Custom Fields for aatherapy.org
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
<?php | |
// Register Helper Custom Fields for PMPro | |
function aatherapy_pmprorh_init() { | |
//don't break if Register Helper is not loaded | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { | |
return false; | |
} | |
//define the fields | |
$fields = array(); | |
$fields[] = new PMProRH_Field( | |
'licenses', | |
'text', | |
array( | |
'label' => 'Licenses/Certifications', | |
'size' => 40, | |
'profile' => true | |
) | |
); | |
$fields[] = new PMProRH_Field( | |
'pet_name', | |
'text', | |
array( | |
'label' => 'Therapy Pet Name', | |
'size' => 40, | |
'profile' => true | |
) | |
); | |
$fields[] = new PMProRH_Field( | |
'pet_breed', | |
'text', | |
array( | |
'label' => 'Therapy Pet Breed', | |
'size' => 40, | |
'profile' => true | |
) | |
); | |
pmprorh_add_checkout_box( 'member_information', 'Member Information' ); | |
foreach ( $fields as $field ) { | |
pmprorh_add_registration_field( | |
'member_information', | |
$field | |
); | |
} | |
} | |
add_action( 'init', 'aatherapy_pmprorh_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment