Forums

Subscribe To Comments Reloaded
Add label to checkbox (6 posts)

  1. Tobias Jordans
    Member
    Posted 11 months ago #

    Really every label-text next to a checkbox has to have a label-tag. Not having one is just plai bad interaction design because of the minimized click-target...

    Please change those lines in "subscribe-to-comments-reloaded.php"

    Line 60 ff.

    if (empty($checkbox_html_wrap)){
          // Before:
          //$html_to_show = "$checkbox_field <label for='subscribe-reloaded'>$checkbox_label</label>" . $html_to_show;
    			$html_to_show = "$checkbox_field <label for='subscribe-reloaded'>$checkbox_label</label>" . $html_to_show;
    		}
    		else{
    			$checkbox_html_wrap = str_replace('[checkbox_field]', $checkbox_field, $checkbox_html_wrap);
          // Before:
    			//$html_to_show = str_replace('[checkbox_label]', $checkbox_label, $checkbox_html_wrap) . $html_to_show;
    			$html_to_show = str_replace('[checkbox_label]', "<label for='subscribe-reloaded'>$checkbox_label</label>", $checkbox_html_wrap) . $html_to_show;
    		}

    If you feel like this should be an optional change since some css may interfere with the label-tag for checkboxes please make it an option that is active as a default.

    Thanks!
    And thanks for the great plugin!

    Tobias

    http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/

  2. camu
    Member
    Posted 11 months ago #

    Thank you for your feedback, I guess I can implement this change in the next version!

    Camu

  3. camu
    Member
    Posted 11 months ago #

    Done, it has been added to the new version. I will release it hopefully by the end of next week. If you want to test it before it's officially released, just let me know!

    Camu

  4. Tobias Jordans
    Member
    Posted 11 months ago #

    Thanks Camu, that's great! I will check it out as soon as it launches!

  5. camu
    Member
    Posted 10 months ago #

    okay cool.

  6. Tobias Jordans
    Member
    Posted 4 months ago #

    Hi camu, I checked out the newest version of the plugin now but could not find the suggested changes.

    The label-Tag ist still missing for the comment-checkbox.

    This is what I have to change every time I update the plugin:

    else{
    $checkbox_html_wrap = str_replace('[checkbox_field]', $checkbox_field, $checkbox_html_wrap);
    //$html_to_show = str_replace('[checkbox_label]', $checkbox_label, $checkbox_html_wrap) . $html_to_show;
    $html_to_show = str_replace('[checkbox_label]', "<label for='subscribe-reloaded'>$checkbox_label</label>", $checkbox_html_wrap) . $html_to_show;
    }

Reply

You must log in to post.

About this Plugin

About this Topic