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 test_bp_message_compose() { | |
// Always check the editor is available to prevent fatals! | |
if ( bp_is_my_profile() && function_exists( 'buddydrive_editor' ) ) { | |
// 'message_content' is the id attribute of the textarea to send private messages | |
buddydrive_editor( 'message_content' ); | |
} | |
} | |
add_action( 'bp_after_messages_compose_content', 'test_bp_message_compose' ); |
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 | |
/** | |
* Filter the querystring when on the activity directory | |
* | |
* @param string/array $query_string component loop arguments | |
* @param sting $object component name | |
* @return string the edited query string | |
*/ | |
function bphelp_ajax_querystring( $query_string, $object ) { |
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 | |
/*** displaying BuddyPress user's home page link if he's connected into a WordPress post, page or text widget ***/ | |
/********* | |
Beginning of the code to paste in the functions.php of your active theme | |
**********/ |
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 | |
/*** based on http://buddydev.com/buddypress/making-buddypress-activity-searchable/ ***/ | |
/* simply paste what follows in your functions.php file */ | |
add_filter( 'bp_search_form_type_select_options', 'kendyman_seventeen_options', 10, 1); | |
function kendyman_seventeen_options( $options ) { | |
$args = 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 | |
/**** beginning of the code to copy in the functions.php file of active theme ****/ | |
function mathieu_hides_friends_nav( $nav_items, $nav_items_args ) { | |
if( is_super_admin() ) | |
return $nav_items; | |
if( bp_is_user() && !bp_is_my_profile() ) | |
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
<?php | |
/** Beginning of the code to copy in the functions.php of your active theme **/ | |
function bastien_own_topic_delete() { | |
if( bp_get_the_topic_is_mine() && ( !bp_is_item_admin() || !bp_is_item_mod() || !bp_current_user_can( 'bp_moderate' ) ) ) { | |
?> | |
<div class="admin-links" style="margin-right:50px!important"> |
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 | |
/*** beginning of the code to paste in the functions.php of your theme ***/ | |
function imath_wants_you_to_be_in_group_to_comment_group_activities( $can_comment ) { | |
global $activities_template; | |
if( !is_super_admin() && $activities_template->activity->component == 'groups' && !groups_is_user_member( bp_loggedin_user_id(), $activities_template->activity->item_id ) ) | |
$can_comment = 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
<?php | |
/* beginning of the code to paste in the functions.php of your active theme */ | |
function imath_activivity_dont_save( $activity_object ) { | |
// friendship_created is fired when a member accepts a friend request | |
// joined_group is fired when a member joins a group. | |
$exclude = array( 'friendship_created', 'joined_group'); | |
// if the activity type is empty, it stops BuddyPress BP_Activity_Activity::save() function |
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 | |
/* | |
beginning of the code to paste in the functions.php of the active theme (twentyten, twentyeleven or twentytwelve) | |
If you want to adapt it to your theme, you'll need to check if it uses some body_class to render its layout and eventually | |
adapt lines 70 to 101. | |
*/ | |
class Imath_WP_Editor_Template | |
{ | |