WordPress.org

Ready to get started?Download WordPress

Forums

WP External Links (nofollow new window seo)
[resolved] [Bugs+fix] Two small code errors (3 posts)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya,

    Thanks for this plugin. Please find the below fixes as a compliment to your plugin. Hope they make it into the next version. Line numbers based on the current version 1.31

    Hope this helps!

    Smile,
    Juliette

    **************************

    File: class-wp-external-links.php

    Find line 331-333:

    $original_head = $matches[ 0 ];
    $content = str_replace( $original_head, $clean_head, $content );

    Replace with:

    if( count( $matches ) > 0 ) {
    	$original_head = $matches[ 0 ];
    	$content = str_replace( $original_head, $clean_head, $content );
    }

    Find line 392-393:

    // recover original <head> with attributes
    $content = str_replace( $clean_head, $original_head, $content );

    Replace with:

    if( isset( $original_head ) ) {
    	// recover original <head> with attributes
    	$content = str_replace( $clean_head, $original_head, $content );
    }

    http://wordpress.org/extend/plugins/wp-external-links/

  2. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Juliette, I am very offended by your post.
    No seriously, very good suggestions and I will put them on the list.
    Thanks! ;)

  3. jrf
    Member
    Posted 1 year ago #

    Glad to be of service ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic