• Resolved DJABHipHop

    (@pressthemes1)


    add options to edit custom_comment_checkbox_text as removing website field does no remove website from wp-comment-cookies-consent Save my name, email, and website in this browser for the next time I comment. below if the code snippet im using in the custom I’m currently making for myself.

    // Function to modify the text next to the checkbox
    function universal_comment_checkbox_text($fields) {
    $commenter = wp_get_current_commenter();
    $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"';
    $fields['cookies'] = '<p class="comment-form-cookies-consent"><label for="wp-comment-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
                         'Save my info in this browser for the next time I comment.</label></p>';
    
    return $fields;
    }
    add_filter('comment_form_default_fields', 'custom_comment_checkbox_text');

    pulse if the can create a comments policy page and add below comment-form-cookies-consent
    like this

    function wpbeginner_comment_text_before($arg) {
        $arg['comment_notes_before'] .= '<p class="comment-policy"">We are glad you have chosen to leave a comment. Please keep in mind that comments are moderated according to our <a >comment policy</a>.</p>';
        return $arg;
    }
     
    add_filter('comment_form_defaults', 'wpbeginner_comment_text_before');
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DJABHipHop

    (@pressthemes1)

    Please make every option on here a configurable.
    https://developer.www.ads-software.com/reference/functions/comment_form/

    • This reply was modified 1 year, 4 months ago by DJABHipHop.
    Plugin Author Thomas Maier

    (@webzunft)

    Hi pressthemes1,

    thanks for your suggestions!

    I can see a valid use case in your suggestion. Unfortunately, I won’t be able to implement any of them for the time being due to limited resources on my end.

    I hope your existing code is stable and serves you well, or that you can find a solution that better fits your need. Hopefully, I will find time to implement more features, especially if users with the same request keep writing.

    All the best,
    Thomas

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