Permalink
Browse files

add a filter for a enabling conditional creation of blog posts

  • Loading branch information...
1 parent be22841 commit da8bae301988463103bc1fd9708a0a72feba0629 @alexkingorg alexkingorg committed Oct 24, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 classes/aktt_tweet.php
@@ -557,6 +557,11 @@ function create_blog_post($args = array()) {
'guid' => $this->guid().'-post'
);
$data = apply_filters('aktt_tweet_create_blog_post_data', $data);
+
+ // hook in here if you want to conditionally skip blog post creation
+ if (!apply_filters('aktt_tweet_create_blog_post', true, $data, $this)) {
+ return false;
+ }
$this->blog_post_id = wp_insert_post($data, true);

0 comments on commit da8bae3

Please sign in to comment.