We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a514a38 commit faed5e2Copy full SHA for faed5e2
code-snippets.php
@@ -37,6 +37,16 @@
37
if ( defined( 'CODE_SNIPPETS_FILE' ) ) {
38
require_once ABSPATH . 'wp-admin/includes/plugin.php';
39
deactivate_plugins( array( 'code-snippets/code-snippets.php' ), true );
40
+
41
+ if ( ! function_exists( 'code_snippets_deactivated_old_version_notice' ) ) {
42
+ function code_snippets_deactivated_old_version_notice() {
43
+ echo '<div class="error fade"><p>',
44
+ esc_html__( 'Another version of Code Snippets appears to be installed. Deactivating this version.', 'code-snippets' ),
45
+ '</p></div>';
46
+ }
47
48
49
+ add_action( 'admin_notices', 'code_snippets_deactivated_old_version_notice', 11 );
50
return;
51
}
52
0 commit comments