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
<!-- Open External Link in new window --> | |
<script type='text/javascript'> | |
//<![CDATA[ | |
window.onload = function () { | |
var links = document.getElementById('main-nav-http://labsecrets.com').getElementsByTagName('a'); | |
for (var i = 0; i < links.length; i++) { | |
links[i].setAttribute('target', '_blank'); | |
} | |
} | |
//]]> |
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
Forums | |
[bbp-forum-index] - Show the forum index/archive | |
[bbp-single-forum id=$forum_id] - Show a single forums topics | |
Topics | |
[bbp-topic-index] - Show the topics index/archive | |
[bbp-topic-form] - Show the new topic form | |
[bbp-single-topic id=$topic_id] - Show a single topic |
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
To ensure that your video embeds respond to changes in browser | |
size and scale, wrap your video embed code with the following | |
division class: | |
<div class="video-container"> | |
<iframe src="YOUR VIDEO EMBED CODE HERE"></iframe> | |
</div> |
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 Back to Last Page After Login */ | |
/* Adam J Nowak - */ | |
/* http://code.hyperspatial.com/1353/bp-admin-bar-login-redirect */ | |
/*------------------------------------------------------------------*/ | |
function lab_login_redirect(){ | |
global $bp; | |
remove_action('bp_adminbar_menus','bp_adminbar_login_menu',2); | |
if(is_user_logged_in()) 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
<div style="text-align:center;border:1px solid #666666; | |
padding: 5px; text-align: center;"> | |
<h3>Yo! Our site now has<br/> | |
<span style="font-size:66px; font-family:trebuchet; | |
color:red;"><?php bp_total_member_count() ?></span> | |
<br/>Active Members!<br/>Can you dig it? | |
</div> |
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 now works on both members list and individual profile pages. Note that "birthdate" is name of profile date field - change as needed | |
* Get Age from BuddyPress date of Birth | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> string $dob_field_name :name of the DOB field in xprofile, like Dob or Date of Birth | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> int $user_id : the user for which you want to retrieve the age | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> string $format: the way you want to print the difference, look t <http://php.net/manual/en/dateinterval.format.php> for the acceptable agrs | |
* @return string :the formatted age in year/month | |
*/ | |
function bpdev_get_age_from_dob($birthdate,$user_id=false,$format="%y Years, %m Month(s), %d days"){ |
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
/* | |
Requires PMPro v1.4+ | |
Code to delete WP user accounts when a member cancels their PMPro account. | |
Users are not deleted if: | |
(1) They are not cancelling their membership (i.e. $level_id != 0) | |
(2) They are an admin. | |
(3) The level change was initiated from the WP Admin Dashboard | |
(e.g. when an admin changes a user's level via the edit user's page) | |
*/ | |
function my_pmpro_after_change_membership_level($level_id, $user_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: 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 |
OlderNewer