| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template contains the browser extension settings |
| 4 |
* |
| 5 |
* @version 1.1 |
| 6 |
* @package Friends |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
<div class="friends-browser-extension-promo card" style="max-width: 100%; padding: 1em 1.5em;"> |
| 11 |
<h2><?php esc_html_e( 'Friends Browser Extension', 'friends' ); ?></h2> |
| 12 |
<p><?php esc_html_e( 'The browser extension lets you subscribe to any site you are visiting with one click — no more copy-pasting URLs into the Add Friend page.', 'friends' ); ?></p> |
| 13 |
<p><?php esc_html_e( 'With your API key (below), the extension also exposes quick actions from your toolbar — for example, saving the current page to a collection or sending it to your eReader (if you have those companion plugins installed).', 'friends' ); ?></p> |
| 14 |
<p> |
| 15 |
<a class="button button-primary" href="https://chromewebstore.google.com/detail/friends/ledbghpaplkpclndlommpbokndieflhl" target="_blank" rel="noopener noreferrer"> |
| 16 |
<?php esc_html_e( 'Install for Chrome', 'friends' ); ?> |
| 17 |
</a> |
| 18 |
<a class="button button-primary" href="https://addons.mozilla.org/en-US/firefox/addon/wpfriends/" target="_blank" rel="noopener noreferrer"> |
| 19 |
<?php esc_html_e( 'Install for Firefox', 'friends' ); ?> |
| 20 |
</a> |
| 21 |
</p> |
| 22 |
</div> |
| 23 |
|
| 24 |
<form method="post"> |
| 25 |
<?php wp_nonce_field( 'friends-browser-extension' ); ?> |
| 26 |
<table class="form-table"> |
| 27 |
<tbody> |
| 28 |
<tr> |
| 29 |
<th><label for="api-key"><?php esc_html_e( 'API Key', 'friends' ); ?></label></th> |
| 30 |
<td> |
| 31 |
<input type="text" id="api-key" value="<?php echo esc_attr( $args['browser-api-key'] ); ?>" class="regular-text" readonly /> |
| 32 |
<button class="button" id="copy-api-key"><?php esc_html_e( 'Copy', 'friends' ); ?></button> |
| 33 |
<!-- Revoke API Key --> |
| 34 |
<?php if ( ! empty( $args['browser-api-key'] ) ) : ?> |
| 35 |
<button class="button button-destructive" name="revoke-api-key"><?php esc_html_e( 'Revoke', 'friends' ); ?></button> |
| 36 |
<?php endif; ?> |
| 37 |
<p class="description"><?php esc_html_e( 'Paste this API key into the browser extension to enable additional features such as plugin-provided actions.', 'friends' ); ?></p> |
| 38 |
</td> |
| 39 |
</tr> |
| 40 |
</tbody> |
| 41 |
</table> |
| 42 |
</form> |
| 43 |
|