If you want to redirect, a good event to use is template_redirect
:
add_action( 'template_redirect', 'my_page_template_redirect' );
function my_page_template_redirect() {
// You can skip is_user_logged_in() if checking the user capability
if( is_page( 1234 ) && ! current_user_can( 'do_something_special' ) ) {
$redirect_to = 'http://example.com/redirection-page';
// Default code status for redirection using wp_redirect is 302
// If you need a different status code check
// https://codex.wordpress.org/Function_Reference/wp_redirect
wp_redirect( esc_url_raw( $redirect_to ) );
exit();
}
}
You can find more information about template_redirect
in the Codex.
As your question was about “how to intercept each page load”, I think you should start reading these entries in the Codex:
Basically, actions are events that occur while WordPress processes a request. Each of them is appropiate to “intercept” the request and do actions. As they occur in different moments, you can choose the best action to use depending on what you need to do.
In this case about redirection when some page is requested and the user has some capibility assigned, template_redirect
could be a very appropiate moment to intercept the request. According with the documentation of this action: “It is a good hook to use if you need to do a redirect with full knowledge of the content that has been queried”.