Request for hook addition
-
I want customize http status code.
Could you modify codes atinc/class-seed-cspv5.php
as follows?current codes:
header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 86400'); // retry in a day
↓
$statusCode = absint(apply_filters('seed_cspv5_http_status_code_in_maintenance', 503)); if ($statusCode < 100 || 599 < $statusCode) { $statusCode = 503 } header(sprintf('HTTP/1.1 %d Service Temporarily Unavailable', $statusCode)); header(sprintf('Status: %d Service Temporarily Unavailable', $statusCode)); header('Retry-After: 86400'); // retry in a day
or
$default_headers = array( 'HTTP/1.1 503 Service Temporarily Unavailable', 'Status: 503 Service Temporarily Unavailable', 'Retry-After: 86400', ); $headers = apply_filters('seed_cspv5_http_response_headers_in_maintenance', $default_headers); if(...){ // enforce default headers if $headers variable is invalid $headers = $default_headers; } foreach($headers as $header){ header($header); }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Request for hook addition’ is closed to new replies.