require_once ABSPATH . 'wp-admin/admin-footer.php';
} elseif ( 'activate-plugin' ===
$action ) { if ( !
current_user_can( 'update_plugins'
) ) { wp_die( __( 'Sorry, you are not allowed to update plugins for this site.'
) );
} check_admin_referer( 'activate-plugin_' .
$plugin );
if ( !
isset( $_GET['failure'
] ) && !
isset( $_GET['success'
] ) ) { wp_redirect( admin_url( 'update.php?action=activate-plugin&failure=true&plugin=' .
urlencode( $plugin ) . '&_wpnonce=' .
$_GET['_wpnonce'
] ) );
activate_plugin( $plugin, '', !
empty( $_GET['networkwide'
] ), true
);
wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' .
urlencode( $plugin ) . '&_wpnonce=' .
$_GET['_wpnonce'
] ) );
die();
} iframe_header( __( 'Plugin Reactivation'
), true
);
if ( isset( $_GET['success'
] ) ) { echo '<p>' .
__( 'Plugin reactivated successfully.'
) . '</p>';
} if ( isset( $_GET['failure'
] ) ) { echo '<p>' .
__( 'Plugin failed to reactivate due to a fatal error.'
) . '</p>';