wpsc_accept_headers
wpsc_accept_headers
Appears in: wp-super-cache.1.12.0, wp-super-cache.1.12.1, wp-super-cache.1.12.3, wp-super-cache.1.12.4, wp-super-cache.2.0.0, wp-super-cache.2.0.1
Hook Type: filter
Displaying hooks found in version: wp-super-cache.2.0.1apply_filters('wpsc_accept_headers') is found 1 times:
- /wp-cache-phase2.php line 537533534535536537538539540541542543
function
wpsc_get_accept_header() {
static
$accept
=
'N/A'
;
if
(
$accept
===
'N/A'
) {
$accept_headers
= apply_filters(
'wpsc_accept_headers'
,
array
(
'application/json'
,
'application/activity+json'
,
'application/ld+json'
) );
$accept_headers
=
array_map
(
'strtolower'
,
$accept_headers
);
// phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash -- $accept is checked and set below.
$accept
= isset(
$_SERVER
[
'HTTP_ACCEPT'
] ) ?
strtolower
( filter_var(
$_SERVER
[
'HTTP_ACCEPT'
] ) ) :
''
;
foreach
(
$accept_headers
as
$header
) {