PHP code example of itinerisltd / disallow-pwned-passwords
1. Go to this page and download the library: Download itinerisltd/disallow-pwned-passwords library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
itinerisltd / disallow-pwned-passwords example snippets
use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\ClientInterface;
use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\Client;
use League\Container\Container;
add_action('i_dpp_register', function (Container $container): void {
$container->add(ClientInterface::class, Client::class);
});
use Itineris\DisallowPwnedPasswords\HaveIBeenPwned\ClientInterface;
use League\Container\Container;
class YourCustomClient implements ClientInterface
{
// Your implementation.
}
add_action('i_dpp_register', function (Container $container): void {
$container->add(ClientInterface::class, YourCustomClient::class);
});
add_action('wp_print_scripts', function () {
wp_dequeue_script('wc-password-strength-meter');
}, 10000);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.