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 | |
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 Contact Form Additions | |
* Description: adds additional fields to the Participants Database contact form | |
* Version: 2.1 | |
*/ | |
add_action( 'pdbcff-before_message_area', 'pdbcfa_add_fields' ); | |
/** | |
* inserts additional fields into the contact form |
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 Generate Member ID | |
* Description: provides a unique ID for new signups and new records in Participants Database | |
* Version: 2.2 | |
*/ | |
class pdb_generate_member_id { | |
/** |
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 Customize Currency Display | |
* Description: replaces a zero value with a custom string | |
*/ | |
add_filter( 'pdb-before_display_form_element', 'xnau_show_currency_value', 10, 2 ); | |
/** | |
* replaces a 0 value with a string | |
* | |
* @param string $display the display string |
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 | |
* |