This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// функция с массивом кодов | |
function get_my_register_codes(){ | |
return array( | |
'dk76dJD3_3fJ#f', | |
'kdD53Lnj*00Lds3' | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_u_ip_address(){ | |
$ipaddress = ''; | |
if (isset($_SERVER['HTTP_CLIENT_IP'])){ | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
} | |
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){ | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} | |
else if(isset($_SERVER['HTTP_X_FORWARDED'])){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function google_recaptcha_script(){ | |
echo '<script src="https://www.google.com/recaptcha/api.js" async defer></script>'; | |
} | |
add_action('register_form','google_recaptcha_script'); | |
function display_google_recaptcha() { ?> | |
<div class="g-recaptcha" data-sitekey="site-key"></div> | |
<?php } | |
add_action("register_form", "display_google_recaptcha"); |
NewerOlder