Default thumbnail
-
Hi there,
I want to change the default thumbnail for gallery, based on user conditions.
The code is written in “plugins/mediapress/core/gallery/mpp-gallery-cover-templates.php”. but, changing the core code is not good.
The function which I want to change is “function mpp_get_default_gallery_cover_image_src( $gallery, $cover_type )” like this as given below.
function mpp_get_default_gallery_cover_image_src( $gallery, $cover_type ) {
$gallery = mpp_get_gallery( $gallery );
$type = bp_get_member_type( bp_logged_in_user_id );
if ( $type == ‘doctor’ )
{$cover_type = “……./doctor.png”;
}
elseif ( $type == ‘nurse’ )
{$cover_type = “……./nurse.png”;
}
else
{$cover_type = “……./patients.png”;
}
return $covertype;
}Can anyone suggest, How can I redefine this function.
- The topic ‘Default thumbnail’ is closed to new replies.