Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tim W

    (@timwhitlock)

    shortcode is a good idea. Not supported yet. I will add when I get a moment

    Thread Starter lamarant

    (@lamarant)

    Thanks. I’ll check back periodically but can you post here when you’ve implemented the shortcode? I’ll be your guinea pig. Appreciate it!

    Plugin Author Tim W

    (@timwhitlock)

    I’ve added a [tweets] shortcode to the development version 1.0.10

    You can specify a couple of attributes too:
    [tweets max=5 user=timwhitlock]

    Let me know how you get on and I’ll publish it to the stable branch at some point.

    Thread Starter lamarant

    (@lamarant)

    I can’t seem to find the 1.0.10 version? Only goes up to .09

    Plugin Author Tim W

    (@timwhitlock)

    Sorry, yes. I incremented the version number in the wrong file.
    Try again: https://www.ads-software.com/plugins/latest-tweets-widget/developers/

    Thread Starter lamarant

    (@lamarant)

    Very close. All I need is the text of the last tweet. But I ended up using your existing code to create my own short code: [tweet user=lamarant], which calls a modified function:

    function last_tweet_text( $screen_name = ” ){
    $items = latest_tweets_render( $screen_name, 1, false, false );
    return $items[0];
    }

    That returns the last tweet and date stamp in <p> elements. I remove the date <p> using css (display: none) and voila.

    https://www.leonamarant.com/

    It would be cool if your plugin could include a web service that returned the raw JSON from the users Twitter feed (like the old API). That way you could call the service (using jQuery.ajax() for example) and do whatever you wanted with the data. I think this could be done using the wp_ajax method but I’m not 100% sure (it’s been a while).

    In any case…great work on this plugin. I was worried that I was going to have to create this myself! Thanks again.

    Plugin Author Tim W

    (@timwhitlock)

    Glad it got you there.

    re Ajax. Opening up Twitter data in this form on your site is likely to get you shut down by Twitter. Even if it’s only your feed, it’s against their oppressive API terms of use. For reference: https://twproxy.eu/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘shortcode?’ is closed to new replies.