Last active
December 18, 2017 10:15
-
-
Save sbrajesh/74fff2969e2aa297f88b29bb4974bc2b to your computer and use it in GitHub Desktop.
Enable activity as wire upload with MediaPress
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
/** | |
* 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