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 | |
/** | |
* Plugin Name: PDB Populate Chosen Dropdown | |
* Description: tests loading a chosen element with options | |
* | |
* sets our function to be called when the pdbcde-before_element_rendered action | |
* is triggered by the form just before the "Chosen Dropdown" is shown so we can | |
* change the list of options to show | |
*/ | |
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 | |
/** | |
* @wordpress-plugin | |
* Plugin Name: Set Decimal Datatype | |
* Description: set a custom datatype for a Participants Database decimal form element | |
*/ | |
add_filter( 'pdb-form_element_datatype', 'xnau_set_decimal_type', 10, 2 ); | |
/** | |
* sets the datatype for decimal 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
<?php | |
/* | |
* | |
* template for participants list search form | |
* | |
*/ | |
?> | |
<div class="wrap <?php echo $this->wrap_class ?>"> | |
<?php echo $this->search_error_style ?> | |
<div class="pdb-searchform"> |
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 | |
/** | |
* @wordpress-plugin | |
* Plugin Name: PDB Allow HTML | |
* Description: Installs a filter allowing HTML in Participants Database text fields | |
*/ | |
add_filter( 'pdb-text_field_output', 'xnau_allow_html_in_text', 10, 2 ); | |
/** | |
* allows sanitized HTML in text 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
<?php | |
/** | |
* @wordpress-plugin | |
* Plugin Name: Unapprove Unpaid Records | |
* Description: unapproves the record if the account has not been paid | |
*/ | |
add_action( 'pdbmps-status_change_to_due', 'xnau_unapprove_unpaid_account' ); | |
/** | |
* unapproves the record if the payment lapses | |
* |
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 | |
/* | |
* demonstrates a profile payment form where the payment is controlled by the member's payment status | |
*/ | |
?> | |
<div class="wrap <?php echo $this->wrap_class ?>"> | |
<?php | |
if ( !empty( $this->participant_id ) ) : | |
// output any validation errors |
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 | |
/* | |
Plugin Name: Redirect PDB Login | |
Description: Alters the redirect according to a value in the user's record when using the PDB Login add-on | |
*/ | |
add_action( 'pdb-login_after_validate_submission', 'xnau_setup_pdb_login_redirect', 10, 2 ); | |
/** | |
* sets up the redirect filter | |
* | |
* this checks the newly-logged-in user's record and |
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 | |
/* | |
* | |
* template for participants list shortcode output | |
* | |
* demonstrates how to control the display of some fields based on the value of another field | |
* | |
*/ | |
// these are the fields that we are controlling the display of |
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 | |
/* | |
* Plugin Name: PDb Multi-Field Match Import | |
* Description: Demonstrates how to set up a multiple-field match when a signup form is submitted or importing a CSV to Participants Database | |
* Version: 2.0 | |
* | |
*/ | |
class PDb_Multifield_Match_Import { | |
/** |
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 | |
// place the filter on the posted data before it is submitted | |
add_filter( 'pdb-before_submit_signup', 'xnau_conditional_signup_redirect' ); | |
/** | |
* changes the signup form "thanks" page depending on a value in the form | |
* | |
* @param array $post the posted data | |
* @return array post data | |
*/ | |
function xnau_conditional_signup_redirect( $post ) |