I want to change a role in my wordpress plugin.
if ( is_admin() && ! is_user_logged_in() && ! defined( 'DOING_AJAX' ) && $pagenow !== 'admin-post.php' ) {
wp_die( __( 'This has been disabled', 'wp-hide-login' ), 403 );
}
$request = parse_url( $_SERVER['REQUEST_URI'] );
When my plugin get the action, Wordpress shows "This has been disabled" under WP default (admin-post.php) page. But I need when my function get assign it's redirect to 404 page.
As like as "This has been disabled" > http://www.example.com/404