Permalink
Browse files

cleaner code

  • Loading branch information...
1 parent 61d96ca commit 33db2d846f393cea83c558e39d7a607300cee65e @alexkingorg alexkingorg committed Aug 3, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 classes/aktt_tweet.php
View
@@ -442,11 +442,12 @@ function add() {
'guid' => $this->guid(),
// 'tax_input' => $tax_input, // see below...
));
- $this->post_id = wp_insert_post($data, true);
- if (is_wp_error($this->post_id)) {
- AKTT::log('WP_Error:: '.$this->post_id->get_error_message());
+ $post_id = wp_insert_post(addslashes_deep($data), true);
+ if (is_wp_error($post_id)) {
+ AKTT::log('WP_Error:: '.$post_id->get_error_message());
return false;
}
+ $this->post_id = $post_id;
// have to set up taxonomies after the insert in case we are in a context without
// a 'current user' - see: http://core.trac.wordpress.org/ticket/19373

0 comments on commit 33db2d8

Please sign in to comment.