Nextend Twitter Connect
[resolved] Bugfix: redirect-parameter set wrong in link-button-href (2 posts)

  1. renet
    Posted 3 years ago #

    Hey there,

    I think I found a bug in your plugin: If my blog can be reached under http://example.com/wordpress, the redirect-parameter of your link-button href-attribute points to http://example.com/wordpress/wordpress...

    The line 465 in nextend-twitter-connect.php contains the bug:
    return '<a href="'.new_twitter_login_url().'&redirect='.site_url().$GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI'].'">'.$new_twitter_settings['twitter_link_button'].'</a>';

    I added the following function:

    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
     } else {
     return $pageURL;

    and replaced the line 465 with this one:
    return '<a href="'.new_twitter_login_url().'&redirect='.curPageURL().'">'.$new_twitter_settings['twitter_link_button'].'</a>';

    Now everything works fine. :) Can you please fix this in your plugin? Thanks!


  2. Nextendweb
    Plugin Author

    Posted 3 years ago #

    Thank you! I have added it in version 1.4.41

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Nextend Twitter Connect
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.