'none (anonymous)', 'claim_id' => 'null' ); $post_id = $post->ID; // Generate a custom nonce $lbrynonce = wp_create_nonce( 'lbry_publish_post_nonce' ); $lbry_published = get_post_meta( $post_id, '_lbry_is_published', true ); $lbry_claim_id = get_post_meta( $post_id, '_lbry_claim_id', true ); $lbry_published_channel = get_post_meta( $post_id, '_lbry_post_published_channel', true ); if ( ( $lbry_published == true ) && ( $lbry_claim_id ) && ( ! ( $lbry_published_channel ) ) ) { $result = LBRY()->daemon->claim_search( $lbry_claim_id ); $name = $result->items[0]->signing_channel->name; update_post_meta( $post_id, '_lbry_post_published_channel', $name ); } $lbry_channel_claim_id = get_post_meta( $post_id, '_lbry_post_pub_channel', true ); $lbry_published_license = get_post_meta( $post_id, '_lbry_post_pub_license', true ); if ( ( $lbry_published == true ) && ( ( $lbry_claim_id ) ) && ( ! ( $lbry_published_license ) ) ) { $result = LBRY()->daemon->claim_search( $lbry_claim_id ); $license = $result->items[0]->value->license; update_post_meta( $post_id, '_lbry_post_pub_license', $license ); } $lbry_canonical_url = get_post_meta( $post_id, '_lbry_canonical_url', true ); $lbry_url = ( ($lbry_canonical_url) ? $lbry_canonical_url : 'lbry://' . $lbry_published_channel . '#' . $lbry_claim_id ); $cur_channel = ( get_post_meta( $post_id, LBRY_POST_PUB_CHANNEL, true ) ? get_post_meta( $post_id, LBRY_POST_PUB_CHANNEL, true ) : get_post_meta( $post_id, '_lbry_channel', true ) ); $default_channel = get_option( LBRY_SETTINGS )['default_lbry_channel']; $chan_open_url = ( 'open.lbry.com/'. $lbry_published_channel .'#' . $lbry_channel_claim_id . ''); ?> daemon->claim_search( $lbry_claim_id ); $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( '
' . __( 'Initial bid amount:', 'lbrypress' ) . ' ' . esc_html__( '%1$s', 'lbrypress' ) . '
', $init_bid ); printf( '
' . __( 'Supports:', 'lbrypress' ) . ' ' . esc_html__( '%1$s', 'lbrypress' ) . '' . __( 'Add', 'lbrypress' ) . '
', $support_amount, $lbry_claim_id, urlencode($lbry_url), $lbry_published_channel, $support_amount, $init_bid ); printf( '
' . __( 'LBRY channel published to:', 'lbrypress' ) . '
' . esc_html__( '%2$s', 'lbrypress' ) . '
', $chan_open_url, $lbry_published_channel, ); printf( '
' . __( 'License published under:', 'lbrypress' ) .'
' . esc_html__( '%1$s', 'lbrypress' ) . '
', $lbry_published_license, ); } else { $channels = LBRY()->daemon->channel_list(); $channels[] = $unnatributed; // Sort the channels in a natural way usort( $channels, array( 'LBRYPress', 'channel_name_comp' ) ); ?>
$channel ) { $options .= ''; } printf( '', LBRY_POST_PUB_CHANNEL, $options ); } ?>
licenses; $options = ''; $default_license = get_option(LBRY_SETTINGS)[LBRY_LICENSE]; $cur_license = get_post_meta( $post_id, LBRY_POST_PUB_LICENSE, true ); // Create options list, select current license if ( $licenses ) { foreach ( $licenses as $value => $name ) { $options .= '