Skip to content

Commit

Permalink
fix: remove redirect to settings on activation
Browse files Browse the repository at this point in the history
  • Loading branch information
apmatthews committed Oct 19, 2021
1 parent 403af39 commit e2e8587
Showing 1 changed file with 0 additions and 16 deletions.
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;
}
}

0 comments on commit e2e8587

Please sign in to comment.