change URL to bp_core_get_user_domain

This commit is contained in:
Matthias Pfefferle 2021-09-20 17:20:56 +02:00
parent e535b9c8cf
commit 180f11d647

View file

@ -7,6 +7,8 @@ class Buddypress {
} }
public static function add_user_metadata( $object, $author_id ) { public static function add_user_metadata( $object, $author_id ) {
$object->url = bp_core_get_user_domain( $author_id ); //add BP member profile URL as user URL
// add BuddyPress' cover_image instead of WordPress' header_image // add BuddyPress' cover_image instead of WordPress' header_image
$cover_image_url = bp_attachments_get_attachment( 'url', array( 'item_id' => $author_id ) ); $cover_image_url = bp_attachments_get_attachment( 'url', array( 'item_id' => $author_id ) );