Support

Account

Home Forums Feature Requests get_field, the_field() – return escaped value Reply To: get_field, the_field() – return escaped value

  • HI guys

    Thanks for the feature request.
    I’m hoping not to add any extra options to each field in anttempt to keep the UI minimal.

    For now, can you please use this code:

    
    <?php
     
    function my_acf_format_value( $value, $post_id, $field ) {
    	
    	return esc_attr($value);
    	
    }
    
    add_filter('acf/format_value/type=url', 'my_acf_format_value', 10, 3);
     
    ?>