| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin admin notices class. |
| 4 |
* |
| 5 |
* @since 1.0.0 |
| 6 |
* |
| 7 |
* @package woo-additional-terms |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace Woo_Additional_Terms\Enhancements; |
| 11 |
|
| 12 |
/** |
| 13 |
* The plugin notices class. |
| 14 |
*/ |
| 15 |
class Notices { |
| 16 |
|
| 17 |
/** |
| 18 |
* The dismiss nonce name. |
| 19 |
* |
| 20 |
* @since 1.4.0 |
| 21 |
* |
| 22 |
* @var string |
| 23 |
*/ |
| 24 |
const DISMISS_NONCE_NAME = 'woo-additional-terms-dismiss'; |
| 25 |
|
| 26 |
/** |
| 27 |
* Setup hooks and filters. |
| 28 |
* |
| 29 |
* @since 1.0.0 |
| 30 |
* |
| 31 |
* @return void |
| 32 |
*/ |
| 33 |
public function setup() { |
| 34 |
|
| 35 |
add_filter( 'admin_notices', array( $this, 'print' ) ); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Display the admin notices. |
| 40 |
* |
| 41 |
* @since 1.0.0 |
| 42 |
* |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
public function print() { |
| 46 |
|
| 47 |
/** |
| 48 |
* Fires after the welcome admin notice. |
| 49 |
* |
| 50 |
* @since 1.0.0 |
| 51 |
*/ |
| 52 |
do_action( 'woo_additional_terms_admin_notices' ); |
| 53 |
} |
| 54 |
} |
| 55 |
|