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: PMPro SpacesEngine Integration | |
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for integrating Paid Memberships Pro with SpacesEngine | |
Version: 1.0 | |
Author: Brandon Meyer | |
Author URI: https://collabanthnetwork.org | |
*/ |
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 | |
// add the below to your functions file | |
// then visit the page that you want to see | |
// the enqueued scripts and stylesheets for | |
function se_inspect_styles() { | |
global $wp_styles; | |
echo "<h2>Enqueued CSS Stylesheets</h2><ul>"; | |
foreach( $wp_styles->queue as $handle ) : | |
echo "<li>" . $handle . "</li>"; |
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 | |
/** | |
* This function will stop any user's that aren't validated from logging into your WordPress website. | |
* This requires PMPro Email Confirmation - https://www.paidmembershipspro.com/add-ons/email-confirmation-add-on/ | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Visit https://paidmembershipspro.com for further assistance. | |
*/ | |
function pmpro_check_login( $user, $password ) { |
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: Paid Memberships Pro - Australia GST | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-australia-gst/ | |
Description: Apply Australia GST to Checkouts with PMPro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ | |
/* |
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
/** | |
* Testing the pmprosed_fixDate function. | |
* 1. Make sure PMPro and PMPro Set Expiration Dates is active. | |
* 2. Add this code to a custom plugin. | |
* 3. Visit ?test_date_functions=1 to a URL | |
* 4. Remember to remove the code when done. | |
*/ | |
function test_set_expiration_dates() { | |
if( empty( $_REQUEST['test_date_functions'] ) ) { | |
return; |
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
/* | |
Add bcc for PMPro admin emails | |
*/ | |
function my_pmpro_email_headers_admin_emails($headers, $email) { | |
//bcc emails already going to admin_email | |
if(strpos($email->template, "_admin") !== false && strpos($email->template, "checkout") !== false) | |
{ | |
//add bcc | |
$headers[] = "Bcc:" . "[email protected]"; | |
} |
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 | |
/* | |
* Redirects members-only content to the Membership Levels page if a user is logged out or not a member. | |
*/ | |
function my_template_redirect_require_membership_access() { | |
if ( function_exists( 'pmpro_has_membership_access' ) && ( ! pmpro_has_membership_access() || pmpro_hasMembershipLevel( array( '1' ) ) ) ) { | |
wp_redirect( pmpro_url( 'levels' ) ); | |
exit; | |
} |
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 | |
// Copy from below here... | |
/* | |
* Add widget to checkout to get result of checkout_levels API call when button is pressed. | |
*/ | |
function my_pmpro_test_checkout_levels_api() { | |
?> | |
<hr/> |
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: PMPro Customizations | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for PMPro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ | |
/* |
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
/* | |
Allow non-members to view restricted posts if they are less than 30 days old. | |
Add this code to a custom plugin. | |
Change the '-30 Days' below if you'd like to allow access for longer or shorter. | |
*/ | |
function open_new_posts_to_non_members($hasaccess, $thepost, $theuser, $post_membership_levels) | |
{ | |
global $wpdb; |
NewerOlder