bp_attachments_get_user_has_cover_image( int $user_id )

Does the user has a cover image?


Description Description


Parameters Parameters

$user_id

(Required) User ID to retrieve cover image for.


Top ↑

Return Return

(bool) True if the user has a cover image, false otherwise.


Top ↑

Source Source

File: bp-core/bp-core-attachments.php

function bp_attachments_get_user_has_cover_image( $user_id = 0 ) {
	if ( empty( $user_id ) ) {
		$user_id = bp_displayed_user_id();
	}

	$cover_src = bp_attachments_get_attachment( 'url', array(
		'item_id'   => $user_id,
	) );

	return (bool) apply_filters( 'bp_attachments_get_user_has_cover_image', $cover_src, $user_id );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.