Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@kimwhite
kimwhite / requires_membership_posts_columns.php
Last active January 10, 2020 17:44 — forked from strangerstudios/requires_membership_posts_columns.php
Add a "Requires Membership" column to the All Posts dashboard page to show what levels are required to view.
<?php
/**
* Add a Requires Membership Column to All Post view
* This is an easy way to see how your content is being restricted for members.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / requires_membership_pages_columns.php
Last active January 15, 2020 02:52 — forked from strangerstudios/requires_membership_pages_columns.php
Add a "Requires Membership" column to the All Pages dashboard page to show what levels are required to view. Raw
<?php
/**
* Add a Requires Membership Column to All Page view
* This is an easy way to see how your content is being restricted for members.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / requires_membership_categories_columns.php
Last active January 15, 2020 02:56 — forked from strangerstudios/requires_membership_categories_columns.php
Add a "Requires Membership" column to the Categories dashboard page to show what levels are required to view.
<?php
/**
* Show a “Requires Membership” Column on the Categories Screen
* This is an easy way to see how your content is being restricted for members.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / membership-card.php
Last active April 17, 2020 20:21 — forked from ipokkel/membership-card.php
Custom PMPro Membership Card template displaying the renewal date under expiration date
<?php
/**
* Custom membership-card template: Set recurring membership renewal date as expiration date.
* Updated April 17, 2020 to include the qr code
* Place this directly in your theme/child-theme's root directory
* e.g.: example.com/wp-content/themes/{your active theme}/membership-card.php
*/
global $wpdb, $pmpro_membership_card_user, $pmpro_currency_symbol, $post;
if( (in_array('small',$print_sizes)) || (in_array('Small',$print_sizes)) || (in_array('all',$print_sizes)) || empty($print_sizes) )
$print_small = true;
@kimwhite
kimwhite / my_pmpro_required_billing_fields.php
Last active April 22, 2020 13:30 — forked from kimcoleman/my_pmpro_required_billing_fields.php
Make sure address fields are required
<?php
/**
* Make sure address fields are required
*/
function my_pmpro_required_billing_fields( $fields ) {
global $bfirstname, $blastname, $baddress1, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail;
$fields[ 'bfirstname' ] = $bfirstname;
$fields[ 'blastname' ] = $blastname;
$fields[ 'baddress1' ] = $baddress1;
$fields[ 'bcity' ] = $bcity;
@kimwhite
kimwhite / my_pmprorh_tos_init.php
Last active April 24, 2020 13:38 — forked from messica/my_pmprorh_init.php
Additional TOS Page for Register Helper
<?php
/**
* This recipe adds an additional Terms of Service Page for Register Helper
* applies formatting & shortcodes, uses post title for field label
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / show_login_register_links_on_member_pages.php
Last active May 5, 2020 16:02 — forked from strangerstudios/show_login_register_links_on_member_pages.php
Show a login/register link at the bottom of any post that uses PMPro's membership shortcode.
@kimwhite
kimwhite / profile.php
Last active May 18, 2020 15:43 — forked from ipokkel/profile.php
Custom profile page template for PMPro Member Directory with an "Edit Profile" link for current user.
<?php
/*
Custom profile template for the PMPro Member Directory Add On version .6.1
Add "Edit Profile" link at the bottom of the member information - remove
if a member is viewing thier own profile.
Note: Custom templates may require review and updates with every plugin version update.
updated for Version 0.7 May 2020
To use this custom template,
create the following folders in your active theme directory:
{your-theme}/paid-memberships-pro/pmpro-member-directory/
@kimwhite
kimwhite / pmpro-add-paypal-express-checkout-instructions-to-pay-by-check.php Adds PayPal Express Instructions to the Pay by Check addon. Edit the variable 'paypal_instructions' to change the message.
<?php
/**
* This recipe will let you add a message above your paypal button at checkout
* if using PayPal Express as the Gateway
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@kimwhite
kimwhite / pmpro-redirect-to-last-page-viewed.php
Last active July 8, 2020 17:44 — forked from greathmaster/pmpro-redirect-to-last-page-viewed.php
Redirect to last page viewed on checkout confirmation.
<?php
/**
* This recipe will redirect to last page viewed on checkout confirmation.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/