[wp-trac] [WordPress Trac] #22981: Tweets import plugin tracking ticket
WordPress Trac
noreply at wordpress.org
Wed Dec 19 14:01:00 UTC 2012
#22981: Tweets import plugin tracking ticket
----------------------------+----------------------------
Reporter: nacin | Owner: PeteMall
Type: task (blessed) | Status: accepted
Priority: high | Milestone: WordPress.org
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+----------------------------
Comment (by aaroncampbell):
Replying to [comment:15 jeremyfelt]:
> I haven't tested for functionality yet, but an additional filter for
post_type in [attachment:wp-twitter-importer.2.zip], defaulting to `post`,
would be ideal for maximum extendability.
You can set the post type using the `twitter-import-post-data` filter,
which filters the entire array passed to `wp_insert_post()`. Use
something like this:
{{{
function twitter_import_post_data( $post ) {
$post['post_type'] = 'tweet';
return $post;
}
add_action( 'twitter-import-post-data', array( $this,
'twitter_import_post_data' ) );
add_action( 'twitter-import-post-format', '__return_null' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22981#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list