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 | |
/* | |
* Blog Comments in Buddypress Activity | |
* WARNING: Test thoroughly if it works in your environment before using in production code. | |
* LICENSE: Public domain | |
*/ | |
/* | |
* When a new comment gets added to the database, add this comment to the |
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 | |
add_filter( 'yz_show_profile_comments_tab_if_user_has_comments', '__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 | |
/** | |
* Change Images Compression Quality | |
*/ | |
function yzc_attachments_compression_quality( $quality ) { | |
// By default the quality is : 80. | |
return 80; | |
} | |
add_filter( 'yz_attachments_compression_quality', 'yzc_attachments_compression_quality' ); |
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 | |
/** | |
* Display Posting Form In Friends Wall. | |
*/ | |
add_action( 'bp_before_member_activity_post_form', 'yzc_add_posting_form_in_friends_wall' ); | |
function yzc_add_posting_form_in_friends_wall() { | |
if ( is_user_logged_in() && ! bp_is_my_profile() && bp_is_user() ) { | |
add_filter( 'gettext', 'yzc_change_whats_new_msg', 10 ); |
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 | |
/** | |
* Sort last commented posts to the top of activity line | |
* Source: http://techiescircle.com/move-new-commented-activity-stream-to-top/ | |
*/ | |
function yzc_bp_activity_bump_comment_posted( $comment_id, $params ) { | |
global $bp, $wpdb; |
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 | |
/** | |
* Show Only Friends and Groups Activities | |
*/ | |
function yzc_friends_and_groups_only_activity_args( $args ) { | |
if( ! bp_is_activity_directory() || ! is_user_logged_in() ) { | |
return $args; | |
} | |
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 | |
/** | |
* Sync About Me Widget - Image. | |
*/ | |
function yzc_sync_profile_about_me_widget_image( $photo_url = null, $user_id ) { | |
if ( ! empty( $photo_url ) || bp_is_current_component( 'widgets' ) ) { | |
return $photo_url; | |
} |
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 | |
/** | |
* Add Content Above Members Directory. | |
*/ | |
function yzc_add_content_above_members_directory() { | |
// Add content here. | |
echo 'add content here'; | |
} | |
add_action( 'bp_before_directory_members', 'yzc_add_content_above_members_directory' ); |
NewerOlder