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 | |
/** | |
* post-process.php | |
* make sure to include post-process.php in your functions.php. Use this in functions.php: | |
* | |
* get_template_part('post-process'); | |
* | |
*/ | |
function do_insert() { | |
if( 'POST' == $_SERVER['REQUEST_METHOD'] |
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
/* | |
Redirect to login or homepage if user is logged out or not a member | |
Add this code to your active theme's functions.php file. | |
*/ | |
function my_template_redirect() | |
{ | |
global $current_user; | |
$okay_pages = array(pmpro_getOption('billing_page_id'), pmpro_getOption('account_page_id'), pmpro_getOption('levels_page_id'), pmpro_getOption('checkout_page_id'), pmpro_getOption('confirmation_page_id')); | |
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: Scroll-To-Top Admin Bar | |
Description: Click anywhere on the Admin Bar that doesn't have a predefined purpose (links, input), and it'll scroll you to the top | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com | |
*/ | |
add_action( 'wp_head', 'add_jq' ); | |
add_action( 'admin_head', 'add_jq' ); |
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 | |
// place and run in ./plugins/bbpress/bbp-themes | |
$dirs = array( './bbp-twentyten', './bbp-twentyten/bbpress' ); | |
$actions = array(); | |
$filters = 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 | |
/* | |
Plugin Name: No Howdy | |
Description: Removes "Howdy, " from the toolbar | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.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 | |
/* | |
Plugin Name: PMPro Shipping | |
Plugin URI: https://gist.github.com/gists/1894897/ | |
Description: Add shipping to the checkout page and other updates. | |
Version: .2.1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
Note that this plugin requires PMPro 1.3.19 or higher to function fully. |
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 | |
/** | |
* Database emtpying and file removing class. | |
* | |
* Truncates all necessary tables in the defined database and removes | |
* any files uploaded by the demo user. | |
* | |
* @since 1.0.0 | |
* | |
* @author Thomas Griffin |
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
/* | |
Set levels as "all access levels" so members of these levels will be able to view all Addon Packages. | |
Requires Paid Memberships Pro and the pmpro-addon-packages plugin. | |
*/ | |
function my_pmproap_all_access_levels($levels, $user_id, $post_id) | |
{ | |
//I'm just adding the level, but I could do some calculation based on the user and post id to programatically give access to content | |
$levels = array(16); | |
return $levels; | |
} |
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
/* | |
This code will create a content filter for all pages and posts to remove access to posts that were published before a member's join date. Only posts or pages which require membership will be hidden. Note that pages and posts that require membership will still be hidden from non-members regardless of the publish date. | |
The params passed are: | |
$hasaccess - (bool) what PMPro thinks about whether the user has access | |
$thepost - (post object) the post being checked, usually the current post | |
$theuser - (user object) the user being checked, usually the current user | |
$post_membership_levels - (array of levels) the levels this post requires (if any) | |
*/ | |
add_filter("pmpro_has_membership_access_filter", "hide_old_posts_from_members", 10, 4); |
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: Fix bbPress roles for s2member | |
Plugin URI: http://roughsmootheng.in | |
Version: 1.0 | |
Description: This plugin adds s2member roles to the user_role_map for bbPress. | |
Author: Darren Ethier | |
Author URI: http://www.roughsmootheng.in | |
*/ |
OlderNewer