wp-nonce-trait.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Components\Wp_Nonce; |
| 5 | |
| 6 | // If this file is called directly, abort. |
| 7 | if ( ! defined( 'WPINC' ) ) { |
| 8 | die; |
| 9 | } |
| 10 | |
| 11 | trait Wp_Nonce_Trait { |
| 12 | |
| 13 | /** |
| 14 | * @var Wp_Nonce |
| 15 | */ |
| 16 | protected $wp_nonce; |
| 17 | |
| 18 | public function get_wp_nonce(): Wp_Nonce { |
| 19 | return $this->wp_nonce; |
| 20 | } |
| 21 | |
| 22 | public function set_wp_nonce( Wp_Nonce $nonce ) { |
| 23 | $this->wp_nonce = $nonce; |
| 24 | } |
| 25 | |
| 26 | } |
| 27 |