Redirect_Handler
Redirect Handler class.
Namespace: WebberZone\Link_Warnings
Since: 1.0.0
Source: includes/class-redirect-handler.php line 25
Methods
__construct()
Constructor.
Since: 1.0.0
Line: 32
public function __construct( );
add_rewrite_rules()
Add rewrite rules for redirect endpoint.
Since: 1.0.0
Line: 46
public function add_rewrite_rules( );
add_query_vars()
Add query vars.
Since: 1.0.0
Line: 61
public function add_query_vars( $vars ): array;
| Type | Name | Description |
|---|---|---|
array | $vars | Query vars. |
Returns: array — Modified query vars.
handle_redirect()
Handle redirect template.
Since: 1.0.0
Line: 72
public function handle_redirect( );
get_redirect_template_path()
Get redirect template path.
Checks the child theme / parent theme first, then falls back to the plugin template.
Since: 1.0.0
Line: 134
public function get_redirect_template_path( ): string;
Returns: string — Template file path.
enqueue_redirect_assets()
Enqueue redirect page assets.
Since: 1.0.0
Line: 177
public function enqueue_redirect_assets( );
ajax_sign_urls()
AJAX handler: return HMAC-signed redirect URLs for a batch of external URLs.
Since: 1.3.0
Line: 221
public function ajax_sign_urls( );
get_redirect_url() static
Get redirect URL for a destination.
Since: 1.0.0
Line: 248
static public function get_redirect_url( $destination ): string;
| Type | Name | Description |
|---|---|---|
string | $destination | Destination URL. |
Returns: string — Redirect URL.