Skip to content

Instantly share code, notes, and snippets.

@sbrajesh
Last active December 18, 2017 10:15
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 sbrajesh/74fff2969e2aa297f88b29bb4974bc2b to your computer and use it in GitHub Desktop.
Save sbrajesh/74fff2969e2aa297f88b29bb4974bc2b to your computer and use it in GitHub Desktop.
Enable activity as wire upload with MediaPress
/**
* Enable activity wire upload with MediaPress.
*
* @param bool $can allow upload or not.
*
* @return bool
*/
function buddydev_enable_activity_wire_upload( $can ) {
if ( is_user_logged_in() && function_exists( 'bp_is_user_activity' ) && bp_is_user_activity() ) {
$can = true;
}
return $can;
}
add_filter( 'mpp_can_user_upload_to_members', 'buddydev_enable_activity_wire_upload' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment