[wp-hackers] wp_insert_posts?
Mike Schinkel
mikeschinkel at newclarity.net
Wed Nov 9 21:28:34 UTC 2011
Sounds like a very useful functionality. As you probably know many hooks can potentially run during wp_insert_post() so if you don't run those hooks you might run into trouble. Maybe you could create a trac ticket and then do a first pass on a future bulk insert for that would meet your needs but be a starting point for a potential future wp_insert_posts()?
-Mike
On Nov 9, 2011, at 4:12 PM, Ryan Frankel wrote:
> All,
> Is there a function similar to wo_insert_post that can INSERT multiple posts into the db at the same time (i.e. not call INSERT over and over)? I have thousands of posts to insert into my db from an API pretty often and it looks like the long pole in the execution time is all of the inserts. It would be nice to have a function like wp_insert_posts for multiple post additions using multiple VALUEs that mysql supports. I realize I can probably modify the wp_insert_post code to do it but I figured I would ask so I don't reinvent the wheel.
>
> ryan
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list