Shows how to control which Participants Database fields are availble for editing based on the user's approval status
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 | |
/* | |
* when the user opens their record for editing, we check on their approval status | |
* and then select the shortcode to use based on that. | |
*/ | |
switch ( $this->participant_values['approved'] ) { | |
case 'yes' : | |
echo do_shortcode( '[pdb_record]' ); | |
break; | |
case 'no': | |
case null: | |
echo do_shortcode( '[pdb_record groups=main]' ); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment