| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped,WordPress.Security.EscapeOutput.ExceptionNotEscaped,WordPress.Security.EscapeOutput.UnsafePrintingFunction -- Legacy Customify view output contains trusted config HTML, dynamic CSS/JS, or WordPress Customizer binding attributes. |
| 3 |
/** |
| 4 |
* Represents the view for the administration dashboard. |
| 5 |
* |
| 6 |
* This includes the header, options, and other information that should |
| 7 |
* provide the user interface to the end user. |
| 8 |
* |
| 9 |
* @package customify |
| 10 |
* @author Pixelgrade <contact@pixelgrade.com> |
| 11 |
* @license GPL-2.0+ |
| 12 |
* @link http://pixelgrade.com |
| 13 |
* @copyright 2013 Pixel Grade Media |
| 14 |
*/ |
| 15 |
|
| 16 |
if ( ! defined( 'ABSPATH' ) ) { |
| 17 |
exit; |
| 18 |
} |
| 19 |
|
| 20 |
/** |
| 21 |
* @var $config |
| 22 |
* @var $processor |
| 23 |
* @var $status |
| 24 |
* @var $errors |
| 25 |
*/ |
| 26 |
?> |
| 27 |
|
| 28 |
<div class="wrap" id="pixcustomify_form"> |
| 29 |
|
| 30 |
<div id="icon-options-general" class="icon32"><br></div> |
| 31 |
|
| 32 |
<h2><?php esc_html_e( 'Customify', 'customify' ); ?></h2> |
| 33 |
|
| 34 |
<?php if ( $processor->ok() ): ?> |
| 35 |
|
| 36 |
<?php if ( ! empty( $errors ) ): ?> |
| 37 |
<br/> |
| 38 |
<p class="update-nag"> |
| 39 |
<strong><?php esc_html_e( 'Unable to save settings.', 'customify' ); ?></strong> |
| 40 |
<?php esc_html_e( 'Please check the fields for errors and typos.', 'customify' ); ?> |
| 41 |
</p> |
| 42 |
<?php endif; |
| 43 |
|
| 44 |
if ( $processor->performed_update() ): ?> |
| 45 |
<br/> |
| 46 |
<p class="update-nag"> |
| 47 |
<?php esc_html_e( 'Settings have been updated.', 'customify' ); ?> |
| 48 |
</p> |
| 49 |
<?php endif; |
| 50 |
$f = pixcustomify::form( $config, $processor ); |
| 51 |
echo $f->startform(); |
| 52 |
|
| 53 |
echo $f->field( 'hiddens' )->render(); |
| 54 |
echo $f->field( 'general' )->render(); |
| 55 |
echo $f->field( 'output' )->render(); |
| 56 |
echo $f->field( 'typography' )->render(); |
| 57 |
echo $f->field( 'tools' )->render(); ?> |
| 58 |
<?php wp_nonce_field( 'customify_settings_save', '_wpnonce-customify-settings' ); ?> |
| 59 |
<button type="submit" class="button button-primary"> |
| 60 |
<?php esc_html_e( 'Save Changes', 'customify' ); ?> |
| 61 |
</button> |
| 62 |
|
| 63 |
<?php echo $f->endform(); |
| 64 |
|
| 65 |
elseif ( $status['state'] == 'error' ): ?> |
| 66 |
|
| 67 |
<h3><?php esc_html_e( 'Critical Error', 'customify' ); ?></h3> |
| 68 |
|
| 69 |
<p><?php echo $status['message'] ?></p> |
| 70 |
|
| 71 |
<?php endif; ?> |
| 72 |
</div> |
| 73 |
|