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
- The topic ‘Fix to add features’ is closed to new replies.