Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Add Bellow line of code in :
    bootstrap-for-contact-form-7\modules\really-simple-captcha.php File

    function wpcf7_captcha_form_tag_handler( $tag ) {
    $tag = new WPCF7_FormTag( $tag );

    if ( ‘captchac’ == $tag->type && ! class_exists( ‘ReallySimpleCaptcha’ ) ) {
    return ‘‘ . __( ‘To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.’, ‘contact-form-7’ ) . ‘‘;
    }

    if ( empty( $tag->name ) ) {
    return ”;
    }

    $validation_error = wpcf7_get_validation_error( $tag->name );

    $class = wpcf7_form_controls_class( $tag->type );

    if ( ‘captchac’ == $tag->type ) { // CAPTCHA-Challenge (image)
    $class .= ‘ wpcf7-captcha-‘ . $tag->name;

    $atts = array();

    $atts[‘class’] = $tag->get_class_option( $class );
    $atts[‘id’] = $tag->get_id_option();

    $op = array( // Default
    ‘img_size’ => array( 72, 24 ),
    ‘base’ => array( 6, 18 ),
    ‘font_size’ => 14,
    ‘font_char_width’ => 15 );

    $op = array_merge( $op, wpcf7_captchac_options( $tag->options ) );

    if ( ! $filename = wpcf7_generate_captcha( $op ) ) {
    return ”;
    }

    if ( ! empty( $op[‘img_size’] ) ) {
    if ( isset( $op[‘img_size’][0] ) ) {
    $atts[‘width’] = $op[‘img_size’][0];
    }

    if ( isset( $op[‘img_size’][1] ) ) {
    $atts[‘height’] = $op[‘img_size’][1];
    }
    }

    $atts[‘alt’] = ‘captcha’;
    $atts[‘src’] = wpcf7_captcha_url( $filename );

    $atts = wpcf7_format_atts( $atts );

    $prefix = substr( $filename, 0, strrpos( $filename, ‘.’ ) );

    $html = sprintf(
    ‘<input type=”hidden” name=”_wpcf7_captcha_challenge_%1$s” value=”%2$s” />‘,
    $tag->name, $prefix, $atts );

    return $html;

    } elseif ( ‘captchar’ == $tag->type ) { // CAPTCHA-Response (input)
    if ( $validation_error ) {
    $class .= ‘ wpcf7-not-valid’;
    }

    $atts = array();

    $atts[‘size’] = $tag->get_size_option( ’40’ );
    $atts[‘maxlength’] = $tag->get_maxlength_option();
    $atts[‘minlength’] = $tag->get_minlength_option();

    if ( $atts[‘maxlength’] && $atts[‘minlength’]
    && $atts[‘maxlength’] < $atts[‘minlength’] ) {
    unset( $atts[‘maxlength’], $atts[‘minlength’] );
    }

    $atts[‘class’] = $tag->get_class_option( $class );
    $atts[‘id’] = $tag->get_id_option();
    $atts[‘tabindex’] = $tag->get_option( ‘tabindex’, ‘int’, true );
    $atts[‘autocomplete’] = ‘off’;
    $atts[‘aria-invalid’] = $validation_error ? ‘true’ : ‘false’;

    $value = (string) reset( $tag->values );

    if ( wpcf7_is_posted() ) {
    $value = ”;
    }

    if ( $tag->has_option( ‘placeholder’ )
    || $tag->has_option( ‘watermark’ ) ) {
    $atts[‘placeholder’] = $value;
    $value = ”;
    }

    $atts[‘value’] = $value;
    $atts[‘type’] = ‘text’;
    $atts[‘name’] = $tag->name;

    $atts = wpcf7_format_atts( $atts );

    $html = sprintf(
    ‘<span class=”wpcf7-form-control-wrap %1$s”><input %2$s />%3$s</span>’,
    sanitize_html_class( $tag->name ), $atts, $validation_error );

    return $html;
    }
    }

    Plugin Author pa1

    (@pa1)

    Thanks for using this plugin. I will check and update in new version as soon as possible .

    Thanks

    • This reply was modified 9 years, 2 months ago by pa1.
    Plugin Author pa1

    (@pa1)

    Very very thanks for you, for using this plugin.

    Plugin Author pa1

    (@pa1)

    Thanks

    Thread Starter pa1

    (@pa1)

    Please help me,
    I have hosted my plugin in ww.wp.xz.cn

    https://plugins.svn.ww.wp.xz.cn/wp-html-page-sitemap

    This plugin not showing download version . what is wrong in this code

    Please check it.

    Help me..

    Thanks
    Review Rights(Pa1)

    Plugin Author pa1

    (@pa1)

    Hi dagure,

    Thanks for your suggestion. I will definitely look in to this in my next update.

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