• Plugin Author Lester Chan

    (@gamerz)


    WP-RelativeDate 2.0.0 is a total rewrite of the plugin with Claude Code to make it more modern and testable. There will be breaking changes. Please do test it https://github.com/lesterchan/wp-relativedate/archive/refs/heads/master.zip

    WP-RelativeDate 2.0.0 requires WordPress 6.8 and PHP 8.2. A site on an older stack is simply not offered the update, so if WP-RelativeDate has stopped appearing in your updates list, that is why.

    Relative dates will start appearing where they never did before. Since 1.20 the plugin hooked the_date() and the_time(), which almost no modern theme calls — every default theme since Twenty Nineteen builds its post meta from get_the_date() instead. The plugin now hooks the getters, so a theme that showed plain dates for years will show “Today” and “3 days ago” the moment you update.

    If you had turned the plugin off for a template, the line has changed. remove_filter( 'the_date', 'relative_post_date', 999 ) no longer removes anything; use get_the_date, and likewise get_the_time in place of the_time. The two comment filters are unchanged.

    ago_only=”false” now does what it says. Until 2.0.0 the shortcode read the string “false” as true, so [relativedate ago_only=”false”] printed only “3 days ago” instead of the date. Change those shortcodes to ago_only=”true” if you were relying on it.

    Markup passed to relative_post_the_date() reaches the page again. Since 1.51.1 the tag escaped its own $before and $after arguments, so a theme passing an h2 tag got the literal characters printed.

    The plugin now stores one row, wp_relativedate_version, and deletes it on uninstall. There is still no settings screen, and no template tag or shortcode changed name.

    The page I need help with: [log in to see the link]

You must be logged in to reply to this topic.