Skip to content
Snippets Groups Projects
Commit 69fa33f9 authored by root's avatar root Committed by agata
Browse files

buddypress: override some avatar functions

parent f820f267
Branches
No related tags found
No related merge requests found
<?php
//Utilizza gli avatar di buddypress se presenti
function nfm_bp_avtar_upload_path_correct($path){
if ( bp_core_is_multisite() ){
$path = ABSPATH . get_blog_option( BP_ROOT_BLOG, 'upload_path' );
}
return $path;
}
add_filter('bp_core_avatar_upload_path', 'nfm_bp_avtar_upload_path_correct', 1);
function nfm_bp_avatar_upload_url_correct($url){
if ( bp_core_is_multisite() ){
#$url = get_blog_option( BP_ROOT_BLOG, 'siteurl' ) . "/wp-content/uploads";
$url = site_url( 'wp-content/uploads' );
}
return $url;
}
add_filter('bp_core_avatar_url', 'nfm_bp_avatar_upload_url_correct', 1);
// fine
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment