This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 class when it's not a BuddyPress page | |
*/ | |
function cfc_base_wordpress_page( $classes ) | |
{ | |
if ( ! is_buddypress() ) { | |
$classes[] = 'wordpress-page'; | |
} |
This file contains hidden or 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 BP widgets everywhere except the main BuddyPress site. | |
add_action( 'bp_include', 'firmasite_bp_include_remove_widgets', 5 ); // priority is crucial | |
function firmasite_bp_include_remove_widgets() { | |
if ( !bp_is_root_blog() && !bp_is_multiblog_mode() ) | |
remove_all_actions( 'bp_register_widgets' ); | |
} | |
?> |
This file contains hidden or 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 | |
// Profile Edit Message | |
function cf_profile_field_intro_text() { { ?> | |
<?php | |
global $bp; | |
$user_id = $bp->loggedin_user->id; | |
$profile_edit_link = bp_loggedin_user_domain() . $bp->profile->slug . 'profile/edit/group/2/'; | |
if ( bp_get_profile_field_data( 'field=Your Relationship with CF&user_id='.$user_id) == FALSE && !bp_is_profile_edit() ) : ?> | |
<div id="complete-profile-message" class="intro-text important"> |
This file contains hidden or 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_tricks_member_intro_text() { { ?> | |
<script type='text/javascript'> | |
jQuery( document ).ready(function() { | |
// Member Directory Message | |
if (!jQuery.cookie('member-alert-message')) { | |
jQuery( "#member-welcome-message" ).show(); | |
jQuery("#expand-hidden").click(function() { | |
jQuery( "#member-welcome-message" ).slideUp( "slow" ); | |
// set the cookie for 24 hours |
This file contains hidden or 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 ( have_rtmedia () ) { ?> | |
<div class="widget"> | |
<h4>Recent Photos</h4> | |
<div class="rtmedia-container"> | |
<ul class="rtmedia-list rtmedia-list-media <?php echo rtmedia_media_gallery_class (); ?>"> | |
<?php while ( have_rtmedia () ) : rtmedia (); ?> | |
<li class="rtmedia-list-item" id="<?php echo rtmedia_id(); ?>"> | |
<a href ="<?php rtmedia_permalink(); ?>" title="<?php echo rtmedia_title(); ?>" class="<?php echo apply_filters( 'rtmedia_gallery_list_item_a_class', 'rtmedia-list-item-a' ); ?>"> | |
<div class="rtmedia-item-thumbnail"> |
This file contains hidden or 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
jQuery('ul#activity-stream').on('DOMNodeInserted', function() { | |
// Your jQuery Magic here | |
}); |