Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter owa123

    (@owa123)

    Yes, The extra filter code that caused the labels to escape html was in class-wp-members-forms.php: Filter the form label args before assembly in the create_form_label label function.

    Your examples helped to understand how to do this, however both didn’t quite work. It’s not just the tos i’m using, i’m adding html to other fields that are type checkbox.

    In your 1st example, it renders the html correctly but it appears to completely remove the label tag and replace it with the text you set in the filter.

    In your 2nd example, the label that you set in the admin ui remains unchanged on the form and it adds the text you set in the filter under the input tag creating more like an additional description field. The 1st example would work if it didn’t remove the label tag.

    Thread Starter owa123

    (@owa123)

    Yes, I can see this in the codebase. Here is an example:

    add_filter( 'wpmem_fields', 'members_fields_filter', 10, 2 );

    function members_fields_filter( $fields, $tag ) {

    $fields['tos']['label'] = '<div class="c-label"><strong>Personal Information</strong>: Please tick to confirm you have read our use of <a href="/terms" target="_blank">Terms and Conditions</a>.</div>';


    return $fields;

    Even if the option to allow HTML only through a filter function would be useful, otherwise it’s limited and links are fairly common in labels.

    Thread Starter owa123

    (@owa123)

    Just to clarify, this happens when you install the plugin from fresh and the wp-content/settings and wp-content/cache direcotires are not created.

Viewing 3 replies - 1 through 3 (of 3 total)