π Access Control 1.0.1 has 6 actions and 7 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when π Access Control fires an action
add_action( 'access_control_set_cookie', function( $auth_cookie, $expiration, $old_user_id, $scheme, $token ) {
// Your code runs here.
}, 10, 5 );
// Change a value π Access Control is about to use
add_filter( 'plac_send_auth_cookies', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Allows preventing auth cookies from actually being sent to the client. */ apply_filters( 'plac_send_auth_cookies', true ); -
/** * Filters the redirect location after a user switches to another account or * switches off. */ apply_filters( 'access_control_redirect_to', $redirect_to, $redirect_type, $new_user, $old_user ); -
/** * Fires immediately before the User Switching authentication cookie is set. */ do_action( 'access_control_set_cookie', $auth_cookie, $expiration, $old_user_id, $scheme, $token ); -
/** * Filters the contents of the message that's displayed to switched users in * the admin area. */ apply_filters( 'access_control_switched_message', $message, $user, $old_user, $plac_switch_back_url, $just_switched ); -
/** * This filter is documented in wp-includes/pluggable.php */ apply_filters( 'auth_cookie_expiration', 172800, get_current_user_id(), false ); -
/** * This filter is documented in wp-login.php */ apply_filters( 'login_redirect', $redirect_to, $requested_redirect_to, $new_user ); -
/** * This filter is documented in wp-login.php */ apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $old_user ); -
/** * Fires just before the upgrade store cookies are cleared. */ do_action( 'plac_clear_olduser_cookie' ); -
/** * Fires immediately before the User Switching old user cookie is set. */ do_action( 'plac_set_olduser_cookie', $olduser_cookie, $expiration, $old_user_id, $scheme, $token ); -
/** * Fires when a user switches back to their originating account. */ do_action( 'plac_switch_back_user', $user_id, $old_user_id, $new_token, $old_token ); -
/** * Fires when a user switches off. */ do_action( 'plac_switch_off_user', $old_user_id, $old_token ); -
/** * Fires when a user switches to another user account. */ do_action( 'plac_switch_to_user', $user_id, $old_user_id, $new_token, $old_token );
Generated from π Access Control's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and weβll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the pluginβs own hooks.
- Code written against the pluginβs actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2β3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the pluginβs files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3β7 business days
Choose thisNot sure which fits? Describe what you need and weβll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: