Created
February 27, 2018 19:21
-
-
Save kimcoleman/c414bf7f6f9d741e9fd89981121e6cf5 to your computer and use it in GitHub Desktop.
Register Helper custom fields for irishhealer.
This file contains hidden or 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 irishhealer. | |
*/ | |
function irishhealer_pmprorh_init() { | |
// Don't break if Register Helper is not loaded. | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { | |
return false; | |
} | |
$indemnity_consent_content = get_post_field( 'post_content', 743 ); | |
// Define the fields. | |
$fields = array(); | |
$fields[] = new PMProRH_Field( 'junior_first_name', 'text', array( 'label' => 'First Name (Junior)', 'levels' => array( '2' ), 'profile' => true, 'required' => true ) ); | |
$fields[] = new PMProRH_Field( 'junior_first_name', 'text', array( 'label' => 'Last Name (Junior)', 'levels' => array( '2' ), 'profile' => true, 'required' => true ) ); | |
$fields[] = new PMProRH_Field( 'indemnity_consent_textarea', 'html', array( 'name' => '<textarea>' . $indemnity_consent_content . '</textarea>' ) ); | |
$fields[] = new PMProRH_Field( 'indemnity_consent', 'checkbox', array( 'label' => 'I agree to the Indemnity Statement.', 'levels' => array( '2' ), 'profile' => true, 'required' => true ) ); | |
$fields[] = new PMProRH_Field( 'signed_medical_declaration', 'file', array( 'label' => ' Upload your signed Medical Declaration.', 'profile' => true, 'required' => true ) ); | |
pmprorh_add_checkout_box( 'information', 'Additional Information' ); | |
foreach ( $fields as $field ) { | |
pmprorh_add_registration_field( 'information', $field ); | |
} | |
} | |
add_action( 'init', 'irishhealer_pmprorh_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment