Last active
August 29, 2015 14:11
-
-
Save mathetos/805288bbcd03a32ca92a to your computer and use it in GitHub Desktop.
Plugin Redirect on Activation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function detect_plugin_activation( $plugin ) { | |
if( $plugin == 'path-to-my-plugin') { | |
wp_redirect("options-general.php?page=my-plugin-settings-page"); | |
exit; | |
} else {} | |
} | |
add_action( 'activated_plugin', 'detect_plugin_activation', 10, 2 ); |
That was it! D'oh! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are using "=" when it should be "=="... Try changing that!