Support » Plugin: Contact Form 7 Add Password field » Fix to add features

  • Hi there

    I feel very stupìd about this mistake i’ve made in the code for add features like do-not-not store o not-for-email to this handy plugin. I forgot to use the return value of apply_filters to get the new field features modified by the hook.
    just assign the return value of apply_filter to $features:

    function wpcf7_add_form_tag_k_password() {
    $features = array( ‘name-attr’ => true );
    $features = apply_filters( ‘cf7-add-password-field-features’,$features );
    wpcf7_add_form_tag( array(‘password’,’password*’),
    ‘wpcf7_k_password_form_tag_handler’, $features );

    By the way, I haven’t been able to make it work by modifying the parameter passed by reference. Maybe it is how wordpress makes the call and returns the data.

    My apologies for someone’s wasted time

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author kimipooh


    Thank you for using my plugin.
    I fixed the issue by version 2.4.
    Please update the plugin.

    Thread Starter angarf


    For sure, so simple but so useful.
    Thank you for your quick reply.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix to add features’ is closed to new replies.