| 1 |
<?php |
| 2 |
namespace YayExtra; |
| 3 |
|
| 4 |
defined( 'ABSPATH' ) || exit; |
| 5 |
|
| 6 |
add_action( 'network_admin_notices', 'YayExtra\\YayeDeactiveNotice' ); |
| 7 |
add_action( 'admin_notices', 'YayExtra\\YayeDeactiveNotice' ); |
| 8 |
|
| 9 |
function YayeDeactiveNotice() { |
| 10 |
if ( current_user_can( 'activate_plugins' ) ) { |
| 11 |
?> |
| 12 |
<div class="notice notice-error is-dismissible"> |
| 13 |
<p> |
| 14 |
<strong><?php esc_html_e( 'It looks like you have another YayExtra version installed, please delete it before activating this new version. All current settings and data are still preserved.', 'yayextra' ); ?> |
| 15 |
<a href=""><?php esc_html_e( 'Read more details.', 'yayextra' ); ?></a> |
| 16 |
</strong> |
| 17 |
</p> |
| 18 |
</div> |
| 19 |
<?php |
| 20 |
if ( isset( $_GET['activate'] ) ) { |
| 21 |
unset( $_GET['activate'] ); |
| 22 |
} |
| 23 |
} |
| 24 |
} |
| 25 |
|