How to add HTML into error message


php I have a filter for limit max upload file size with custtom message. I want to add link there, but html does not work here. Can you help me someone?

Here is my code

add_filter("wp_handle_upload_prefilter", function ($file) {
  $file_size_limit = 1024; 
  $current_size = $file["size"];
  $current_size = $current_size / 1024;

  if ($current_size > $file_size_limit) {

    $file["error"] = sprintf(
      __("File is too large contact <a href="">admin</a>."));
  return $file;

My problem is that I got a plain text instead of html.

enter image description here

Thanks for help.

Silmarion 2 months 0 Answers 10 views 0

Leave an answer