I'm writing a small function that takes a json file (~1000 objects) and uploads every json object to WordPress posts. I only need to have it run once to migrate data from another system.
I wrote the code in a function in functions.php and added a filter that ran it every time it loaded a page. It almost works but sometimes it runs multiple times.
Are there any way to trigger a hook from a link-click in front-end? That would need for me to get this to work.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745065407a4609226.html
评论列表(0条)