Advertisement
Guest User

Enhance CAPTCHA comment form html

a guest
Apr 22nd, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.69 KB | None | 0 0
  1. diff --git a/wp-content/plugins/captcha/captcha.php b/wp-content/plugins/captcha/captcha.php
  2. index ad623ae..f43f6d1 100644
  3. --- a/wp-content/plugins/captcha/captcha.php
  4. +++ b/wp-content/plugins/captcha/captcha.php
  5. @@ -675,9 +675,10 @@ if ( ! function_exists( 'cptch_comment_form' ) ) {
  6.  
  7.         /* captcha html - comment form */
  8.         echo '<p class="cptch_block">';
  9. -       if ( "" != $cptch_options['cptch_label_form'] )
  10. +       if ( "" != $cptch_options['cptch_label_form'] ) {
  11.             echo '<label>' . stripslashes( $cptch_options['cptch_label_form'] ) . '<span class="required"> ' . $cptch_options['cptch_required_symbol'] . '</span></label>';
  12. -       echo '<br />';
  13. +           echo '<br />';
  14. +       }
  15.         cptch_display_captcha();
  16.         echo '</p>';
  17.  
  18. @@ -717,9 +718,10 @@ if ( ! function_exists( 'cptch_comment_form_wp3' ) ) {
  19.  
  20.         /* captcha html - comment form */
  21.         echo '<p class="cptch_block">';
  22. -       if ( "" != $cptch_options['cptch_label_form'] )
  23. +       if ( "" != $cptch_options['cptch_label_form'] ) {
  24.             echo '<label>' . stripslashes( $cptch_options['cptch_label_form'] ) . '<span class="required"> ' . $cptch_options['cptch_required_symbol'] . '</span></label>';
  25. -       echo '<br />';
  26. +           echo '<br />';
  27. +       }
  28.         cptch_display_captcha();
  29.         echo '</p>';
  30.  
  31. @@ -1010,10 +1012,12 @@ if ( ! function_exists( 'cptch_display_captcha' ) ) {
  32.         }
  33.         /* Add hidden field with encoding result */
  34.         ?>
  35. -       <input type="hidden" name="cptch_result" value="<?php echo $str = cptch_encode( $array_math_expretion[ $rand_input ], $str_key, $cptch_time ); ?>" />
  36. -       <input type="hidden" name="cptch_time" value="<?php echo $cptch_time; ?>" />
  37. -       <input type="hidden" value="Version: 2.4" />
  38. -       <?php echo $str_math_expretion; ?>
  39. +       <span class="cptch_task">
  40. +           <input type="hidden" name="cptch_result" value="<?php echo $str = cptch_encode( $array_math_expretion[ $rand_input ], $str_key, $cptch_time ); ?>" />
  41. +           <input type="hidden" name="cptch_time" value="<?php echo $cptch_time; ?>" />
  42. +           <input type="hidden" value="Version: 2.4" />
  43. +           <?php echo $str_math_expretion; ?>
  44. +       </span>
  45.     <?php
  46.     }
  47.  }
  48. @@ -1308,10 +1312,12 @@ if ( ! function_exists( 'cptch_display_captcha_custom' ) ) {
  49.             $str_math_expretion .= $array_math_expretion[2];
  50.         }
  51.         /* Add hidden field with encoding result */
  52. +       $content .= '<span class="cptch_task">';
  53.         $content .= '<input type="hidden" name="cptch_result" value="' . $str = cptch_encode( $array_math_expretion[ $rand_input ], $str_key, $cptch_time ) . '" />
  54.         <input type="hidden" name="cptch_time" value="' . $cptch_time . '" />
  55.         <input type="hidden" value="Version: 2.4" />';
  56. -       $content .= $str_math_expretion;
  57. +       $content .= $str_math_expretion;
  58. +       $content .= '</span>';
  59.         return $content;
  60.     }
  61.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement