| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
|
| 5 |
/** |
| 6 |
* @var string|null $name |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
|
| 11 |
<div class="wrap"> |
| 12 |
<h1><?php echo esc_html(get_admin_page_title()); ?></h1> |
| 13 |
|
| 14 |
<?php if (!sendy_is_authenticated()) : ?> |
| 15 |
<p><?php esc_html_e('In order to start using the plug-in you have to authenticate with Sendy. Click the button to start', 'sendy'); ?></p> |
| 16 |
|
| 17 |
<p> |
| 18 |
<a href="<?php echo esc_url(sendy_initialize_plugin_url()); ?>" class="button button-primary"> |
| 19 |
<?php esc_html_e('Authenticate', 'sendy'); ?> |
| 20 |
</a> |
| 21 |
</p> |
| 22 |
<?php else: ?> |
| 23 |
|
| 24 |
<table class="form-table"> |
| 25 |
<tbody> |
| 26 |
<tr> |
| 27 |
<th><?php esc_html_e('Authentication', 'sendy'); ?></th> |
| 28 |
<td> |
| 29 |
<p><?php |
| 30 |
// translators: %s will be filled with the e-mail address of the authenticated user |
| 31 |
echo esc_html(sprintf(__("Authenticated as %s", 'sendy'), $name)); |
| 32 |
?></p> |
| 33 |
|
| 34 |
<p> |
| 35 |
<a class="button" href="<?php echo esc_url(admin_url('?sendy_logout')); ?>"> |
| 36 |
<?php esc_html_e('Log out', 'sendy'); ?> |
| 37 |
</a> |
| 38 |
</p> |
| 39 |
</td> |
| 40 |
</tr> |
| 41 |
</tbody> |
| 42 |
</table> |
| 43 |
|
| 44 |
<form action="options.php" method="post"> |
| 45 |
<?php |
| 46 |
|
| 47 |
settings_fields('sendy_general_settings'); |
| 48 |
|
| 49 |
do_settings_sections('sendy'); |
| 50 |
|
| 51 |
submit_button(__('Save settings', 'sendy')); |
| 52 |
?> |
| 53 |
</form> |
| 54 |
<?php endif; ?> |
| 55 |
</div> |
| 56 |
|