Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • function.php of theme. If you do not have a child theme, please create one and put this code there.

    For now, I am removing the plugin’s action and adding mine. This works for me.

    remove_action( 'wp_footer', 'wpcf7_recaptcha_callback_script');
    add_action( 'wp_footer', 'as_recaptcha_callback_script');
    function as_recaptcha_callback_script() {
    	if ( ! wp_script_is( 'google-recaptcha', 'enqueued' ) ) {
    		return;
    	}
    ?>
    <script type="text/javascript">
    var recaptchaWidgets = [];
    var recaptchaCallback = function() {
    	var forms = document.getElementsByTagName( 'form' );
    	var pattern = /(^|\s)g-recaptcha(\s|$)/;
    
    	for ( var i = 0; i < forms.length; i++ ) {
    		var divs = forms[ i ].getElementsByTagName( 'div' );
    
    		for ( var j = 0; j < divs.length; j++ ) {
    			var sitekey = divs[ j ].getAttribute( 'data-sitekey' );
    
    			if ( divs[ j ].className && divs[ j ].className.match( pattern ) && sitekey ) {
    				var params = {
    					'sitekey': sitekey,
    					'type': divs[ j ].getAttribute( 'data-type' ),
    					'size': divs[ j ].getAttribute( 'data-size' ),
    					'theme': divs[ j ].getAttribute( 'data-theme' ),
    					'badge': divs[ j ].getAttribute( 'data-badge' ),
    					'tabindex': divs[ j ].getAttribute( 'data-tabindex' )
    				};
    
    				var callback = divs[ j ].getAttribute( 'data-callback' );
    
    				if ( callback && 'function' == typeof window[ callback ] ) {
    					params[ 'callback' ] = window[ callback ];
    				}
    
    				var expired_callback = divs[ j ].getAttribute( 'data-expired-callback' );
    
    				if ( expired_callback && 'function' == typeof window[ expired_callback ] ) {
    					params[ 'expired-callback' ] = window[ expired_callback ];
    				}
    
    				var widget_id = grecaptcha.render( divs[ j ], params );
    				recaptchaWidgets.push( widget_id );
    				break;
    			}
    		}
    	}
    };
    
    document.addEventListener( 'wpcf7submit', function( event ) {
    	switch ( event.detail.status ) {
    		case 'spam':
    		case 'mail_sent':
    		case 'mail_failed':
    			for ( var i = 0; i < recaptchaWidgets.length; i++ ) {
    				grecaptcha.reset( recaptchaWidgets[ i ] );
    			}
    	}
    }, false );
    </script>
    <?php
    }

    Same issue here.

    Console says ‘ReCAPTCHA couldn’t find user-provided function: recaptchaCallback’

    I did some digging and find out that the script with recaptchaCallback variable is not printing.

    Below condition is returning true and thus not printing the javascript ahead. If I comment this, recaptcha appears again.

    if ( ! wp_script_is( 'google-recaptcha', 'enqueued' ) ) {
    	return;
    }

    p.s. recaptcha was working fine earlier. I am using wordpress 4.9.2 and latest contact form 7.

    Plugin Author jashwant

    (@jashwant)

    You can always hide the default arrows and can create something of your own. next, prev and goToSlide are public methods and can be used to create any type of navigation.

    An example is given below:

    var slider = $('#containerDiv');
    var kas = slider.KickAssSlider().data('KickAssSlider');
    
    kas.next();  // slide next
    
    kas.prev();   // slide prev
    
    kas.goToSlide(n);  // slide to nth slide
    Plugin Author jashwant

    (@jashwant)

    Hi miss_rachelann,

    I don’t see any slider at your home page. May be you have removed it.

    But the error you mentioned is usually caused by jQuery conflicts. May be you have included jQuery twice. Try disabling your other plugins and try again.

    Plugin Author jashwant

    (@jashwant)

    height: 400px;
    
    width: 100%
    Plugin Author jashwant

    (@jashwant)

    Kickass slider is not fully responsive. It however uses width in percents, thus you get a considerable responsiveness, but responsive is more than that. You can edit the js yourself, and can also push the code to github.

    Plugin Author jashwant

    (@jashwant)

    Which version of wordpress are you using ? Kickass works on wp 3.5 and above.

    Plugin Author jashwant

    (@jashwant)

    Thanks for the feedback.

    Do you suggestions for refinements / enhancements ?
    You can raise issues, to point out a bug or ask for enhancements at github repo

    Plugin Author jashwant

    (@jashwant)

    Thanks for your valuable feedback. I am going to add more options in future for sure.

    jashwant

    (@jashwant)

    Instead of equeueing all scripts, use this only.

    wp_enqueue_media();

    It will take care of all.

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