Answer the question
In order to leave comments, you need to log in
What are the hooks for the submit event?
Hello. I'm wondering if there are any hooks that fire when submitting a form, except for admin_post and its variants?
If I understand correctly, admin_post only works for site admins?
Answer the question
In order to leave comments, you need to log in
Obviously, the reason for the slowdown is due to the opening and closing of base.txt, deleted.txt and good.txt files for each line from first.txt.
It should be something like this:
f2 = open("base.txt", encoding = 'utf-8')
d = open('deleted.txt', 'a', encoding = 'utf-8')
ffinal = open("good.txt",mode = 'a',encoding = 'utf-8')
f1 = open("first.txt",mode = 'r',encoding = 'utf-8')
for line in f1:
...
f1.close()
ffinal.close()
d.close()
f2.close()
You can use AJAX handlers to catch the form submission.
There are hooks for this:wp_ajax_
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question