Published on lbry block #68
1 changed files with 15 additions and 0 deletions
|
@ -43,14 +43,29 @@ usort( $channels, array( 'LBRYPress', 'channel_name_comp' ) );
|
||||||
|
|
||||||
$results = LBRY()->daemon->claim_search( $lbry_claim_id );
|
$results = LBRY()->daemon->claim_search( $lbry_claim_id );
|
||||||
$init_bid = $results->items[0]->amount;
|
$init_bid = $results->items[0]->amount;
|
||||||
|
$support_amount = $results->items[0]->meta->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 ) ) );
|
||||||
|
}
|
||||||
printf(
|
printf(
|
||||||
'<div class="lbry-meta-label lbry-meta-bx-channel"><strong>' . __( 'Initial bid amount:', 'lbrypress' ) . ' </strong>
|
'<div class="lbry-meta-label lbry-meta-bx-channel"><strong>' . __( 'Initial bid amount:', 'lbrypress' ) . ' </strong>
|
||||||
<span class="lbry-meta-bx-content lbry-meta-bx-channel"><img src="' . esc_url( plugin_dir_url( LBRY_PLUGIN_FILE ) ) . 'admin/images/lbc.png" class="icon icon-lbc bid-icon-lbc bid-icon-lbc"> ' . esc_html__( '%1$s', 'lbrypress' ) . '</span></div>
|
<span class="lbry-meta-bx-content lbry-meta-bx-channel"><img src="' . esc_url( plugin_dir_url( LBRY_PLUGIN_FILE ) ) . 'admin/images/lbc.png" class="icon icon-lbc bid-icon-lbc bid-icon-lbc"> ' . esc_html__( '%1$s', 'lbrypress' ) . '</span></div>
|
||||||
|
<div class="lbry-meta-label lbry-meta-bx-channel"><strong>' . __( 'Supports:', 'lbrypress' ) . ' </strong>
|
||||||
|
<span class="lbry-meta-bx-content lbry-meta-bx-channel"><img src="' . esc_url( plugin_dir_url( LBRY_PLUGIN_FILE ) ) . 'admin/images/lbc.png" class="icon icon-lbc bid-icon-lbc bid-icon-lbc"> ' . esc_html__( '%2$s', 'lbrypress' ) . '</span><a href="#">' . __( 'Add', 'lbrypress' ) . '</a></div>
|
||||||
<div class="lbry-meta-label lbry-meta-bx-channel"><strong>' . __( 'LBRY channel published at:', 'lbrypress' ) . '</strong></div>
|
<div class="lbry-meta-label lbry-meta-bx-channel"><strong>' . __( 'LBRY channel published at:', 'lbrypress' ) . '</strong></div>
|
||||||
<div class="lbry-meta-bx-content lbry-meta-bx-channel"><a href="' . esc_url( '%4$s', 'lbrypress' ) . '">' . esc_html__( '%3$s', 'lbrypress' ) . '</a></div>
|
<div class="lbry-meta-bx-content lbry-meta-bx-channel"><a href="' . esc_url( '%4$s', 'lbrypress' ) . '">' . esc_html__( '%3$s', 'lbrypress' ) . '</a></div>
|
||||||
<div class="lbry-meta-label lbry-meta-bx-license"><strong>' . __( 'License published under:', 'lbrypress' ) .'</strong> </div>
|
<div class="lbry-meta-label lbry-meta-bx-license"><strong>' . __( 'License published under:', 'lbrypress' ) .'</strong> </div>
|
||||||
<div class="lbry-meta-bx-content lbry-meta-bx-license lbry-meta-bx-content-last">' . esc_html__( '%5$s', 'lbrypress' ) . '</div>',
|
<div class="lbry-meta-bx-content lbry-meta-bx-license lbry-meta-bx-content-last">' . esc_html__( '%5$s', 'lbrypress' ) . '</div>',
|
||||||
$init_bid,
|
$init_bid,
|
||||||
|
$support_amount,
|
||||||
$lbry_published_channel,
|
$lbry_published_channel,
|
||||||
$chan_open_url,
|
$chan_open_url,
|
||||||
$lbry_published_license,
|
$lbry_published_license,
|
||||||
|
|
Loading…
Reference in a new issue