| 1 |
<?php |
| 2 |
/** |
| 3 |
* Admin notices. |
| 4 |
* |
| 5 |
* @package Mailchimp |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace Mailchimp\WordPress\Includes\Admin; |
| 9 |
|
| 10 |
/** |
| 11 |
* Display success admin notice. |
| 12 |
* This function is now a wrapper around the Mailchimp_Admin_Notices class, will be deprecated in future versions. Use that class instead. |
| 13 |
* |
| 14 |
* @since 1.7.0 |
| 15 |
* @since 2.1.0 - Moved notice rendering to class-mailchimp-admin-notices.php |
| 16 |
* |
| 17 |
* @param string $msg The message to display. |
| 18 |
* @return void |
| 19 |
*/ |
| 20 |
function admin_notice_success( string $msg ) { |
| 21 |
\Mailchimp_Admin_Notices::instance()->add( $msg, 'success' ); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* Display error admin notice. |
| 26 |
* This function is now a wrapper around the Mailchimp_Admin_Notices class, will be deprecated in future versions. Use that class instead. |
| 27 |
* |
| 28 |
* @since 1.7.0 |
| 29 |
* @since 2.1.0 - Moved notice rendering to class-mailchimp-admin-notices.php |
| 30 |
* |
| 31 |
* @param string $msg The message to display. |
| 32 |
* @return void |
| 33 |
*/ |
| 34 |
function admin_notice_error( string $msg ) { |
| 35 |
\Mailchimp_Admin_Notices::instance()->add( $msg, 'error' ); |
| 36 |
} |
| 37 |
|