WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#4801 closed enhancement (fixed)

get_lastpostmodified needs a hook.

Reported by: cavemonkey50 Owned by: rob1n
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.3
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

Working on the Tumblefeed plugin, I recently ran into a problem. I should first take a step back and explain what Tumblefeed is doing.

The Tumblefeed plugin is designed to create a better feed for WordPress tumblelogs. Instead of bombarding readers with feed updates throughout the day, the plugin prevents the posts for the day from appearing in the feed until midnight. At midnight they're all posted as one item.

Certain feed readers (namely Feedburner) are not updating the feed due to the <pubDate> value not changing. The <pubDate> value is linked to get_lastpostmodified. Since the Tumblefeed plugin is not really modifying any posts (thus changing the get_lastpostmodified value), the date stays the same even though the feed has been updated.

To solve the problem, I feel a filter hook should be added to get_lastpostmodified. The filter would allow me alter the value without making any drastic and unneeded database changes.

As mentioned by Matt himself, WordPress tumblelogs are starting to take off and would certainly benefit from this change. Right now I have logged around 75 downloads of the Tumblefeed plugin, so there is demand for this type of change.

While I understand under normal conditions a plugin should have no reason to filter this value, this is an exception I feel is worthwhile adding a filter for.

Attachments (1)

4801.diff (632 bytes) - added by rob1n 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 userx7 years ago

FWIW: I think Ron is really suggesting something seriously beneficial for WordPress. The rise of things like Tumblr are only beginning to change the larger and already established blogging landscape. I imagine more Tumble-like CMS and host options will be springing up all over the place soon. It would be wise to lead the change, while simultaneously reinforcing current ideas, methods, and technologies. If leading the change at the moment only consists of adding a much need hook to get_lastpostmodified, so those of who are actually using WordPress as a bridge into different ways of blogging can continue to use it, then I hope the change can be worked into the next release.

Personally, I think WordPress is the very best of both worlds. I can use it as a Tumblelog, and retain the full functionality of a full-blown weblog (Tumble-Hybrid). I think the potential to be the best of both worlds is there; I think many people will keep running WordPress, as a result of the options in functionality. We just need a hook to help out with the RSS issues Ron addressed in the above ticket.

Thanks
Shawn Lo-Fi Tribe

comment:2 frotzed7 years ago

I would like to echo what Shawn said above. From my vantage point tumblogging will continue to grow in popularity. To what extent it will grow I'm not sure, but I do know that many people like the concept and are regularly emailing me, IMing me and commenting on my blog looking for ways to get their own WordPress tumblog.

This sort of date-based feed updating is fundamentally necessary for running a WordPress tumblog as updating my feed 10+ times per day is out of the question. Tumblfeed accomplishes this task but requires some hacking because of the lack of this hook for get_lastpostmodified. A hook in this location would, from my view, make it considerably easier for bloggers to turn their WordPress blogs into WordPress tumblogs.

comment:3 rob1n7 years ago

  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned

rob1n7 years ago

comment:4 rob1n7 years ago

  • Keywords has-patch commit added

I added a filter to get_lastpostdate as well for the sake of completeness.

comment:5 ryan7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5918]) Add get_lastpostdate and 'get_lastpostdatemodified filters. Props rob1n. fixes #4801

Note: See TracTickets for help on using tickets.