jashwant
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] reCaptcha not displayingfunction.php
of theme. If you do not have a child theme, please create one and put this code there.Forum: Plugins
In reply to: [Contact Form 7] reCaptcha not displayingFor 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 }
Forum: Plugins
In reply to: [Contact Form 7] reCaptcha not displayingSame 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.
Forum: Plugins
In reply to: [KickAss Slider] Bullet navigationYou can always hide the default arrows and can create something of your own.
next
,prev
andgoToSlide
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
Forum: Plugins
In reply to: [KickAss Slider] jQuery ErrorHi 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.
Forum: Plugins
In reply to: [KickAss Slider] What are the default dimensions?height: 400px; width: 100%
Forum: Plugins
In reply to: [KickAss Slider] changing the size of the slideKickass 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.
Forum: Plugins
In reply to: [KickAss Slider] can't get to my adminWhich version of wordpress are you using ? Kickass works on wp 3.5 and above.
Forum: Reviews
In reply to: [KickAss Slider] great startThanks for the feedback.
Do you suggestions for refinements / enhancements ?
You can raise issues, to point out a bug or ask for enhancements at github repoForum: Reviews
In reply to: [KickAss Slider] Yep, it's pretty much kickass!Thanks for your valuable feedback. I am going to add more options in future for sure.
Forum: Fixing WordPress
In reply to: (new) media-upload on admin.php – UNDEFINEDInstead of
equeueing
all scripts, use this only.wp_enqueue_media();
It will take care of all.