This file contains hidden or 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 | |
/** | |
* Add Company information from usermeta to PMPro Memberslist | |
* | |
*/ | |
// Add 'Company' Column to Members List Header | |
add_action( 'pmpro_memberslist_extra_cols_header', 'pmpro_add_company_to_memberslist_header' ); | |
// Add 'Company' Column to Members List Rows |
This file contains hidden or 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 | |
/** | |
* Adds dropdown for bbPress user role with Moderator and Participant as options | |
*/ | |
add_action( 'pmpro_add_member_fields', 'add_bbpress_role_to_add_member' ); | |
add_action( 'pmpro_add_member_added', 'pmpro_add_forum_role', 11 ); | |
function add_bbpress_role_to_add_member( $profileuser ) { | |
global $wp_roles; |
This file contains hidden or 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
/* | |
Perform an action on PMPro recurring orders only. | |
A recurring order here is one that | |
(1) Has an earlier order with the same subscription_transaction_id. | |
(2) Is not created at PMPro checkout. | |
Note that we are checking if function_exists for pmpro_isOrderRecurring incase | |
we add this to PMPro core. Also note that the $test_checkout param there is used | |
here to avoid #2 above. So this parameter will check if the currently running PHP | |
script is being fired at checkout, not necessarily if the order was created at checkout, |
This file contains hidden or 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 // Don't include in Customizations plugin | |
/** | |
* Plugin Name: PMPro Primer | |
* Description: A dashboard menu, `pmpro_primer_page`, with some helpful PMPro functions. | |
* Author: pbrocks | |
* Version: 1.0.1 | |
* Text-Domain: pmpro-primer-menu | |
*/ | |
/** | |
* Add a page to the primer menu. |
This file contains hidden or 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 // if placed in Customizations plugin, do not include this line. | |
/** | |
* This is a Checkout page diagnostic to see how to change the text of what | |
* Paid Memberships Pro produces and also highlights each of the areas where | |
* special actions can be run to insert text or other dynamic information. | |
*/ | |
/** | |
* Plugin Name: Checkout Page Text Changes | |
* |
This file contains hidden or 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 // do not include in customizations plugin | |
/** | |
* | |
* Change cancellation date to match next payment | |
* | |
* Add to PMPro Customizations plugin | |
*/ | |
add_action( 'pmpro_after_change_membership_level', 'pmpro_cancel_at_end_of_period', 10, 2 ); | |
add_filter( 'pmpro_email_body', 'pmpro_email_body_for_cancel_msg', 10, 2 ); |
This file contains hidden or 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
;(function($){ | |
/* | |
Script Name: WP Auto Installer | |
Author: Mohan Dere | |
Version: 1.0 | |
Description : This script install new wordpress setup, create database with tables with content & run search replace database for new urls. | |
Last Update: 13 Mar 15 | |
*/ |
This file contains hidden or 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 // Do not include this line in your Customizations plugin | |
/** | |
* Require specific category user meta to view posts in designated categories. | |
* Custom price-adjusting fields are added via PMPro Register Helper add on (required). | |
* Add all of this code to your active theme's functions.php or a custom plugin. | |
*/ | |
add_filter( 'pmpro_has_membership_access_filter', 'my_pmpro_additional_categories', 10, 4 ); | |
function my_pmpro_additional_categories( $hasaccess, $thepost, $theuser, $post_membership_levels ) { | |
global $wpdb; |
This file contains hidden or 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 // do not copy to Customizations plugin | |
/** | |
* After expiration, assign them a specific "cancelled" level. | |
* | |
* Can be used to downgrade someone to a free level when they cancel. | |
* Will allow members to the "cancel level" to cancel from that though. | |
*/ | |
function pmpro_upon_expiration_change_membership_levels( $level_id, $user_id ) { | |
// set this to the id of the original level | |
$last_level_2 = 2; |
This file contains hidden or 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 // Do not copy this tag. | |
/** | |
* Convert capital letters to lowercase and replace all spaces with an underscore when | |
* new users register for Paid Memberships Pro. | |
* Add this code to your PMPro Customizations Plugin - | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_custom_user_registration_changes( $userdata ) { |