• Hi there, I’m wondering if someone can clarify how to use the wpcf7_recaptcha_actions filter? I’d like to potentially define some additional reCaptcha actions.

    In the existing array we have for example 'homepage' => 'homepage'

    Is it possible to define custom page ID (or slug)? If so would that be defined as the value or the key in the array?

    Example:

    
    function custom_wpcf7_recaptcha_actions( $array ){ 
        $array = [
                     'homepage' => 'homepage',
                     'contactform' => 'contactform',
                     '1234' => 'about-page'
                 ];
        return $array
    } 
    
    add_filter('wpcf7_recaptcha_actions', 'custom_wpcf7_recaptcha_actions', 10, 1)
    
Viewing 1 replies (of 1 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Contact Form 7’s reCAPCHA module only uses homepage and contactform for action keys. You can add a custom entry like '1234' => 'about-page' through the wpcf7_recaptcha_actions filter hook, but it won’t be actually used. So, by using the filter, you can only rename the actions (the value part of the associative array).

Viewing 1 replies (of 1 total)
  • The topic ‘How to define addition reCaptcha actions via wpcf7_recaptcha_actions’ is closed to new replies.