So in WordPress, I have a hook for an ajax action, that looks like this:
From a separate Javascript file that runs on the browser side, I have a jquery ajax call made to admin-ajax, which calls this function. This function looks like:
That grabs a json from the URL w/ the authentication. However, I want to be able to call that hook again in a second browser side ajax call, but with a parameter so as to grab data from http://00.00.000.1:8080/api/v1/generalsite/NEWPARAM
.
I’m rather inexperienced w/ PHP but I know in PHP I can pass a standard function a default parameter.
How would I write a new JS ajax call to give the url NEWPARAM, and alter the PHP function so I could pass it to this new ajax call with NEWPARAM is a parameter to myhook?
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com