Support » Fixing WordPress » Formatting (make_clickable)

  • Is there any way to add a target=”_blank” to url’s from a string using make_clickable formatting function?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You may be able to use a preg_replace to do what you want:

    $clickable = make_clickable($string);
    $target_blank = preg_replace('/<a /','<a target="_blank" ',$clickable);
    echo $target_blank;

    Thx for the feedback!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Formatting (make_clickable)’ is closed to new replies.