Restricted Site Access 7.6.4 has 2 actions and 13 filters, read directly from its source code on Nov 17, 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 Restricted Site Access fires an action
add_action( 'restrict_site_access_ip_match', function( $remote_ip, $allowed_ip ) {
// Your code runs here.
}, 10, 2 );
// Change a value Restricted Site Access is about to use
add_filter( 'restricted_site_access_rest_response', function( $default, $wp ) {
// Change $default here.
return $default;
}, 10, 2 );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
-
/** * Fires when an ip address match occurs. */ do_action( 'restrict_site_access_ip_match', $remote_ip, $allowed_ip ); -
/** * Filters the response sent to restricted REST API requests. */ apply_filters( 'restricted_site_access_rest_response', $default, $wp ); -
/** * Filter whether to show the page cache notifications. */ apply_filters( 'restricted_site_access_show_page_cache_notice', $show_notification ); -
/** * Filters whether restricted REST API requests receive a JSON error response. */ apply_filters( 'restricted_site_access_use_rest_response', true, $wp ); -
/** * Filters whether the user can access the site before any other checks. */ apply_filters( 'restricted_site_access_user_can_access', null ); -
/** * Hook to filter IP flags. */ apply_filters( 'rsa_get_client_ip_address_filter_flags', FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ); -
rsa_trusted_headers
filter/** * Filter hook to set array of trusted IP address headers. */ apply_filters( 'rsa_trusted_headers', $trusted_headers ); -
rsa_trusted_proxies
filter/** * Filter hook to set array of trusted proxies. */ apply_filters( 'rsa_trusted_proxies', array() ); -
apply_filters( 'restricted_site_access_is_restricted', $is_restricted, $wp ); -
do_action( 'restrict_site_access_handling', $rsa_restrict_approach, $wp ); -
apply_filters( 'restricted_site_access_approach', self::$rsa_options['approach'] ); -
restricted_site_access_head
filterapply_filters( 'restricted_site_access_head', self::$rsa_options['head_code'], $wp ); -
apply_filters( 'restricted_site_access_message', $message, $wp ); -
apply_filters( 'restricted_site_access_message_editor_quicktags', array( 'buttons' => 'strong,em,link,block,del,ins,img,ol,ul,li,code,close', ) ); -
apply_filters( 'restricted_site_access_redirect_url', self::$rsa_options['redirect_url'], $wp );
Generated from Restricted Site Access's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: