Firewall
in package
Blocks requests by client IP or user-agent before WordPress processes them.
See the module-4 design spec §5.
Table of Contents
Methods
- run() : void
- Runs the firewall for the current request. Registered on `init` at priority 0. Terminates the request when the client is blocked.
- context() : array{ip: string, path: string, method: string, is_ajax: bool, user_agent: string}
- Builds the request context array.
Methods
run()
Runs the firewall for the current request. Registered on `init` at priority 0. Terminates the request when the client is blocked.
public
run() : void
context()
Builds the request context array.
private
context(string $ip) : array{ip: string, path: string, method: string, is_ajax: bool, user_agent: string}
Parameters
- $ip : string