lbrypress/templates/options_page.php
Paul Kirby 59c3118c79 Began working on dependency injection style
infrastructure. initial work on settings page template
2018-08-31 20:14:12 -05:00

26 lines
980 B
PHP

<?php
$LBRY_Daemon = LBRY_Daemon::get_instance();
$LBRY_Speech = LBRY_Speech::get_instance();
$wallet_balance = $LBRY_Daemon->wallet_balance();
$speech_address = $LBRY_Speech->get_address() || '';
?>
<div class="wrap">
<h1><?= esc_html(get_admin_page_title()); ?></h1>
<h2>Your wallet address:</h2>
<code><?= get_option(LBRY_WALLET); ?></code>
<h2>Your wallet amount:</h2>
<code><?= number_format($wallet_balance, 6, '.', ','); ?></code>
<form action="options.php" method="post">
<label for="speech_address">
<h2>Your Spee.ch server address to act as a cdn for assets:</h2>
<p class="form-help">Learn more about spee.ch <a href="https://github.com/lbryio/spee.ch" target="_blank">here</a>.</p>
</label>
<input type="text" name="speech_address" placeholder="https://your-speech-address.com" value="<?= $speech_address ?>">
<?php
submit_button('Save Settings');
?>
</form>
</div>