| 1 |
<?php |
| 2 |
/** |
| 3 |
* Views: Plugin settings view |
| 4 |
* |
| 5 |
* Shows the settings page. |
| 6 |
* |
| 7 |
* @package Parsely |
| 8 |
*/ |
| 9 |
|
| 10 |
declare(strict_types=1); |
| 11 |
|
| 12 |
namespace Parsely; |
| 13 |
|
| 14 |
use Parsely\UI\Settings_Page; |
| 15 |
|
| 16 |
/* translators: %s: Plugin version */ |
| 17 |
$parsely_version_string = sprintf( __( 'Version %s', 'wp-parsely' ), Parsely::VERSION ); |
| 18 |
|
| 19 |
/** |
| 20 |
* Variable. |
| 21 |
* |
| 22 |
* @var Settings_Page |
| 23 |
*/ |
| 24 |
$wp_parsely_settings = $GLOBALS['parsely_settings_page']; |
| 25 |
?> |
| 26 |
|
| 27 |
<?php |
| 28 |
if ( is_multisite() && is_main_site() ) { |
| 29 |
?> |
| 30 |
<div class="notice notice-info"> |
| 31 |
<p><?php esc_html_e( 'Attention: this is the main site of your Multisite Network.', 'wp-parsely' ); ?></p> |
| 32 |
</div> |
| 33 |
<?php |
| 34 |
} |
| 35 |
?> |
| 36 |
|
| 37 |
<div class="wrap"> |
| 38 |
<h1 class="wp-heading-inline"><?php echo esc_html_e( 'Parse.ly Settings', 'wp-parsely' ); ?></h1> |
| 39 |
<span id="wp-parsely_version"><?php echo esc_html( $parsely_version_string ); ?></span> |
| 40 |
|
| 41 |
<?php settings_errors(); ?> |
| 42 |
|
| 43 |
<?php $wp_parsely_settings->show_setting_tabs(); ?> |
| 44 |
|
| 45 |
<form name="parsely" method="post" action='options.php' novalidate hidden> |
| 46 |
<?php |
| 47 |
settings_fields( Parsely::OPTIONS_KEY ); |
| 48 |
$wp_parsely_settings->show_setting_tabs_content(); |
| 49 |
|
| 50 |
// phpcs:ignore WordPress.Security.NonceVerification.Recommended |
| 51 |
if ( isset( $_GET['e2e_parsely_skip_api_validate'] ) && 'y' === $_GET['e2e_parsely_skip_api_validate'] ) { |
| 52 |
?> |
| 53 |
<input type="hidden" name="e2e_parsely_skip_api_validate" value="y" /> |
| 54 |
<?php |
| 55 |
} |
| 56 |
|
| 57 |
submit_button(); |
| 58 |
?> |
| 59 |
</form> |
| 60 |
</div> |
| 61 |
|