2018-11-12 21:38:16 +01:00
|
|
|
<?php
|
2022-02-14 15:39:02 +01:00
|
|
|
defined('ABSPATH') || die(); // Exit if accessed directly
|
|
|
|
|
2022-02-18 00:27:06 +01:00
|
|
|
$lbry_url = get_post_meta( get_the_id(), LBRY_CANONICAL_URL, true );
|
|
|
|
if ( ! $lbry_url ) {
|
2020-01-28 05:54:40 +01:00
|
|
|
// Get channel canonical for backwards compatibility
|
2022-02-14 15:39:02 +01:00
|
|
|
$channel_id = ( get_post_meta( get_the_id(), LBRY_POST_PUB_CHANNEL, true ) ? get_post_meta( get_the_id(), LBRY_POST_PUB_CHANNEL, true ) : get_post_meta( get_the_id(), '_lbry_channel', true ) );
|
2022-02-18 00:27:06 +01:00
|
|
|
$lbry_url = LBRY()->daemon->canonical_url( $channel_id );
|
2020-01-28 05:54:40 +01:00
|
|
|
}
|
|
|
|
|
2022-02-18 00:27:06 +01:00
|
|
|
if ( $lbry_url ) {
|
|
|
|
$open_url = str_replace( 'lbry://', 'open.lbry.com/', $lbry_url );
|
2020-01-28 05:33:59 +01:00
|
|
|
}
|
2018-11-12 21:38:16 +01:00
|
|
|
?>
|
|
|
|
<div class="lbry-published-banner">
|
|
|
|
<h5>Stored Safely on Blockchain</h5>
|
|
|
|
<p>
|
2022-02-18 00:27:06 +01:00
|
|
|
This post is published to the <a href="https://lbry.com/get">LBRY</a> blockchain
|
|
|
|
<?php if( $lbry_url ) : ?>
|
|
|
|
at: <a href="<?php echo esc_url( $open_url ); ?>"><?php esc_html_e( $lbry_url, 'lbrypress' ); ?></a>.
|
2020-01-28 05:54:40 +01:00
|
|
|
<?php else: ?>
|
|
|
|
.
|
|
|
|
<?php endif; ?>
|
2018-11-12 21:38:16 +01:00
|
|
|
</p>
|
|
|
|
<p>
|
2020-04-02 00:12:25 +02:00
|
|
|
<a href="https://lbry.com/get" target="_blank">Try LBRY</a> to experience content freedom, earn crypto, and support us directly!
|
2018-11-12 21:38:16 +01:00
|
|
|
</p>
|
|
|
|
</div>
|