Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken redirect to settings on plugin activation #595

Merged
merged 1 commit into from
Oct 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions plugins/wpe-headless/wpe-headless.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,3 @@
if ( is_events_enabled() ) {
require FAUSTWP_DIR . '/includes/events/callbacks.php';
}

add_action( 'activated_plugin', 'activated_plugin', 10, 2 );
/**
* Callback for WordPress 'activated_plugin' action.
*
* Redirect the user to FaustWP settings page on activation.
*
* @param string $plugin The plugin name.
* @param bool $network_wide True if a network plugin, false if else.
*/
function activated_plugin( $plugin, $network_wide ) {
if ( ! defined( 'WP_CLI' ) && ! $network_wide && FAUSTWP_PATH === $plugin ) {
wp_safe_redirect( esc_url_raw( admin_url( 'options-general.php?page=faustwp-settings&new_activation=1' ) ) );
exit;
}
}