| 1 |
<?php |
| 2 |
namespace YayExtra; |
| 3 |
|
| 4 |
defined( 'ABSPATH' ) || exit; |
| 5 |
|
| 6 |
if ( ! function_exists( 'YayExtra\\YayeDeactiveLiteNotice' ) ) { |
| 7 |
add_action( 'network_admin_notices', 'YayExtra\\YayeDeactiveLiteNotice' ); |
| 8 |
add_action( 'admin_notices', 'YayExtra\\YayeDeactiveLiteNotice' ); |
| 9 |
function YayeDeactiveLiteNotice() { |
| 10 |
if ( current_user_can( 'activate_plugins' ) ) { |
| 11 |
?> |
| 12 |
<div class="notice notice-info is-dismissible" style="border-left-color: #007cba;"> |
| 13 |
<p> |
| 14 |
<strong><?php esc_html_e( 'You have activated the YayExtra Pro version, so the YayExtra Lite version has been automatically deactivated. All settings have been saved.', 'yayextra' ); ?> |
| 15 |
</strong> |
| 16 |
</p> |
| 17 |
</div> |
| 18 |
<?php |
| 19 |
if ( isset( $_GET['activate'] ) ) { |
| 20 |
unset( $_GET['activate'] ); |
| 21 |
} |
| 22 |
} |
| 23 |
} |
| 24 |
} |