• Resolved wpnewbie69

    (@wpnewbie69)


    I noticed that the links get truncated for some reason making them unclickable.

    This:
    Angry Asian American, a new show from @angryasianman @jennyyangtv on @ISATVofficial Watch the first angry ep. here: https://ow.ly/uPKum

    Turns into this:
    RT @Kollaboration: Angry Asian American, a new show from @angryasianman @jennyyangtv on @ISATVofficial Watch the first angry ep. here: http…

    Is this a bug or is there a setting I can change in theming?

    https://www.ads-software.com/plugins/latest-tweets-widget/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter wpnewbie69

    (@wpnewbie69)

    Ah, I see. Ok, Tim. Thanks for taking the time to address the issue.

    I had a similar issue so I modified the plugin slightly to get my desired output.

    When tweets are returned from the API they also contain a retweeted_status key in the array if they are a retweet. This in turn actually contains the original tweet text rather than one with shortened url’s etc. I just did a check for this value and set the text to it if it was present. So in the main latest-tweets.php file around line 87 where it starts to loop over the tweets I first of all reset the $retweeted_status value to null since it’ll be created again after the extract method if it is present, then check and set the text to the retweet text if required. Something like this:

    foreach( $tweets as $tweet ){
                $retweeted_status = null;
    
                extract( $tweet );
    
                if( isset($retweeted_status) && array_key_exists('text', $retweeted_status))
                {
                    $text = 'RT ' . $retweeted_status['text'];
                }

    Hope that helps

    Plugin Author Tim W

    (@timwhitlock)

    This is awesome, thanks. I didn’t spot that key when I was looking at this before. I’ll look at including this fix in the next version.

    Plugin Author Tim W

    (@timwhitlock)

    Works great. I’ve made the change, here:
    https://github.com/timwhitlock/wp-twitter-widget/commit/4b11f3636bec0ec0ca7736ee321f1f4b3e808047

    Will go live in the next stable release of the plugin.

    Thanks both.

    Good stuff ?? Thanks for the excellent plugin Tim, appreciate your work!

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Links don't show’ is closed to new replies.