• For a plugin I want to change the strings in the comment fields for certain posts (so I can’t change the default, as this applies for all the comments…):
    For this I have added a filter on “comment_form_field_{$name}”.
    This works great for e.g. the URL field, name and email fields: like add_filter( 'comment_form_field_url', array( $this, 'hide_comment_form_url') );

    But for the title_reply (‘Leave a reply’), comment_field (‘Comment’) and label_submit (‘Post comment’) this does not seem to work work? Example:
    add_filter( 'comment_form_field_label_submit', array( $this, 'mod_comment_form_label_submit') );
    It does not call the mod_comment_form_label_submit func…

    Anyone some insight in this? Appreciated.

The topic ‘Can't modify all comment fields with "comment_form_field_{$name}"’ is closed to new replies.