WordPress.org

Support

Support » Plugins and Hacks » Changing the 'open in new window' code

Changing the 'open in new window' code

  • I’m quite familiar with the built-in option in WP to open images in a new window in posts, but this produces the target=”_blank” markup which is not valid in XHTML transitional doctypes. I actually have a javascript workaround for this:

    onclick=”window.open(this.href); return false;”

    Rather than manually edit every post, it would be nice to find the script in WordPress that generates the target=”_blank” code and replace it with my Javascript code. Can anyone who is familiar with the WP scripts tell me if this is possible please.

    Or is this a function that could be applied in functions.php?

    Thanks

  • The topic ‘Changing the 'open in new window' code’ is closed to new replies.