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 Auto Unapprove | |
* Description: sets the record approval field to "no" when the user edites their record | |
*/ | |
add_action( 'pdb-after_submit_update', 'xnau_auto_unapprove' ); | |
/** | |
* sets the approval field to "no" when a user updates their record | |
* | |
* @param array $post the posted data |
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 opengraph template | |
* @version 0.1 | |
* | |
* template for printing opengraph meta tags | |
* | |
* this variant is for use with the Participants Database Image Expansion add-on | |
* | |
* simplified information on using social media meta tags can be found here: |
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 opengraph template | |
* @version 0.1 | |
* | |
* template for printing opengraph meta tags | |
* | |
* simplified information on using social media meta tags can be found here: | |
* https://css-tricks.com/essential-meta-tags-social-media/ | |
* |
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 Add Facebook/Twitter Meta Tags | |
* Description: place metadata tags in the header of a single record page | |
*/ | |
// this will fire just before the end of the page <head> tag | |
add_action( 'wp_head', 'xnau_place_opengraph_tags', 100 ); | |
/** | |
* places the meta tags in the page head |
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; } ); |
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 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 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 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 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 { | |
/** |