json - Run hook in functions.php from page link

I'm writing a small function that takes a json file (~1000 objects) and uploads every json object to WordPress post

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

相关推荐

  • json - Run hook in functions.php from page link

    I'm writing a small function that takes a json file (~1000 objects) and uploads every json object to WordPress post

    19小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信