Restricted Site Access icon
Security

Restricted Site Access hooks reference

  • By 10up
  • v7.6.4
  • Updated

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.

functions.phpyour child theme
// 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

  • restricted_site_access.php line 804
    /**
     * Fires when an ip address match occurs.
     */
    do_action( 'restrict_site_access_ip_match', $remote_ip, $allowed_ip );
  • restricted_site_access.php line 695
    /**
     * Filters the response sent to restricted REST API requests.
     */
    apply_filters( 'restricted_site_access_rest_response', $default, $wp );
  • restricted_site_access.php line 1413
    /**
     * Filter whether to show the page cache notifications.
     */
    apply_filters( 'restricted_site_access_show_page_cache_notice', $show_notification );
  • restricted_site_access.php line 827
    /**
     * Filters whether restricted REST API requests receive a JSON error response.
     */
    apply_filters( 'restricted_site_access_use_rest_response', true, $wp );
  • restricted_site_access.php line 479
    /**
     * Filters whether the user can access the site before any other checks.
     */
    apply_filters( 'restricted_site_access_user_can_access', null );
  • restricted_site_access.php line 2293
    /**
     * Hook to filter IP flags.
     */
    apply_filters( 'rsa_get_client_ip_address_filter_flags', FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE );
  • restricted_site_access.php line 2266
    /**
     * Filter hook to set array of trusted IP address headers.
     */
    apply_filters( 'rsa_trusted_headers', $trusted_headers );
  • restricted_site_access.php line 2210
    /**
     * Filter hook to set array of trusted proxies.
     */
    apply_filters( 'rsa_trusted_proxies', array() );
  • restricted_site_access.php line 772 · used in 2 places
    apply_filters( 'restricted_site_access_is_restricted', $is_restricted, $wp );
  • restricted_site_access.php line 811
    do_action( 'restrict_site_access_handling', $rsa_restrict_approach, $wp );
  • restricted_site_access.php line 810
    apply_filters( 'restricted_site_access_approach', self::$rsa_options['approach'] );
  • restricted_site_access.php line 920
    apply_filters( 'restricted_site_access_head', self::$rsa_options['head_code'], $wp );
  • restricted_site_access.php line 880
    apply_filters( 'restricted_site_access_message', $message, $wp );
  • restricted_site_access.php line 1800
    apply_filters( 'restricted_site_access_message_editor_quicktags', array( 'buttons' => 'strong,em,link,block,del,ins,img,ol,ul,li,code,close', ) );
  • restricted_site_access.php line 919
    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: