Simpler filter for reseting publication timestamp when setting to 'pend (1 post)

  1. Daniel Bachhuber
    Hand Built
    Posted 4 years ago #

    Howdy! I'm working the Happiness Bar today at Blogworld NY and a FeedWordPress user came up with a couple things he wanted fixed.

    Basically, there were two things:

    1. Reset the publication timestamp when publishing
    2. Unset the post_date_gmt value when importing syndicated posts as draft, so that he can hit "Publish" on the post and have it published at the time of hitting the button, instead of the original syndicated timestamp

    Here are the snippets I produced for him: https://gist.github.com/2884507

    The first was easy and the second was a bit of a hack. If you return '0' for the 'syndicated_item_published', you get Unix epoch as the publication time.

    It'd be awesome to instead see a filter like this added:

    Index: feedwordpress/syndicatedpost.class.php
    --- feedwordpress/syndicatedpost.class.php	(revision 554381)
    +++ feedwordpress/syndicatedpost.class.php	(working copy)
    @@ -374,6 +374,8 @@<br />
    			$this->post['post_type'] = apply_filters('syndicated_post_type', $this->link->setting('syndicated post type', 'syndicated_post_type', 'post'), $this);
    +			$this->post = apply_filters( 'syndicated_post_object', $this->post );
     		endif;<br />
     	} /* SyndicatedPost::SyndicatedPost() */

    Hope this helps!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FeedWordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by Daniel Bachhuber
  • This topic is not resolved
  • WordPress version: 3.3.2


No tags yet.