WordPress.org

Ready to get started?Download WordPress

Forums

Tweeple
Custom time to display in Tweeple plugins (3 posts)

  1. bboy8k
    Member
    Posted 4 months ago #

    This is plugin great for me!
    But, I want to change time not like default.
    I want change time to format like: "25 MINUTES AGO", "1 HOUR AGO"...

    How can I do it?

    https://wordpress.org/plugins/tweeple/

  2. bboy8k
    Member
    Posted 4 months ago #

    Someone please say for me know, please

  3. Jason (Theme Blvd)
    Member
    Plugin Author

    Posted 3 months ago #

    Hello,

    There's no feature for this and a customization you'd need to make from your own plugin file or theme functions.php.

    If you want to setup a custom function to display the time of each tweet, you can use the action hook "tweeple_tweet_meta" like this:

    function my_tweeple_tweet_meta( $tweet ) {
        // Use $tweet['time'] ...
        echo $tweet['time'];
    }
    remove_action( 'tweeple_tweet_meta', 'tweeple_tweet_meta_default' );
    add_action( 'tweeple_tweet_meta', 'my_tweeple_tweet_meta );

    You'd have to come up with a creative way to calculate time ago, though. I know bbPress plugin has a function for this that works something like this:

    http://www.jasonbobich.com/wordpress/a-better-way-to-add-time-ago-to-your-wordpress-theme/

    You can see how what's hooked by default to show the time of each tweet and how it works.

    https://github.com/themeblvd/Tweeple/blob/master/inc/functions.php#L96

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.