Skip to content

Instantly share code, notes, and snippets.

View eighty20results's full-sized avatar

Thomas Sjølshagen eighty20results

View GitHub Profile
@eighty20results
eighty20results / pmpro-bulk-update.php
Last active May 31, 2016 15:17
Proof of Concept for bulk-updating posts with membership protection (if the post didn't previously have protection)
<?php
/*
Plugin Name: PMPro Bulk Update
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Allow updating all posts to a membership level
Version: .1
Author: Thomas Sjolshage <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / pmpro-acto-rh-fields.php
Last active May 25, 2016 23:13
Register Helper fields (customization plugin) for ACTO Online
<?php
/*
Plugin Name: Additional user data for ACTO checkout
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Add Register Helper fields to ACTO chekout & profile pages
Version: .1
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
@eighty20results
eighty20results / allow-fqdn-to-signup.php
Last active May 26, 2016 23:54
Check whether the new member has an email address that matches the specified domain and the level they're trying to sign up for is a free level.
<?php
/*
Plugin Name: PMPro e-mail domain check
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Check if a domain is on the "allow" list for registration
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: http://www.eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / dpesrh-field-defs.php
Created May 8, 2016 15:09
Register Helper Fields for DPES
<?php
/*
Plugin Name: PMPro Register Helper - Extra fields
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Extra registration fields
Version: .1
Author: Thomas Sjolshagen - PMPro Support <thomas@eighty20results.com>
Author URI: http://www.strangerstudios.com/
*/
function dpesrh_RH_fields()
@eighty20results
eighty20results / pmpro-customization.php
Created May 5, 2016 13:37
Create Register Helper fields & sync them with the corresponding BuddyPress fields
<?php
/*
Plugin Name: PMPro Customizations
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Customizations for Paid Memberships Pro
Version: .2
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
@eighty20results
eighty20results / pmpro-apply-addon-access-to-all-child-pages.php
Created March 26, 2016 21:54
Protect all child pages of a page protected by the "Protect Add-on Pages" add-on
<?php
/*
Plugin Name: PMPro Protect Child Pages
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Apply protection to all child pages of a Add-on Page that's protected.
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
*/
/**
@eighty20results
eighty20results / pmpro_preserve_startdate.php
Last active April 16, 2018 19:34
Preserve initial startdate for member regardless of how the membership level is updated.
<?php
/*
Plugin Name: PMPro Preserve Startdate
Plugin URI: https://eighty20results.com/paid-memberships-pro/do-it-for-me/
Description: Customization to preserve initial membership signup (startdate) value.
Version: 1.0
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
*/
/*
@eighty20results
eighty20results / pmpro_custom_expiration_interval.php
Created March 16, 2016 18:27
Allow user to define a custom expiration interval (defined in constant)
<?php
/*
Plugin Name: PMPro Custom Renew Button interval
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Customization to let admin specify how early to show the renew button.
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
*/
@eighty20results
eighty20results / pmpro_next_year_expiration.php
Created March 15, 2016 14:53
For new sign-ups, expire the membership level on Dec 31st, the year after they signed up.
<?php
/*
Plugin Name: PMPro Expire New Memberships Next Year
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Customization to expire new membership sign-ups on Jan 1 the year after, the year after this one.
Version: .1
Author: Thomas Sjolshagen @ Stranger Studios <thomas@eighty20results.com>
Author URI: https://eighty20results.com/thomas-sjolshagen/
*/
function pmpro_next_year_expiration($level)
@eighty20results
eighty20results / pmpro-single-trial-period-per-user.php
Last active March 14, 2016 20:05
During checkout, werify whether user has used the specified "trial" membership level before. If so, prevent them from checking out. User must remember to define the level ID for the trial membership in the PMPRO_CUSTOM_TRIAL_LEVEL constant.
<?php
/*
Plugin Name: PMPro Trial Membership Limits
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: Prevent users from signing up for the Trial Membership Level more than once
Version: .1
Author: Thomas Sjolshagen w/Stranger Studios <thomas@eighty20results.com>
Author URI: http://www.strangerstudios.com
*/
/*