acf/removed_unsafe_html

acf/removed_unsafe_html

Hook Type: action

See hook in core

Displaying hooks found in version: advanced-custom-fields.6.2.7

do_action('acf/removed_unsafe_html') is found 3 times:

  • /includes/api/api-template.php line 122
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
        $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 ( (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 891
    887
    888
    889
    890
    891
    892
    893
    894
    895
        $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 ( (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.
    }
  • /includes/api/api-template.php line 1075
    1071
    1072
    1073
    1074
    1075
    1076
    1077
    1078
    1079
    1080
        // Handle getting the unescaped version if we're allowed unsafe html.
        if ( apply_filters( 'acf/shortcode/allow_unsafe_html', false, $atts, $field_type, $field ) ) {
            $value = $unescaped_value;
        } elseif ( (string) $value !== (string) $unescaped_value ) {
            do_action( 'acf/removed_unsafe_html', __FUNCTION__, $atts['field'], $field, $post_id );
        }
     
        return $value;
    }
    add_shortcode( 'acf', 'acf_shortcode' );