43 lines
548 B
PHP
43 lines
548 B
PHP
<?php
|
|
/**
|
|
* Nonce Field
|
|
*
|
|
* @package SimpleCalendar/Admin
|
|
*/
|
|
namespace SimpleCalendar\Admin\Fields;
|
|
|
|
use SimpleCalendar\Abstracts\Field;
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
/**
|
|
* Nonce field.
|
|
*
|
|
* @since 3.0.0
|
|
*/
|
|
class Nonce extends Field {
|
|
|
|
/**
|
|
* Construct.
|
|
*
|
|
* @since 3.0.0
|
|
*
|
|
* @param array $field
|
|
*/
|
|
public function __construct( $field ) {
|
|
parent::__construct( $field );
|
|
}
|
|
|
|
/**
|
|
* Outputs the field markup.
|
|
*
|
|
* @since 3.0.0
|
|
*/
|
|
public function html() {
|
|
wp_nonce_field( $this->name, $this->value );
|
|
}
|
|
|
|
}
|