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: Participants Database Update Notify | |
Description: Notifies the user when their record is updated | |
*/ | |
/* | |
* before the update is stored, send an email notification to the participant | |
*/ | |
add_filter( 'pdb-before_submit_update', 'pdb_send_record_update_notification' ); |
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: Participants Database Send Welcome On Approval | |
Description: Sends the welcome email when a record is approved. | |
*/ | |
/* | |
* check the new record data before the record is updated | |
*/ | |
add_filter( 'pdb-before_submit_update', 'pdb_send_record_update_notification' ); |
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 Array Form Element | |
* Description: a demonstration of the basic technique for creating a custom form element in Participants Database | |
* | |
*/ | |
add_filter( 'pdb-set_form_element_types', 'my_array_register_element' ); | |
add_action( 'pdb-form_element_build_array','my_array_element_building_function' ); | |
add_filter( 'pdb-before_display_form_element','my_array_element_value_display_function', 10, 2 ); |
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 External List Links | |
* Description: makes Participants Database list links to external sites open in a new tab | |
* Version: 2.0 | |
*/ | |
add_filter( 'pdb-before_display_form_element', 'xnau_alter_external_links', 10, 2 ); |
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 with a record edit link | |
* | |
*/ | |
/* | |
* this is the name of the field that will hold the edit link | |
* |
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 | |
/* | |
* bootstrap template for signup form | |
* | |
* demonstrates a simple dependent selector | |
* | |
* the cities available for selection are constrained by the selected state | |
* | |
*/ | |
?> |
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
<script> | |
jQuery(function($){ | |
// name of the parent field | |
var parent = 'state'; | |
// name of the child field | |
var child = 'city'; | |
// defines the parent selector dropdown | |
var parent_select = $('select[name='+parent+']'); |
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 | |
/** | |
* validates a field submission for a valid URL | |
* | |
* @param PDb_Validating_Field $field | |
* @return null | |
*/ | |
function xnau_check_valid_url( $field ) | |
{ | |
// first, check to see if it is the field we want to validate |
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 | |
/** | |
* adds a custom validation error message | |
* | |
* @param array $error_messages | |
* @return array | |
*/ | |
function xnau_add_url_validation_error_message( $error_messages ) | |
{ | |
// add our message with a placeholder for the field name |
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
<div class="wrap <?php echo $this->wrap_class ?>"> | |
<?php | |
if (!empty($this->participant_id)) : | |
// output any validation errors | |
$this->print_errors(); | |
?> | |
<?php | |
// print the form header |
OlderNewer