Last active
October 13, 2017 09:54
-
-
Save BhargavBhandari90/012211a9e8bbf745a9dce19763aaf7b5 to your computer and use it in GitHub Desktop.
Show pics on buddyboss photo page. Photos will not show if BuddyBoss is used with rtMedia with "Privacy Settings" enabled. So add this snippet to theme's functions.php
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 | |
/** | |
* | |
* Fix - Show pics on buddyboss photo page. | |
* Photos will not show if BuddyBoss is used with rtMedia with "Privacy Settings" enabled. | |
* So add this snippet to theme's functions.php | |
* | |
*/ | |
function rtmc_show_pics_buddyboss() { | |
if ( ! function_exists( 'buddyboss_media_component_slug' ) || ! function_exists( 'bp_is_current_component' ) ) { | |
return __return_false(); | |
} | |
// Get component slug. | |
$component_slug = buddyboss_media_component_slug(); | |
if ( bp_is_current_component( $component_slug ) ) { | |
// Do not apply privacy filter. | |
add_filter( 'bp_use_legacy_activity_query', '__return_false' ); | |
} | |
} | |
add_action( 'bp_before_activity_loop', 'rtmc_show_pics_buddyboss' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment