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 | |
function cf_site_creation_confirmation() { { ?> | |
<div class="intro-text important"> | |
All done! We have created your new site succesfully! We also sent you an email with your site details. | |
</div> | |
<?php }} | |
add_action('signup_finished','cf_site_creation_confirmation'); | |
?> |
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 | |
/* | |
* Remove the default final checkout price | |
*/ | |
function cfc_edd_replace_final_total() { | |
remove_action( 'edd_purchase_form_before_submit', 'edd_checkout_final_total', 999 ); | |
} | |
add_action( 'init', 'cfc_edd_replace_final_total' ); | |
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 | |
// Output BuddyPress username through a shortcode | |
function cfc_bp_username ( $atts=null, $content=null ) { | |
global $user_ID; | |
if ( is_user_logged_in() ) { | |
return bp_core_get_username( $user_ID ); | |
} else { | |
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
//Translate BuddyPress Widgets | |
function cfc_widget_title( $title ) { | |
if ( $title == "Members") { | |
$title = __('Members Translation', 'cfctranslation') ; | |
} | |
return $title; | |
} | |
add_filter ( 'widget_title' , 'cfc_widget_title', 21 ); |
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 | |
function bp_login_checked_remember_me_back() { | |
add_filter( 'login_footer', 'bp_login_remember_me' ); | |
} | |
add_action( 'init', 'bp_login_checked_remember_me_back' ); | |
function bp_login_remember_me() { | |
echo '<script type="text/javascript">document.getElementById(\'rememberme\').checked = true</script>'; | |
} | |
add_action( 'wp_footer', 'bp_login_remember_me' ); |
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 | |
function bp_keep_me_logged_in( $expirein ) { | |
return 2629743; // 1 month in seconds | |
} | |
add_filter( 'auth_cookie_expiration', 'bp_keep_me_logged_in' ); | |
?> |
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 | |
function cfc_bp_profile_homepage() | |
//Redirect logged in users from homepage to activity. This happens after login or when a user tries to go back to the homepage. | |
{ | |
global $bp; | |
if( is_user_logged_in() && is_front_page() && !get_user_meta( $user->ID, 'last_activity', true ) ) | |
{ | |
wp_redirect( network_home_url( $bp->activity->root_slug ), 301 ); | |
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 | |
function bptricks_add_handle (){ | |
echo '<span class="bbp-user-nicename"><span class="handle-sign">@</span>'. bp_core_get_username(bbp_get_reply_author_id(bbp_get_reply_id())) .'</span>' ; | |
} | |
add_action( 'bbp_theme_after_reply_author_details', 'bptricks_add_handle' ); | |
?> |
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 | |
/** | |
* Change Default Avatar Size | |
*/ | |
if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) { | |
define( 'BP_AVATAR_THUMB_WIDTH', 80 ); | |
} | |
if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) { | |
define( 'BP_AVATAR_THUMB_HEIGHT', 80 ); |
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 | |
/** | |
* Theme Activation Tour | |
* | |
* This class handles the pointers used in the introduction tour. | |
* @package Popup Demo | |
* | |
*/ | |
class WordImpress_Theme_Tour { |