tags | ||
---|---|---|
|
Create a new repository, or reuse an existing one.
Generate a new SSH key:
ssh-keygen -t rsa -C "your_email@example.com"
Copy the contents of the file ~/.ssh/id_rsa.pub
to your SSH keys in your GitHub account settings (https://github.com/settings/keys).
Test SSH key:
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 | |
global $pmpro_pages, $pmpro_level; | |
if(is_page($pmpro_pages['levels'])) { | |
//on the pricing/levels page | |
} | |
if(is_page($pmpro_pages['checkout'])) { | |
//on the checkout page | |
} |
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 | |
/** | |
* Ensure Paid Memberships Pro compatibility when using the Elementor Page Builder: | |
* https://wordpress.org/plugins/elementor/ | |
* | |
* Your administrator-level account must have a Membership Level in order to edit all of the pages assigned | |
* under Memberships > Pages. | |
* | |
* You must also set a Custom Field on the Membership Checkout page with the key 'pmpro_default_level' and | |
* value of a level ID in order to properly edit your Membership Checkout page using Elementor. |
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
/* CSS Document */ | |
#pmpro_payment_method span a { | |
background-position: left bottom; | |
background-size: contain; | |
background-repeat: no-repeat; | |
display: inline-block; | |
margin-left: 1%; | |
max-width: 300px; | |
padding-bottom: 60px; | |
text-align: left; |
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 Disable All Emails | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-disable-all-emails/ | |
Description: Disable All PMPro Emails | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
Add this file to your /wp-content/plugins/ folder and then activate it from the Plugins page in your WP admin. |
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 code recipe will allow you to hide products on the shop page by their category according to user's membership levels. | |
* This example uses category-1, category-2 and category-3 as category examples. | |
* This code will also stop users from purchasing products if they manage to find these products directly. | |
* Add this code (from line 2) to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
/** |
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 will only show renewal date within 30 days or less than the members expiration. | |
* Add this code from line 7+ to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Visit www.paidmembershipspro.com for help. | |
*/ | |
function show_renewal_link_on_30_days( $r, $level ) { | |
if ( empty( $level->enddate ) ) { | |
return false; |
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
/* | |
Sync PMPro fields to BuddyPress profile fields. | |
*/ | |
function pmprobuddy_update_user_meta($meta_id, $object_id, $meta_key, $meta_value) | |
{ | |
//make sure buddypress is loaded | |
do_action('bp_init'); | |
//array of user meta to mirror | |
$um = array( |
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 | |
/* | |
If checking out for ANY level with an expiration, add remaining days to the enddate. | |
Pulled in from: https://gist.github.com/3678054 | |
*/ | |
function my_pmpro_checkout_level_extend_memberships($level) | |
{ | |
global $pmpro_msg, $pmpro_msgt, $current_user; | |
//does this level expire? are they an existing members with an expiration date? |
NewerOlder