Skip to content

Conversation

@nithinjohn22
Copy link

Integrates Friendly Captcha into WP Job Openings application forms

Copy link
Member

@merlinfuchs merlinfuchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for working on integrating Friendly Captcha into WP Job Openings! We are constantly trying to expand the number of integrations and really appreciate the help.

Sadly I can't accept your PR in the current form as it's missing some crucial steps:

  • The Captcha solution is currently not verified in the backend which means that a user could submit the form without completing the Captcha. See the documentation for more info.
  • The setting for enabling the integration hasn't been added to includes/admin.php. This makes it impossible to actually enable and use the integration.

You can take a look at the integration for WP login to see the general structure: https://github.com/FriendlyCaptcha/friendly-captcha-wordpress/blob/main/friendly-captcha/modules/wordpress/wordpress_login.php#L22

add_action( 'wp_enqueue_scripts', 'wpjo_fc_enqueue_script' );
function wpjo_fc_enqueue_script() {

if ( get_option( 'awsm_jobs_enable_friendlycaptcha' ) !== 'enable' ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see where this option is set. Was this leftover from testing?

Comment on lines +21 to +27
wp_enqueue_script(
'friendly-captcha',
'https://cdn.jsdelivr.net/npm/friendly-challenge/widget.module.min.js',
array(),
null,
true
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scripts are already enqueued by frcaptcha_enqueue_widget_scripts. Either call that function here or as you do in wpjo_fc_display_widget right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants