CAPTCHA 4WP icon
Security

CAPTCHA 4WP hooks reference

  • By WPKube
  • v7.6.2
  • Updated

CAPTCHA 4WP 7.6.2 has 1 actions and 29 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when CAPTCHA 4WP fires an action
add_action( 'c4wp_admin_setting_form', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value CAPTCHA 4WP is about to use
add_filter( 'c4wp_enable_dev_mode', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • admin/class-c4wp-settings.php line 76 · used in 10 places
    apply_filters( 'c4wp_enable_dev_mode', false );
  • includes/class-c4wp-captcha-class.php line 214 · used in 6 places
    apply_filters( 'c4wp_captcha_callback_additional_js', '' );
  • includes/methods/class-captcha.php line 204 · used in 3 places
    apply_filters( 'c4wp_verify_captcha', $verify, $result, $response );
  • includes/class-c4wp-captcha-class.php line 234 · used in 2 places
    apply_filters( 'c4wp_google_verify_url', sprintf( $method::get_verify_url() ) );
  • includes/methods/class-hcaptcha.php line 286 · used in 2 places
    apply_filters( 'c4wp_hcaptcha_script_api_src', sprintf( 'https://js.hcaptcha.com/1/api.js?onload=c4wp_onloadCallback&render=explicit' . $lang ), $lang );
  • includes/class-c4wp-captcha-class.php line 761 · used in 2 places
    apply_filters( 'c4wp_post_method_verify', false, $verify, Geo_Blocking::sanitize_incoming_ip( sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) ) );
  • includes/methods/class-captcha.php line 354 · used in 2 places
    apply_filters( 'c4wp_v2_checkbox_script_api_src', sprintf( 'https://www.%s/recaptcha/api.js?onload=c4wp_onloadCallback&render=explicit' . $lang, C4WP_Functions::c4wp_recaptcha_domain() ), $lang );
  • includes/methods/class-captcha.php line 559 · used in 2 places
    apply_filters( 'c4wp_v2_invisible_script_api_src', sprintf( 'https://www.%s/recaptcha/api.js?onload=c4wp_onloadCallback&render=explicit' . $lang, C4WP_Functions::c4wp_recaptcha_domain() ), $lang );
  • includes/methods/class-captcha.php line 579 · used in 2 places
    apply_filters( 'c4wp_v3_script_api_src', sprintf( 'https://www.%s/recaptcha/api.js?render=' . $site_key . $lang, C4WP_Functions::c4wp_recaptcha_domain() ), $site_key, $lang );
  • includes/methods/class-captcha.php line 120 · used in 2 places
    apply_filters( 'c4wp_verify_captcha_pre', null, $response );
  • includes/class-c4wp-functions.php line 352
    apply_filters( 'c4wp_add_to_enabled_forms_array', $enabled_forms );
  • admin/class-c4wp-settings.php line 1458
    do_action( 'c4wp_admin_setting_form' );
  • includes/methods/class-c4wp-method-loader.php line 48
    apply_filters( 'c4wp_available_methods', self::$methods );
  • includes/class-c4wp-captcha-class.php line 1045
    apply_filters( 'c4wp_captcha_language_filter', $language );
  • includes/methods/class-cloudflare.php line 238
    apply_filters( 'c4wp_cloudflare_verify_url', self::$verify_url );
  • includes/class-c4wp-captcha-class.php line 484
    apply_filters( 'c4wp_error_message', $message, $mgs );
  • includes/class-c4wp-captcha-class.php line 676
    apply_filters( 'c4wp_form_field_markup', self::captcha_form_field() );
  • admin/class-c4wp-settings.php line 358
    apply_filters( 'c4wp_forms_area_tabs', $settings_tabs );
  • includes/class-c4wp-functions.php line 269
    apply_filters( 'c4wp_get_option', $value, $option, $default_value, $is_default );
  • includes/methods/class-hcaptcha.php line 145
    apply_filters( 'c4wp_hcaptcha_verify_url', self::$verify_url );
  • includes/class-c4wp-captcha-class.php line 832
    apply_filters( 'c4wp_is_rest_request_no_path_found', false );
  • includes/class-c4wp-captcha-class.php line 721
    apply_filters( 'c4wp_login_captcha_filter', $show_captcha, $ip );
  • includes/class-c4wp-functions.php line 475
    apply_filters( 'c4wp_recaptcha_domain', $domain );
  • admin/class-c4wp-settings.php line 382
    apply_filters( 'c4wp_settings_area_tabs', $settings_tabs );
  • admin/class-c4wp-settings.php line 1174
    apply_filters( 'c4wp_settings_field_sanitize_filter', $sanitized, $field, $value );
  • admin/class-c4wp-settings.php line 1170
    apply_filters( "c4wp_settings_field_sanitize_filter_{$field['type']}", $value, $field );
  • admin/class-c4wp-settings.php line 823
    apply_filters( 'c4wp_settings_fields', $fields );
  • admin/class-c4wp-settings.php line 861
    apply_filters( 'c4wp_settings_fields_after', $fields );
  • admin/class-c4wp-settings.php line 416
    apply_filters( 'c4wp_settings_sections', $sections );
  • includes/methods/class-cloudflare.php line 211
    apply_filters( 'c4wp_verify_cloudflare_captcha_pre', null, $response );

Generated from CAPTCHA 4WP's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: