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 Paid Memberships Pro (14 day trial on level 1) | |
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
<?php | |
/* | |
This code assumes you already have custom roles created | |
for bronzemember, silvermember, and goldmember. | |
Members signing up for membership level #1 get "Bronze Member" role. | |
Members signing up for membership level #2 get "Silver Member" role. | |
Members signing up for membership level #3 get "Gold Member" role. | |
Members cancelling are given the subscriber role. | |
Admin users are ignored. | |
*/ |
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
/* | |
Remove user role when users cancel. | |
*/ | |
function my_pmpro_after_change_membership_level($level_id, $user_id) | |
{ | |
if(empty($level_id)) | |
{ | |
//If they are a subscriber, remove their role. | |
$wp_user_object = new WP_User($user_id); | |
if(in_array("subscriber", $wp_user_object->roles)) |
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
genesis_register_sidebar( array( | |
'id' => 'nav-social-menu', | |
'name' => __( 'Nav Social Menu', 'your-theme-slug' ), | |
'description' => __( 'This is the nav social menu section.', 'your-theme-slug' ), | |
) ); | |
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 ); | |
function sws_social_icons($menu, $args) { |
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 in new Widget areas | |
function genesischild_extra_widgets() { | |
genesis_register_sidebar( array( | |
'id' => 'preheaderleft', | |
'name' => __( 'preHeaderLeft', 'genesischild' ), | |
'description' => __( 'This is the preheader Left area', 'genesischild' ), | |
'before_widget' => '<div class="first one-half preheaderleft">', | |
'after_widget' => '</div>', |