This fixes an issue to the edit job listing screen. To reproduce:
Create a job and publish it
Set up a recaptcha and enable it in the settings (any version will do, go to https://www.google.com/recaptcha to create keys if you don't have some already)
Go to the job dashboard
Edit the job
After doing some change try to save the listing
At this point the update fails and nothing happens
The problem was that we added the actions to the WP_Job_Manager_Recaptcha constructor. This way the hooks were added even when we wanted to call utility methods and the captcha was also enqueued to the dashboard page.
Changes Proposed in this Pull Request
I moved the hook registration from the constructor to equeue_scripts. This way we only enqueue the captcha when we need to.
Oveview
This fixes an issue to the edit job listing screen. To reproduce:
The problem was that we added the actions to the
WP_Job_Manager_Recaptcha
constructor. This way the hooks were added even when we wanted to call utility methods and the captcha was also enqueued to the dashboard page.Changes Proposed in this Pull Request
equeue_scripts
. This way we only enqueue the captcha when we need to.Testing Instructions