Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter("bp_gallery_is_method_enabled","bp_gallery_disable_upload_for_video_gallery",10,3);
- function bp_gallery_disable_upload_for_video_gallery($is_enabled,$method,$gallery){
- if($method=="upload"&&$gallery->gallery_type=="video")
- return false;
- return $is_enabled;
- }
- //for create gallery and pointing to automatic upload link fix
- add_filter("bp_get_media_upload_link","fix_gallery_upload_link",10,2);
- function fix_gallery_upload_link($link,$gallery){
- if(bp_gallery_is_method_enabled("upload", $gallery))
- return $link;
- //if upload method is not enabled, we assume add from web is enabled
- $link=bp_get_media_add_from_web_link($gallery);
- return $link;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement