herculesnetwork

please see you my try

Mar 31st, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1.  
  2. $myembed = htmlentities( (string)$feed_item->embed ); // hercules line
  3. $feed_item->desc = "ID: <h2>{$feed_item->title}</h2><br>\n{$myembed}<br>\n{$feed_item->desc}"; // hercules line
  4. // $feed_item->desc .= "<h2>{$feed_item->title}</h2>{$myembed}<br>{$feed_item->desc}";
  5. /* hercules 2 end */
  6. $post = array(
  7. 'post_author' => '1',
  8. 'post_status' => $_POST['status'],
  9. 'post_type' => $cpt,
  10. 'post_title' => (string) $feed_item->title,
  11. 'post_content' => (string) $feed_item->desc
  12. );
  13. $post_id = wp_insert_post( $post );
  14. update_post_meta($post_id, 'sponsor', (string)$_POST['source']);
  15. update_post_meta($post_id, 'videoID', (string)$feed_item->id);
  16. $post = array( // hercules line
  17. 'post_content' => $feed_item->desc, // hercules line
  18. ); // hercules line
  19. wp_insert_post($post_id); // hercules line
Add Comment
Please, Sign In to add comment