In previous versions, the plugin stored individual post ids in a cookie. To avoid having a huge cookie, I limited it to 500 ids. Needless to say, this was not a very scalable solution.
In the current version, it remembers the query vars instead, which are later used to get the adjacent posts.
In this way, the amount of data in the cookie stays the same, no matter how many posts you have.
Two template tags have been added:
If you have posts in multiple categories, you can use
get_referrer_category() to retrieve the category object, based on the referrer url.
get_referrer_url() returns the full URL of the referrer.
Also, there are two extra arguments for previous_post_smart() and next_post_smart(): $in_same_cat and $excluded_categories.
This is how the function prototype looks like:
$format = '« %link',
$title = '%title',
$fallback = true,
$in_same_cat = false,
$excluded_categories = ''
next_post_link() have an option to restrict adjacent posts to the current category. This plugin takes one step further:
If you visit an archive page (category, tag, date, author, search etc.) and then visit a single post from that page, the
next_post_smart() will point only to the other posts in that archive page.
This is particularly useful for photoblogs (that’s where I use it).
If there isn’t an adjacent post, it will use the normal template tags.