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 | |
// filter the private id generation to supply a numeric private ID | |
add_filter( 'pdb-generate_private_id', 'generate_random_number_id'); | |
function generate_random_number_id( $private_id ) | |
{ | |
// get a 6-digit random number | |
$numeric_id = rand( 100000, 999999 ); | |
// send it back tot he plugin | |
return $numeric_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 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 | |
/** | |
* @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 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
/* | |
Stylesheet for setting up a CSS grid layout for the | |
Participants Database responsive list display | |
*/ | |
/* this is to hide unneeded elements */ | |
.pdb-list-grid .pdb-field-title, | |
.pdb-list-grid h5 { |
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 Multiple Field Match Check | |
* Description: checks a new Participants Database submission against | |
* the database for a matching record using multiple fields | |
* Version: 1.2 | |
*/ | |
add_filter( 'pdb-incoming_record_match', 'xnau_check_for_match', 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 | |
/** | |
* @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 | |
/* | |
* shows a single record display based on a value in the record | |
*/ | |
if ( $this->participant_id ) : ?> | |
<?php | |
switch ( $this->participant_values['type'] ) { | |
case 'player': |
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 showing a Participants Database list with combo multisearch and a dynamic map | |
*/ | |
$listmap = new pdbgmap\listmap($this); | |
global $PDb_Combo_Multi_Search; | |
$PDb_Combo_Multi_Search->enable(); | |
$combo_search = $PDb_Combo_Multi_Search->get_text_search_value(); |