Files
ultimatemember/assets/dynamic_css/dynamic_profile.php
T

49 lines
964 B
PHP
Raw Normal View History

<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2014-12-15 22:38:07 +02:00
<style type="text/css">
2014-12-15 22:38:07 +02:00
<?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 );
2015-01-25 19:59:18 +02:00
$photosize_up = ( $photosize / 2 ) + 10;
$meta_padding = ( $photosize + 60 ) . 'px';
2014-12-15 22:38:07 +02:00
if ( $area_max_width ) {
print "
.um-$form_id.um .um-profile-body {
max-width: $area_max_width;
}
";
}
2014-12-15 22:38:07 +02:00
2019-08-08 00:47:00 +03:00
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
width: ".$photosize."px;
height: ".$photosize."px;
2019-08-08 00:47:00 +03:00
}
";
2019-08-08 00:47:00 +03:00
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
top: -".$photosize_up."px;
2019-08-08 00:47:00 +03:00
}
";
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;
}
";
}
?>
2014-12-15 22:38:07 +02:00
</style>