acf/prevent_access_to_unknown_fields

acf/prevent_access_to_unknown_fields

Hook Type: filter

See hook in core

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

apply_filters('acf/prevent_access_to_unknown_fields') is found 2 times:

  • /includes/acf-value-functions.php line 74
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
        // Check if we should trigger warning about accessing fields too early via action.
        do_action( 'acf/get_invalid_field_value', $field, __FUNCTION__ );
     
        if ( apply_filters( 'acf/prevent_access_to_unknown_fields', false ) || ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) ) {
            $allow_load = false;
        }
    }
     
    // If we're using a non options_ option key, ensure we have a valid reference key.
    if ( 'option' === $decoded['type'] && 'options' !== $decoded['id'] ) {
  • /includes/api/api-template.php line 1061
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
            }
        }
    }
     
    $access_already_prevented = apply_filters( 'acf/prevent_access_to_unknown_fields', false );
    $filter_applied           = false;
     
    if ( ! $access_already_prevented ) {
        $filter_applied = true;
        add_filter( 'acf/prevent_access_to_unknown_fields', '__return_true' );
    }