acf/the_field/allow_unsafe_html
acf/the_field/allow_unsafe_html
Appears in: advanced-custom-fields.6.3.5
Hook Type: filter
Displaying hooks found in version: advanced-custom-fields.6.3.5apply_filters('acf/the_field/allow_unsafe_html') is found 2 times:
- /includes/api/api-template.php line 123119120121122123124125126127128129
$unescaped_value
= false;
}
$field_type
=
is_array
(
$field
) && isset(
$field
[
'type'
] ) ?
$field
[
'type'
] :
'text'
;
if
( apply_filters(
'acf/the_field/allow_unsafe_html'
, false,
$selector
,
$post_id
,
$field_type
,
$field
) ) {
$value
=
$unescaped_value
;
}
elseif
(
$unescaped_value
!== false && (string)
$value
!== (string)
$unescaped_value
) {
do_action(
'acf/removed_unsafe_html'
,
__FUNCTION__
,
$selector
,
$field
,
$post_id
);
}
echo
$value
;
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped by logic above.
- /includes/api/api-template.php line 901897898899900901902903904905906907
$unescaped_value
= false;
}
$field_type
=
is_array
(
$field
) && isset(
$field
[
'type'
] ) ?
$field
[
'type'
] :
'text'
;
if
( apply_filters(
'acf/the_field/allow_unsafe_html'
, false,
$field_name
,
'sub_field'
,
$field_type
,
$field
) ) {
$value
=
$unescaped_value
;
}
elseif
(
$unescaped_value
!== false && (string)
$value
!== (string)
$unescaped_value
) {
do_action(
'acf/removed_unsafe_html'
,
__FUNCTION__
,
$field_name
,
$field
, false );
}
echo
$value
;
//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped inside get_sub_field_object where necessary.