We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09d7605 commit d698b29Copy full SHA for d698b29
1 file changed
activate.php
@@ -10,12 +10,16 @@
10
* Redirect to the plugin's admin screen on activation.
11
*
12
* @since 1.0.0
13
+ *
14
+ * @param string $plugin The plugin basename.
15
*/
-function sqlite_plugin_activation_redirect() {
- wp_redirect( admin_url( 'options-general.php?page=sqlite-integration' ) );
16
- exit;
+function sqlite_plugin_activation_redirect( $plugin ) {
17
+ if ( plugin_basename( SQLITE_MAIN_FILE ) === $plugin ) {
18
+ wp_redirect( admin_url( 'options-general.php?page=sqlite-integration' ) );
19
+ exit;
20
+ }
21
}
-// register_activation_hook( SQLITE_MAIN_FILE, 'sqlite_plugin_activation_redirect' );
22
+add_action( 'activated_plugin', 'sqlite_plugin_activation_redirect' );
23
24
/**
25
* Check the URL to ensure we're on the plugin page,
0 commit comments