ferdinandk64
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] Installation issueHi, in my case there was one of the CF7 additional plugins that caused the error. A new language is partly recorded that prevents to add it again even if the conflict plugin is disabled. The trick is to restore the database from backup (before the add language attempt), then disable suspected plugins (CF7, Bootstrap for CF7, CF7 Polylang Extension), add language, activate plugins.
Hope it helps someone.
Forum: Plugins
In reply to: [Contact Form 7] How to set the reCaptcha language?Hi,
my solution: put following code in your template functions.php to avoid problems after update. If you use polylang plugin like me, leave as it is, otherwise replace the pll_current_language() by your ‘language code’ or any variable detecting the current language./*wpcf7 recapcha hooks*/
function my_wpcf7_recaptcha_enqueue_scripts() {
$url = ‘https://www.google.com/recaptcha/api.js’;
$url = add_query_arg( array(
‘onload’ => ‘recaptchaCallback’,
‘render’ => ‘explicit’,
‘hl’ => pll_current_language()), $url );wp_deregister_script(‘google-recaptcha’);
wp_register_script( ‘my-google-recaptcha’, $url, array(), ‘2.0’, true );
wp_enqueue_script( ‘my-google-recaptcha’ );}
function my_wpcf7_recaptcha_callback_script() {
if ( ! wp_script_is( ‘my-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 widget_id = grecaptcha.render(divs[j], {
‘sitekey’: sitekey,
‘theme’: divs[j].getAttribute(‘data-theme’),
‘type’: divs[j].getAttribute(‘data-type’),
‘size’: divs[j].getAttribute(‘data-size’),
‘tabindex’: divs[j].getAttribute(‘data-tabindex’),
‘callback’: divs[j].getAttribute(‘data-callback’),
‘expired-callback’: divs[j].getAttribute(‘data-expired-callback’)
});recaptchaWidgets.push(widget_id);
break;
}
}
}
}
</script>
<?php
}add_action( ‘wpcf7_enqueue_scripts’, ‘my_wpcf7_recaptcha_enqueue_scripts’ );
add_action( ‘wpcf7_enqueue_scripts’, ‘my_wpcf7_recaptcha_callback_script’ );Maybe you are right. I try to disable the hackrepair feature completely. My websites are still not indexed after a week.
Yes and it seriously damages SEO. According to Seznam helpdesk in such cases it takes weeks until they reintegrate affected websites into search results.
Hi,
if you allowed this plugin to write in system files you would probably find the SeznamBot in the .htaccess HackRepair.com Blacklist section. I am not sure if this feature is doing more than put some lines in there.