• Hi,

    I have found the following code for the function.php to open all external links in a new window:

    function autoblank($text) {
    	$return = str_replace('<a', '<a target="_blank"', $text);
    	return $return;
    }
    add_filter('the_content', 'autoblank');

    But this is not exactly what I want, because then I isn’t possible for my do decide which links would be opend in a new window and which not.

    I don’t want to install another plugin for that functionality.

    So is it possible to write in my wordpress Installation, that the cross on the “Add Link”-Window for “Open in a new window/tap” is set by Default?!
    And I if I want I can unmark this Point.

    I think this would be the most elegant solution.

    Please don’t discus about the use of target =_blank. I know, that there are many different opions about it.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘External Link Option target="_blank"' – activated option’ is closed to new replies.