Skip to content

Instantly share code, notes, and snippets.

@BhargavBhandari90
Last active October 13, 2017 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BhargavBhandari90/012211a9e8bbf745a9dce19763aaf7b5 to your computer and use it in GitHub Desktop.
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
<?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