diff --git a/classes/LBRY_Admin.php b/classes/LBRY_Admin.php index 64343ff..48fdf12 100644 --- a/classes/LBRY_Admin.php +++ b/classes/LBRY_Admin.php @@ -264,7 +264,17 @@ class LBRY_Admin $open_url = str_replace( 'lbry://', 'open.lbry.com/', $lbry_url ); } $support_amount = $results->items[0]->meta->support_amount; - if ( ( $support_amount < 1 ) ? $support_amount = '0' : $support_amount = number_format( intval( $support_amount ) ) ); + if ( ( $support_amount < 0.001 ) ) { + ( $support_amount = '0' ); + } elseif ( ( $support_amount < 0.01 ) && ( $support_amount >= 0.001 ) ) { + ( $support_amount = '<0.01' ); + } elseif ( ( $support_amount <= 0.099 ) && ( $support_amount >= 0.01) ) { + ( $support_amount = number_format( floatval( $support_amount ), 2, '.', '' ) ); + } elseif ( ( $support_amount <= 0.999 ) && ( $support_amount >= 0.1 ) ) { + ( $support_amount = number_format( floatval( $support_amount ), 1, '.', '' ) ); + } else { + ( $support_amount = number_format( intval( $support_amount ) ) ); + } $init_bid = $results->items[0]->amount; ?>