Changeset 175624
- Timestamp:
- 11/20/2009 05:34:48 PM (16 years ago)
- File:
-
- 1 edited
-
listpipe/trunk/listpipe.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
listpipe/trunk/listpipe.php
r171719 r175624 4 4 Plugin URI: http://www.listpipe.com/plugins.php 5 5 Description: The ListPipe Pugin for WordPress pulls Powerful Custom Content from your ListPipe account and inserts it into your posts. 6 Version: 2. 16 Version: 2.2 7 7 Author: Square Compass, LLC 8 8 Author URI: http://www.squarecompass.com … … 12 12 //Functions 13 13 function listpipe_get_content() { 14 global $wpdb; 14 15 switch(@$_REQUEST['action']) { 15 16 case 'GetDraft': … … 61 62 ) 62 63 ); 64 //Get this Blogs Admin User 65 $admin_user_id = $wpdb->get_var($wpdb->prepare("SELECT id FROM $wpdb->users WHERE user_email=%s;",get_option("admin_email"))); 63 66 // Save Post 67 $publish_timestamp = strtotime("+ ".rand(0,3000)." seconds"); 64 68 $postID = wp_insert_post(array( 69 "post_author"=>$admin_user_id, 65 70 "post_status"=>($is_draft?"draft":"publish"), 66 71 "post_type"=>"post", 67 72 "post_title"=>$contents[0], 68 73 "post_content"=>$contents[1], 69 "post_category"=>array($cat_id) 74 "post_category"=>array($cat_id), 75 "post_date"=>date("Y-m-d H:i:s",$publish_timestamp), 76 "post_date_gmt"=>gmdate("Y-m-d H:i:s",$publish_timestamp) 70 77 )); 71 78 if(empty($postID))
Note: See TracChangeset
for help on using the changeset viewer.