mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 14:13:46 +09:00
- added ability to set cover/avatar size from predefined sizes in Ultimate Member -> Settings -> General -> Uploads;
This commit is contained in:
@@ -1,43 +1,49 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
|
||||
<style type="text/css">
|
||||
<?php
|
||||
|
||||
$photosize = filter_var( $photosize, FILTER_SANITIZE_NUMBER_INT );
|
||||
$photosize_up = ( $photosize / 2 ) + 10;
|
||||
$meta_padding = ( $photosize + 60 ) . 'px';
|
||||
<?php if ( ! $photosize || $photosize == 'original' ) {
|
||||
//cannot be more than metadefault value
|
||||
$photosize = um_get_metadefault( 'profile_photosize' );
|
||||
}
|
||||
$photosize = filter_var( $photosize, FILTER_SANITIZE_NUMBER_INT );
|
||||
|
||||
if ( $area_max_width ) {
|
||||
print "
|
||||
.um-$form_id.um .um-profile-body {
|
||||
max-width: $area_max_width;
|
||||
}
|
||||
";
|
||||
}
|
||||
$photosize_up = ( $photosize / 2 ) + 10;
|
||||
$meta_padding = ( $photosize + 60 ) . 'px';
|
||||
|
||||
print "
|
||||
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
|
||||
width: ".$photosize."px;
|
||||
height: ".$photosize."px;
|
||||
}
|
||||
";
|
||||
if ( $area_max_width ) {
|
||||
print "
|
||||
.um-$form_id.um .um-profile-body {
|
||||
max-width: $area_max_width;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
print "
|
||||
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
|
||||
top: -".$photosize_up."px;
|
||||
}
|
||||
";
|
||||
|
||||
if ( is_rtl() ) {
|
||||
print "
|
||||
.um-$form_id.um .um-profile-meta {
|
||||
padding-right: $meta_padding;
|
||||
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
|
||||
width: ".$photosize."px;
|
||||
height: ".$photosize."px;
|
||||
}
|
||||
";
|
||||
} else {
|
||||
|
||||
print "
|
||||
.um-$form_id.um .um-profile-meta {
|
||||
padding-left: $meta_padding;
|
||||
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
|
||||
top: -".$photosize_up."px;
|
||||
}
|
||||
";
|
||||
}
|
||||
?>
|
||||
|
||||
if ( is_rtl() ) {
|
||||
print "
|
||||
.um-$form_id.um .um-profile-meta {
|
||||
padding-right: $meta_padding;
|
||||
}
|
||||
";
|
||||
} else {
|
||||
print "
|
||||
.um-$form_id.um .um-profile-meta {
|
||||
padding-left: $meta_padding;
|
||||
}
|
||||
";
|
||||
}
|
||||
?>
|
||||
</style>
|
||||
Reference in New Issue
Block a user