bp_core_avatar_dir

  • apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-avatars.php :: Trac Source Line: 138
      	// Set avatar_dir if not passed (uses $object)
      	if ( !$avatar_dir ) {
      		if ( 'user' == $object )
      			$avatar_dir = 'avatars';
      		else if ( bp_is_active( 'groups' ) && 'group' == $object )
      			$avatar_dir = 'group-avatars';
      		else if ( 'blog' == $object )
      			$avatar_dir = 'blog-avatars';
      
      		$avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );
      
      		if ( !$avatar_dir )
      			return false;
      	}
      
      	// Add an identifying class to each item
      	$class .= ' ' . $object . '-' . $item_id . '-avatar';
      
      	// Get item name for alt/title tags
      	$item_name = '';
      
    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-avatars.php :: Trac Source Line: 348
      	if ( !$avatar_dir ) {
      		if ( 'user' == $object )
      			$avatar_dir = 'avatars';
      		else if ( 'group' == $object )
      			$avatar_dir = 'group-avatars';
      		else if ( 'blog' == $object )
      			$avatar_dir = 'blog-avatars';
      
      		$avatar_dir = apply_filters( 'bp_core_avatar_dir', $avatar_dir, $object );
      
      		if ( !$avatar_dir ) return false;
      	}
      
      	$avatar_folder_dir = apply_filters( 'bp_core_avatar_folder_dir', bp_core_avatar_upload_path() . '/' . $avatar_dir . '/' . $item_id, $item_id, $object, $avatar_dir );
      
      	if ( !file_exists( $avatar_folder_dir ) )
      		return false;
      
      	if ( $av_dir = opendir( $avatar_folder_dir ) ) {
      

Comments are closed.