You could also do it using human_time_diff hook, but it would make it global:
function my_time_diff_mins( $since, $diff, $from, $to ) {
return $since . ($from > $to ? ' from now' : ' ago');
}
add_filter( 'human_time_diff', 'my_time_diff_mins', 10, 4 );
Related Posts:
- Customize Time Stamp
- display month in french in wordpress/php?
- How to get User Time Zone in WordPress?
- How to get movies by date
- current_time function incorrect in plugin and PHP, not in WordPress admin
- Time Stamp In A WordPress Post Title That Does Not Keep Refreshing
- Learndash: Customize user enroll time
- Can’t add to time? [closed]
- NOW() function in PHP
- How do I use Shortcodes inside of HTML tags?
- What difference does it make including the @package annotation or not?
- Renaming wp-content folder dynamically
- Trigger a php file on every post or page if a condition is met
- Prevent multiple counts by same user – WP PostViews plugin
- display most popular tags in two columns
- Having Issues on Using PHP glob() in WordPress
- show number of posts posted today
- WordPress loop specific thumbnail size
- JavaScript, best way to use data from the loop
- Put a link to a category round a hard coded A HREF
- write custom woocommerce templates and forms
- Using Advanced Custom Fields to create a per page slider
- How can I properly control the numbers and dots that appear in pagination?
- WordPress Search Results for Multiple Post Types
- Using the echo command adds unwanted br tags to source
- Issue adding sub category programmatically
- custom url rewrite for wordpress
- Customizer: Multiple CSS styles on same element in Live Preview
- WordPress and Conditions
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Royalty-Free Sliders used in theme development
- Custom Pagination is Broken
- Error using WordPress $wpdb object to get result from custom table
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- Local WordPress with WAMP downloads files out of Nowhere
- Need help with Code Correction php+wordpress
- Images Uploaded saving onto older/previous year folders
- PHP Redirect condition
- How to hide the author box of a specific user?
- WordPress 4.2.3 on Windows Server 2008 R2 Creating Files as read only
- WooCommerce “Checkout Now” button [closed]
- Where can I find linked fonts in my theme?
- Undefined variable: row?
- WordPress theme showing blank page
- Finding and removing duplicates within WP Arrays
- How can I call a specific file (via php) by referencing the logged-in username?
- save_post action inside a custom metabox class not working
- Hard-coding a shortcode as the last menu item in primary navigation?
- quotes problem in very simple sql
- Blog suddenly shows Archive instead of index page
- WP-CLi PHP Warning: mysqli_query(): (HY000/1356): View During Search Replace
- The additional fee for the COD payment method not visible in the front-end
- Loading Elementor templates in a Bootstrap modal on button clicking
- If the_title starts containing the same characters as the_content then
- How to add and subtract user meta values after post meta update
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- How to check if is page template inside functions.php
- How to hide a div section when user is logged in, in single product woocommerce
- Global variable doesnt’t pass to another function
- display custom plugin view on front end inside template body
- Fix hover images blink
- How to auto-generate random numbers in username?
- PHP Error in WordPress Theme
- my_meta not saving in my current hosting
- Blog Image and Title in Right Sidebar
- Generate random access token to a post page
- Filter loop by ‘price’ with meta_query
- (Who to follow) Twitter widget
- Singleton in plugin fails on AJAX call (Plugin initialzed again)
- How save data on user’s client cache
- remove public static function wp_link_dialog()
- Find the method which AJAX GET calls
- Problems with the WordPress loop [closed]
- Multilanguage website on two different domains
- White screen after login attempt
- Widget header unique classes
- Trouble using wordpress functions in a pop-up modal form
- admin-ajax.php loading many times
- Trying to display ads on only a third of posts in a loop. Keep getting Error 500?
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- Can’t find text source file in WP theme [closed]
- What does that mean: cannot use a scalar value as an array [closed]
- How to get a database field value from a WordPress table? [closed]
- Divi – add title to mobile menu button
- Changing WP_MEMORY_LIMIT doesn’t affect actual memory limit
- How to enqueue structured data as file – jsonld file seems not to work
- Woocommerce – Include custom user meta in order ‘filter by registered customer’ Ajax search
- Slick slider not working on wordpress
- Increase Upload Size with htaccess | MAMP
- Change WooCommerce Order status from frontend form submitted data
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- How do I organize posts based on their taxonomy?
- How to get ACF field to show up on all posts on front end?
- Custom post type removing /page/2/ from URL when trying to access it
- Capture the Selected Radio Button Value between two files in wordpress theme
- Prevent publishing of uncategorized posts
- Nonce code vulnerability
- How can I save the HTML output of a WP_Query function as a variable?
- WordPress website not loading
- Custom plugin with dynamic child pages listing database records