Skip to content

Instantly share code, notes, and snippets.

View xnau's full-sized avatar

Roland Barker xnau

View GitHub Profile
@xnau
xnau / pdb-admin-exclusive-options.php
Last active April 1, 2024 21:08
Plugin to enable the exclusive option feature in the admin record edit in Participants Database
<?php
/**
* Plugin Name: PDB Admin Exclusive Options
* Description: enables exclusive options in the admin record editor
* Version: 1.1
*/
class pdb_admin_exclusive_options {
@xnau
xnau / pdb-age-detail-format-tag.php
Created March 31, 2024 07:04
Shows how to create a custom format tag for a Participants Database calculated field
<?php
/**
* Plugin Name: PDB Age Detail Format Tag
* Description: shows how to add a custom formatting tag for use in a Participants Database calculated field
* Version: 1.0
*
*/
class PDb_age_detail_format_tag
@xnau
xnau / pdb-email-cron.php
Last active March 27, 2024 18:12
Shows how to set up a Participants Database email that will automatically send when conditions are met
<?php
/**
* Plugin Name: PDB Email Cron
* Plugin URI: https://xnau.com/?p=7354
* Description: Provides a basic framework for setting up an automated Participants Database email send
* Version: 1.0
* Author: xnau webdesign
* Author URI: https://xnau.com
* License: GPL2
@xnau
xnau / pdb-session-init.php
Created March 17, 2024 01:05
WordPress MU plugin for initializing a php session early in the load cycle
<?php
/*
* Plugin Name: Participants Database Session initializer
* Plugin URI: https://wordpress.org/plugins/participants-database/
* Description: Attempts to initate a php session before headers are sent
* Author: xnau webdesign
* Version: 0.1
* Author URI: http://xnau.com
*/
@xnau
xnau / pdb-a-unminify-js.php
Created March 1, 2024 18:31
Shows how to override javascript minification in Participants Database
<?php
/**
* Plugin Name: PDB Don't Minify JS
* Description: overrides the use of built-in minified javascript in Participants Database
*/
add_filter( 'pdb-use_minified_assets', function($enabled){
return false;
} );
@xnau
xnau / pdb-list-usercontent.php
Created February 28, 2024 18:15
Demonstrates a simple way to control the Participants Database list display based on the logged-in user
<?php
/**
* participants database list template that shows special content for logged-in users
*/
if ( is_user_logged_in() )
{
do_shortcode( '[pdb_list search=true template="edit-link"]' );
}
else
{
@xnau
xnau / pdb-dynamicfield-cron-updater2.php
Last active February 11, 2024 04:43
Shows how to update single Participants Database dynamic field triggered by a cron
<?php
/**
* Plugin Name: PDB Dynamic Field Cron Updater Version 2
* Description: updates a dynamic field automatically on a WP cron
* Version: 2.0
*/
class PDb_Dynamicfield_Cron_Updater2
{
@xnau
xnau / pdb-dynamicfield-cron-updater.php
Last active February 7, 2024 22:46
Shows how to update Participants Database calculated field using a cron.
<?php
/**
* Plugin Name: PDB Dynamic Field Cron Updater
* Description: updates dynamic fields automatically on a WP cron
* Version: 1.0
*/
class PDb_Dynamicfield_Cron_Updater
{
@xnau
xnau / pdb-dynamicfield-update.php
Last active February 7, 2024 18:00
Shows how to update dynamic fields after a signup is submitted
<?php
/**
* Plugin Name: PDB Dynamic Field Updater
* Description: updates dynamic fields automatically after a signup submission
* Version: 1.0
*/
class PDb_Dynamicfield_Update
{
/**
@xnau
xnau / pdb-auto-search-mode.php
Last active December 1, 2023 03:38
Demonstrates a Participants Database plugin that sets the "strict user searches" mode according to the presence of a wildcard in the search term
<?php
/**
* Plugin Name: PDB Auto Search Mode
* Description: switches the "strict user search" mode off if there is a wildcard in the search term
* Author: xnau webdesign
* Version: 1.2
*/
class pdb_auto_search_mode {