Fix typo for Name input legend in Comments


Hey Wyn,

Thanks for reporting this issue, I fixed it in this commit so you can pull from the development branch if you want to. I am pushing to release the next beta this week end, we are a bit late on the schedule since my little new born made it to our world and I took some time off to spend with her πŸ™‚

If you were to fix it in the current version, here is the snippet you could have used in your child theme.

// Add required attribute to the comment form name field.
beans_add_attribute( 'beans_comment_form_field[_name]', 'required', 'required' );

// Add asterisk comment form name legend.
add_filter( 'beans_comment_form_legend_text[_name]_output', 'example_fix_comment_form_name_legend' );

function example_fix_comment_form_name_legend( $legend ) {
 return "{$legend} *";
}

Happy coding,


Congratulations on your new daughter. Absolutely spend time with her "trumps" a beta release.

And thanks for the snippet. I just applied it to my theme's functions file, and (no surprise) it works!


Thanks for your kind words Wyn, glad to have you in the community πŸ™‚

Write a reply

Login or register to write a reply, it's free!