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 | |
/** | |
* @name pdb single template bootstrap | |
* @version 2.1 | |
* | |
* default template for displaying a single record for the twitter bootstrap framework | |
* | |
* http://twitter.github.com/bootstrap/ | |
* | |
*/ |
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 Custom Admin Capabilities | |
Description: Sets up the use of custom admin capabilities for Participants Database | |
*/ | |
add_filter( 'pdb-access_capability', 'xnau_setup_admin_capabilities', 10, 2 ); | |
/** | |
* sets the custom capabilities for use with the plugin | |
* | |
* @param string $capability the default capability for the role |
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 single record output | |
* | |
* use this template with a shortcode like this: [pdb_list template=single] | |
* if you want to show the search control, use this: | |
* [pdb_list search=true template=single] | |
* | |
*/ |
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 | |
add_filter( 'pdbcptet-recipient_tags', 'xnau_filter_recipients' ); | |
/** | |
* replaces the recipient identifier with the recipient's email address | |
* | |
* @param array $tag_list the tag replacement data | |
* @return array | |
*/ | |
function xnau_filter_recipients( $tag_list ) | |
{ |
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 | |
/** | |
* add fields to the single record links | |
* | |
* @param array $fields the defined single record fields | |
* @return array | |
*/ | |
function xnau_set_single_record_link_fields( $fields ) { | |
return array_merge( $fields, array( 'first_name','last_name','photo' ) ); | |
} |
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 | |
/** | |
* bypass HTML sanitizing on the "home_page" field | |
* | |
* @param string $text the sanitized text | |
* @param object $field the current field object | |
* @return string the display string | |
*/ | |
function xnau_bypass_homepage_field_sanitize( $text, $field ) { | |
if ( $field->name === 'home_page' ) { |
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 Comma Decimal Separator Display | |
* Description: alters the display of decimal numbers to use comma as the decimal separator, and point as the thousands separator | |
*/ | |
add_filter('pdb-before_display_form_element', 'xnau_show_comma_decimals', 10, 2 ); | |
function xnau_show_comma_decimals( $display, $field ) | |
{ | |
// we are only modifying these form element types | |
if ( $field->form_element === 'decimal' || $field->form_element === 'currency' ) { |
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 Limit Signups | |
* Description: Adds a count of the number of Participants Database signups, and prevents new signups | |
* once a number of registrations has been reached | |
*/ | |
add_filter( 'pdb-signup_shortcode_output', 'xnau_limit_signups' ); | |
/** | |
* adds a display of the number of signups and prevents signups once a limit is reached | |
* |
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 Custom Link Recovery | |
* Description: sets up a private link recovery using two or more fields to find the record | |
*/ | |
add_filter( 'pdb-find_record_match', 'xnau_custom_link_recovery', 10, 3 ); | |
/** | |
* finds a match for a link recovery submission | |
* |
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 Defeat Timezone Sync | |
* Description: disables Participants Database synchronizing the php timezone with the WordPress timezone | |
*/ | |
add_filter( 'pdb-php_timezone_sync', function () { return false; } ); |