Skip to content
Browse files

allow post format to be filtered or skipped

  • Loading branch information...
1 parent da8bae3 commit 175272e7536f456f5d70da3200d7387d03100eb7 @alexkingorg alexkingorg committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 classes/aktt_tweet.php
View
6 classes/aktt_tweet.php
@@ -575,7 +575,11 @@ function create_blog_post($args = array()) {
wp_set_object_terms($this->blog_post_id, intval($post_category), 'category');
wp_set_object_terms($this->blog_post_id, array_map('trim', explode(',', $post_tags)), 'post_tag');
- set_post_format($this->blog_post_id, 'status');
+ // hook in here and return false to not set the format to "status",
+ // or return another format to use that format instead of status
+ if ($post_Format = apply_filters('aktt_tweet_create_blog_post_format', 'status', $data, $this)) {
+ set_post_format($this->blog_post_id, $post_Format);
+ }
if (!empty($this->featured_image_id)) {
update_post_meta($this->blog_post_id, '_thumbnail_id', $this->featured_image_id);

0 comments on commit 175272e

Please sign in to comment.
Something went wrong with that request. Please try again.