WordPress.org

Forums

Linkify Text
New window (7 posts)

  1. lucsar
    Member
    Posted 1 year ago #

    Hi, any way to open links in a new window?

    Thanks
    LS

    http://wordpress.org/plugins/linkify-text/

  2. Scott Reilly
    WordPress & Plugin Dev
    Plugin Author

    Posted 1 year ago #

    @lucsar: At present, not easily (not without writing code to do so). I'll try to make it easier to do so in the next release. Thanks for the suggestion!

  3. lucsar
    Member
    Posted 1 year ago #

    Hi Scott,

    thanks for reply. In the meantime I've (dirty) patched linkify-text.php:
    $new_text = '<a href="' . esc_url( $link ) . '">' . $old_text . '</a>';

    with

    $new_text = '<a href="' . esc_url( $link ) . '"target="_blank">' . $old_text . '</a>';

    but would be nice to get this with a parameter option for each entry line.

    So, on hold for the next release.

    Thank you
    LS

  4. Scott Reilly
    WordPress & Plugin Dev
    Plugin Author

    Posted 1 year ago #

    @lucsar: A quick question about your statement "a parameter option for each entry line". Are you hoping to open links in a new window on a per-link basis?

    My inclination would be to have a checkbox that will do it for all or none. (Essentially, the output would match yours if the checkbox was set.)

  5. lucsar
    Member
    Posted 1 year ago #

    Hi Scott,

    for me would be rather to set that for each entry line with an additional parameter to parse, because we can have also internal links for those we don't want necessary to open a new window.

    An example could be:
    WordPress => http://wordpress.org target=blank
    WordPress => http://wordpress.org target=self

    LS

  6. lucsar
    Member
    Posted 1 year ago #

    Hi Scott,

    I thought that would be more than perfect if you also add an icon beside the external links. Something like that:

    http://png-3.findicons.com/files/icons/2315/default_icon/256/open_in_new_window.png

    I know, this is an extra stuff for you but if you plan to implement the new window functionality, I think it shouldn't be so complicated at this point to add an additional parameter for external links and place the image. At least I hope.

    Thank you!
    LS

  7. GoFishDK
    Member
    Posted 11 months ago #

    Hi...

    I love this plugin, and it does almost everything, that I want.
    One thing missing is to open in a new window option.

    Looking forward to the option

    /Mike Larsen

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags