ECI Triggering Other Plugins   

Apr 6th, 2011 // In: Easy CSV Importer // By: Comments 0

One thing many users of Easy CSV Importer are not aware of is the fact that it uses all the same core WordPress functions to create a post as WordPress uses when you make a post manually. This means that WordPress and any installed plugins react to every post created by Easy CSV Importer in the same way as if you created the post manually yourself. Can you see the potential problem this could cause, if you consider creating 100,000 posts all at once? It is this reason I recommend deactivating plugins that respond to a post being created e.g. any plugin that updates another site about your post being published.

None of this is normally an issue. If your making even 1000 posts all at once, you would not normally want to update any other site. That would be like spamming it, it just probably would not work anyway. However your blog would try and that is a lot of extra work to perform for nothing. If your creating 1 post per hour, that is totally fine and there is no need to switch other plugins off. What if your creating 100 per hour. Well depending on traffic, this could make your blog very busy. This is at least 1 post per minute, trigger lets say a Twitter plugin which tweets your published post. Not a good thing really is it, Twitter does not like tweets at such a rate and I doubt Facebook does either.

A Way Around Deactivation

So the simple solution and the one that usually goes down well with my users is to remove those plugins until their blog is fully built e.g. all posts created using all data. I recently considered the possibility that a user with a highly activate blog may want certain plugins active as part of their service/operation and switching them off will effect their visitors. We can get around having switch plugins off while posts are generated automatically by removing action hooks and filters at the point which a post is being created. Here is an example of the line we can add to the eci_createposts function…

remove_filter(‘content_save_pre’, ‘eci_editpostsync’);

If you want to help build up this solution. Please search for “add_filter” in your plugins script or ask the author. Then send the line that adds a filter to me. Do the same with “add_action”, these are all similar in a way, well to none developers. The idea is that we will prevent further work being performed by other plugins, when a post is being created and only if it is Easy CSV Importer creating the post.

Tags: - - -

Leave a Reply

You must be logged in to post a comment.